Cancel
Showing results for 
Search instead for 
Did you mean: 

Debugging - max num of suspending method exceeded

Valued Contributor
Valued Contributor

Hi guys,

I was running my model and, at a certain point, it stopped with the following error message:

the maximum n umber of suspended methods has been exceeded.

 

I attach my method for reference.

 

the errorr occurs after 15hr and 34 mins.

 

What does it mean? how can we prevent this?

1 REPLY

Re: Debugging - max num of suspending method exceeded

Gears Esteemed Contributor Gears Esteemed Contributor
Gears Esteemed Contributor

the problem is the combination of observer and waituntil. The observer is called at each change of numMu, and at each call you suspend this method. So you have in a short time a big number of suspended methods.

 

So you cannot use waituntil in an observer method.

 

If you have a more complex condition to observe, you can use a combination of generator and method. If the condition is met, just do nothing.

Steffen Bangsow
freelance simulation specialist  
web: www.bangsow.eu
mail: steffen@bangsow.net