[Gambas-user] wait and stack overflow

Rob sourceforge-raindog2 at ...94...
Fri Oct 27 21:18:37 CEST 2006


On Friday 27 October 2006 14:11, olinux wrote:
> Is somebody can explain me why:
> while toto<>0
> wait
> whend
> generate a stack overflow ????

Because it's an infinite loop and every time the "wait" executes, 
the interpreter adds a context to the stack.  So if it's in some 
event handler that gets called during the wait, e.g. in a timer, 
you end up with 25,000 copies of that event handler on the 
stack.

Can't really be any more specific without seeing the project.

Rob




More information about the User mailing list