without code it is difficult to say.... but normaly this means that your program puts too much datas on the stack and does not remove it. The stack is used to save the current state of local variables, when a function call jumps one layer deeper.
Normally (with normal bugs) the overflow can not happen. A typicall situation, where it is possible is a (wrong) multiple call of the same function inside the function , f.e. a wrong recursive call:
Graphics 200,1000
Global b%, add%, deep%
Repeat
For Add%=1 To 5
B=0
Print "Test with Add=" + Add
Test Add, 0
Print "Press KEY"
WaitKey()
Next
Print "end"
Until KeyHit(1)
WaitKey()
Function Test(add%, Deep%)
b=b+add
Deep=Deep+1
Print "Function deep before=" + Deep
If b=20 Return
Test add, Deep
Print "Function deep after=" + Deep
End Function
This would work for Add=1 and Add=2, but not for Add=3, because B will never be 20
|