Results 1 to 7 of 7

Thread: out of stack space/ over my head

  1. #1

    Thread Starter
    Junior Member
    Join Date
    Mar 2009
    Posts
    19

    out of stack space/ over my head

    Hello Everyone. I have written a 500 lines of code that takes data out of a flight simulator and displays it on a led display. The program runs fine for about 5 minutes then crashes with "out of stack space" stated by the editor. I know I am over my head just visiting MSDN's website and hearing talk of "procedures too deeply nested" and " recursive procedures not terminated correctly". ( I really am at the "Visual Basic for Dummies" level.)

    First I apologize for being tremendously vague and uninformative. I really am just a novice that worked really hard just to get to this point. I think it might be time to try and find a consultant who could offer suggestions but I don't know the best way to go about that. I would post the code here only with permission from the moderator because I think that might too presumptuous.
    (it has 4 forms and a module).
    Thank you again.
    curtis.

  2. #2
    PowerPoster jcis's Avatar
    Join Date
    Jan 2003
    Location
    Argentina
    Posts
    4,430

    Re: out of stack space/ over my head

    Better zip and attach your Project to your next post

  3. #3
    Super Moderator si_the_geek's Avatar
    Join Date
    Jul 2002
    Location
    Bristol, UK
    Posts
    41,974

    Re: out of stack space/ over my head

    The error basically means that there are too many routines (Subs/Functions) running at the 'same' time - you have started a very large amount of routines that haven't finished running yet.

    This is almost certainly due to you accidentally having done something "recursive", which means a routine somehow manages to run another copy of itself. In cases like this it is generally due to one of these causes:
    • You have code in a _Change event (or similar) that makes a change to the value of the control - and thus runs itself again.
    • One routine calls another (that perhaps calls another, etc), which under some circumstances calls the first one, thus creating a kind of 'loop' that never ends.
    • You have got code in a Timer, but the code takes more time to run than the Interval.


    I would post the code here only with permission from the moderator because I think that might too presumptuous.
    You don't need permission, feel free to attach it.

    While it is generally good to not post lots of code unless somebody asks for it (as usually we only need to see a small part, if anything), cases like this depend on several parts of the program - so to be able to help much more than I have in this post, we need to see the whole project.


    In case you don't know, to attach a file click on "Post Reply" below, then on the next screen click "Manage Attachments"

  4. #4

    Thread Starter
    Junior Member
    Join Date
    Mar 2009
    Posts
    19

    Re: out of stack space/ over my head

    Thank you Si, I cannot tell you how much your help/encouragement and this forum as a whole has been to me as a beginner. I am amazed at how much I have learned but I think to track this problem down now would take me a year long class
    Attached Files Attached Files

  5. #5
    PowerPoster dilettante's Avatar
    Join Date
    Feb 2006
    Posts
    24,487

    Re: out of stack space/ over my head

    GoToTX calls Main. Main calls GoToTX.

    Without looking any harder I'd guess that's it.

  6. #6

    Thread Starter
    Junior Member
    Join Date
    Mar 2009
    Posts
    19

    Re: out of stack space/ over my head

    deleted.
    Last edited by kplatt; Apr 6th, 2009 at 06:11 AM.

  7. #7

    Thread Starter
    Junior Member
    Join Date
    Mar 2009
    Posts
    19

    Re: out of stack space/ over my head


    big oops Dil...told you I was a real novice! A call to a execute a procedure will automatically return to the code that called it of course. A call from a call is the recursive loop problem!
    will try to fix it and see what happens.
    thank you again!!!

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width