When tot at Cobyla.cs:962 is very small, this line evaluates to temp = 0.0. This causes line 963 to divide by zero, evaluating to alpha = NaN. This eventually causes both step and stepful to both be NaN, which causes Cobyla.cs:1292 to always evaluate to false (because (NaN == NaN) == false), looping forever.
This is annoying since it makes the algorithm unusable for production purposes.