Need help with a run-time error. 
Author Message
 Need help with a run-time error.

I'm getting Run-Time error '28':  Out of stack space.

What causes this, and how do I fix the problem?

Any advice would be appreciated.  Thanks!

"Guinea Pigs are at the Bottom of the Food Chain."
---Vinnie the Cat

Send mail to Vinnie in care of his human caregiver at:



Sun, 20 Sep 1998 03:00:00 GMT  
 Need help with a run-time error.

Quote:

>I'm getting Run-Time error '28':  Out of stack space.

>What causes this, and how do I fix the problem?

>Any advice would be appreciated.  Thanks!

The stack is space reserved for your programs subroutine nesting. In other
words as you call routines, each routine is placed on the stack so it can find
its way back. Your problem is probably related to a recursive calling
mechanism, such as Lost Focus/Set Focus or an iterative procedure loop calling
itself.

Hope this helps



Mon, 21 Sep 1998 03:00:00 GMT  
 Need help with a run-time error.

Quote:

>I'm getting Run-Time error '28':  Out of stack space.

>What causes this, and how do I fix the problem?

The stack is used when you make procedure calls. Each call uses space
to store each of the parameters and a few bytes for the return address
(where to carry on from after the procedure call),

An "out of stack space" error is almost any language is caused by the
same thing; infinite recursion. If a procedure calls itself over and
over again, this will continue forever, or until it runs out of stack
to store all the nested procedure calls.

In an event-driven environment like VB, there's another way to do
this. If a procedure is a response to an event, and that procedure
causes the event to be fired off again, then you can have the same
infinite recursion, but without an obvious link. A classic example of
this is a control's _Change event that changes its own value, or a
Form_Resize that changes the size of the form. A particularly {*filter*}
version is where two or more controls recur in a loop between each
other, so that the linkage isn't obvious.

Look for the point where the code breaks, and start thinking what
might cause it.

To stop "cascaded events" from within a _Change event, it's often
necessary to have one or more form-level control flags called things
like "FreezeChangesToControlName".

sub txtSomething_Change

  if not FreezeChangesToControlName then
    FreezeChangesToControlName = true

    ' Now do the bit that might cause another _Change event to be fired.
   txtSomething = UCase$(txtSomething)

    FreezeChangesToControlName = false
  end if
end sub



Mon, 21 Sep 1998 03:00:00 GMT  
 
 [ 3 post ] 

 Relevant Pages 

1. Need Help With Run Time Errors?

2. Help needed : Visual basic 6 + myQDBC + run time errors 80040e38

3. run-time error 430 (HELP!! IN DIRE NEED)

4. Need Help with Run-Time Error 377

5. Need help with run-time error.

6. Need help with run-time error.

7. Need Help with Run-Time Error 377

8. Need Help with run time error (desperate)

9. Need Help Run time error on software!

10. Need help -Run time function error

11. Need help about Error message Run-time 429

12. Microsoft Visual C++ Run time library Run time error R6025

 

 
Powered by phpBB® Forum Software