Go Premium for a chance to win a PS4. Enter to Win

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 246
  • Last Modified:

Out of Stack Space

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
DavidBonfoey
Asked:
DavidBonfoey
  • 3
  • 2
1 Solution
 
JR2003Commented:
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
 
DavidBonfoeyAuthor Commented:
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
 
JR2003Commented:
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
Concerto Cloud for Software Providers & ISVs

Can Concerto Cloud Services help you focus on evolving your application offerings, while delivering the best cloud experience to your customers? From DevOps to revenue models and customer support, the answer is yes!

Learn how Concerto can help you.

 
DavidBonfoeyAuthor Commented:
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
 
unknown_routineCommented:
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
 
DavidBonfoeyAuthor Commented:
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

What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

  • 3
  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now