Need help with run-time error. 
Author Message
 Need help with 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 help 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 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 help 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:


Usually due to an infinate loop.
--
Deets Consulting



Tue, 22 Sep 1998 03:00:00 GMT  
 Need help with 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 help 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:


Each Visual Basic application uses a single stack limited to 20K
in size (20K in VB 3.0, 16K in VB 1.0 and 2.0).  The 20K size
can't be changed, so an "Out of Stack Space" error can easily
occur if your program performs uncontrolled recursion, such as a
cascading event.  Recusion occurs when a procedure calls itself
(often repeatedly).

Visual Basic itself uses the stack, even in a .EXE, so the practical
limit is lower than 20K.  Use code similar to the listing below to
test the amount of stack space available.  Each GoSub uses 4 bytes
of stack space, so it is easy to calculate the free stack space.

 Sub Command1_Click ()
 'Calculates the amount of free stack space.
 'Used space = 20480 - free space.
   Dim Cnt As Integer
   Cnt = 0
 Overflow_Stack:
   Me.Cls
   Cnt = Cnt + 1
   Print "free", Cnt * 4
   GoSub Overflow_Stack
 End Sub

Procedure arguments and local variables in Sub and Function
procedures take up stack space at run time.  However, Global
variables, module-level variables, and procedure-level variables
declared with the STATIC keyword, and arguments in Sub or Function
procedures that are defined with the STATIC keyword, don't take up
stack space because they are allocated in the module data segments
of form and code modules.

--
Phil
VB Tips:             http://pages.prodigy.com/MO/vbsite/
Swimsuit of the Day: http://clever.net/cool/



Wed, 23 Sep 1998 03:00:00 GMT  
 
 [ 3 post ] 

 Relevant Pages 

1. Need Help With Run Time Errors?

2. Need Help with Run-Time Error 377

3. Need help with run-time error.

4. Need Help with Run-Time Error 377

5. Need Help with run time error (desperate)

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

7. Need help with a run-time error.

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

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