Hi, all freinds,
what the meaning of (out of stacks), some times when I try to test an project made by vb6 , I get this message , need to know what it mean's and how to resolve it
many thanks for all
Printable View
Hi, all freinds,
what the meaning of (out of stacks), some times when I try to test an project made by vb6 , I get this message , need to know what it mean's and how to resolve it
many thanks for all
in which code u get that msg?
Probably actually "out of stack space."
Most of the time it means you have accidentally written a recursive procedure (Sub or Function that calls itself) when you did not mean to. Note that any use of DoEvents() calls means you have written such a procedure, and your program is always on he knife-edge of failure unless you have managed this by disable sources of events such as the control event that triggered the failing procedure.
There are other ways this can happen too, but they aren't as common. See http://en.wikipedia.org/wiki/Stack_overflow for a general description of what this error means.
fkwinna
To build on dilletante's post #3 ...
If you are in Break Mode while debugging your app, you
will notice a Call Stack button on your Debug toolbar.
Basically, every time a sub calls another sub or function,
a new "line" is added to the Call Stack list. If you click on that
button, you will see this list, in reverse order (current sub at
the top, and initiating sub at the bottom).
There is a limit to how many procedures that can be on this list
(I'm not sure what that number is), and, as dilletante suggested,
if you have a "recursive procedure" situation, you will exceed that limit.
Spoo
It isn't just the procedures themselves, but things like passed parameters and local data declared in the procedure. All of this takes stack space for every nested call.
dillettante
I didn't realize that. Your Wiki link covers that nicely.
Thanks for clarification
Spoo
This problem appeared when used, 35-formate in the project I work on the foundation you call any form of the 35, the order is as follows Alastdaa
Private Sub d1_Click ()
Form2.Show
me Unload
Here show the error message (out of stacks) mentioned and was forced to stop the activation of one of two commands and be the second
Is there code in Form2_Load? Is there code in the _Unload sub of the form that you unload? If so please show it or them.
Dearest Martinliss
thank's for your interest
the code in the main form as the following
Private Sub main1_Click()
Form10.Show
Unload Me
End Sub
Private Sub main2_Click()
Form12.Show
Unload Me
End Sub
Sorry but what I asked you to show was the code (if any) in your Form_Load and Form_Unload subs.