Solved

Out of Stack Space

Posted on 2004-08-16
6
240 Views
Last Modified: 2010-05-02
I have a VB program (MDI parent).  When I run this on my development machine I get Run time error 28, out of stack space.  When I look at the stack it shows 2 things (the click event for the button and the subroutine that is doing something).  It does not give this error on the end user machines.

My development machine is a dog compared to the end user machines.  Could it be a memory constraint?

How do you set the stack size, or is it an actual problem.

0
Comment
Question by:DavidBonfoey
  • 3
  • 2
6 Comments
 
LVL 18

Expert Comment

by:JR2003
ID: 11812789
The stack size is fixed in VB.
You often get an out of stack space error if you are calling a function recursively.

Have a look at the call stack from the debug toolbar. There is a call stack viewer that looks like 4 white squares diagonally placed on top of each other with an arrow.

0
 

Author Comment

by:DavidBonfoey
ID: 11812852
I have done that when I run into the error and I show two open functions.  I called a click event (for a button) and that click calls a loadfile function.  Those two show up and disappear when the function is done

Those are the only things.

0
 
LVL 18

Accepted Solution

by:
JR2003 earned 125 total points
ID: 11812927
Is there anything strange about your 'loadfile' function?
You could paste it in here so we can see it?
Does the function return anything?
0
Free Tool: SSL Checker

Scans your site and returns information about your SSL implementation and certificate. Helpful for debugging and validating your SSL configuration.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

 

Author Comment

by:DavidBonfoey
ID: 11813125
I narrowed it down to one line in the load script funciton.

I am passing a string to a control I have made on the form.  
bRet = Editor1.InsertCode(completedString)

The editor1 had been firing a on event command while doing the inserting code, causing the trouble.

Thanks for pointing me in the right direction, points are yours.
0
 
LVL 15

Expert Comment

by:unknown_routine
ID: 11815370
DavidBonfoey :

My experience with this error is that it is not directyl related to memory.

It happens only when an infinite loop or cascading event happens.

double check to see if  there is not a infinite loop, or recursive function or something
like those here:

bRet = Editor1.InsertCode(completedString)


0
 

Author Comment

by:DavidBonfoey
ID: 11815402
I was calling a control which had an event fire during the call.  It was not recursive but it must have conflicted somehow:

Click Button
  Call LoadFile
    PutString into Control
      Call Event that Data Was Changed.....


This event was causing the headache as it must have extended the calls too far.
0

Featured Post

Announcing the Most Valuable Experts of 2016

MVEs are more concerned with the satisfaction of those they help than with the considerable points they can earn. They are the types of people you feel privileged to call colleagues. Join us in honoring this amazing group of Experts.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
Copy a row 12 64
Access Object Property from VBA Module in Excel 2010 2 37
Problem to With line 4 63
converting visio 2010 to powerpoint 2010  - formatting issues 5 92
Introduction I needed to skip over some file processing within a For...Next loop in some old production code and wished that VB (classic) had a statement that would drop down to the end of the current iteration, bypassing the statements that were c…
Most everyone who has done any programming in VB6 knows that you can do something in code like Debug.Print MyVar and that when the program runs from the IDE, the value of MyVar will be displayed in the Immediate Window. Less well known is Debug.Asse…
Get people started with the utilization of class modules. Class modules can be a powerful tool in Microsoft Access. They allow you to create self-contained objects that encapsulate functionality. They can easily hide the complexity of a process from…
Show developers how to use a criteria form to limit the data that appears on an Access report. It is a common requirement that users can specify the criteria for a report at runtime. The easiest way to accomplish this is using a criteria form that a…

831 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question