Results 1 to 10 of 10

Thread: out of stacks

  1. #1

    Thread Starter
    Member
    Join Date
    Jun 2009
    Posts
    47

    out of stacks

    Hi, all freinds,
    what the meaning of (out of stacks), some times when I try to test an project made by vb6 , I get this message , need to know what it mean's and how to resolve it
    many thanks for all

  2. #2
    Just a Member! seenu_1st's Avatar
    Join Date
    Aug 2007
    Location
    India
    Posts
    2,170

    Re: out of stacks

    in which code u get that msg?
    Seenu

    If this post is useful, pls don't forget to Rate this post.
    Pls mark thread as resolved once ur problem solved.
    ADO Tutorial Variable types SP6 for VB6, MsFlexGrid fast fill, Sorting Algorithms


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

    Re: out of stacks

    Probably actually "out of stack space."

    Most of the time it means you have accidentally written a recursive procedure (Sub or Function that calls itself) when you did not mean to. Note that any use of DoEvents() calls means you have written such a procedure, and your program is always on he knife-edge of failure unless you have managed this by disable sources of events such as the control event that triggered the failing procedure.

    There are other ways this can happen too, but they aren't as common. See http://en.wikipedia.org/wiki/Stack_overflow for a general description of what this error means.

  4. #4
    PowerPoster Spoo's Avatar
    Join Date
    Nov 2008
    Location
    Right Coast
    Posts
    2,656

    Re: out of stacks

    fkwinna

    To build on dilletante's post #3 ...

    If you are in Break Mode while debugging your app, you
    will notice a Call Stack button on your Debug toolbar.

    Basically, every time a sub calls another sub or function,
    a new "line" is added to the Call Stack list. If you click on that
    button, you will see this list, in reverse order (current sub at
    the top, and initiating sub at the bottom).

    There is a limit to how many procedures that can be on this list
    (I'm not sure what that number is), and, as dilletante suggested,
    if you have a "recursive procedure" situation, you will exceed that limit.

    Spoo

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

    Re: out of stacks

    It isn't just the procedures themselves, but things like passed parameters and local data declared in the procedure. All of this takes stack space for every nested call.

  6. #6
    PowerPoster Spoo's Avatar
    Join Date
    Nov 2008
    Location
    Right Coast
    Posts
    2,656

    Re: out of stacks

    dillettante

    I didn't realize that. Your Wiki link covers that nicely.
    Thanks for clarification

    Spoo

  7. #7

    Thread Starter
    Member
    Join Date
    Jun 2009
    Posts
    47

    Re: out of stacks

    This problem appeared when used, 35-formate in the project I work on the foundation you call any form of the 35, the order is as follows Alastdaa
    Private Sub d1_Click ()
    Form2.Show
    me Unload
    Here show the error message (out of stacks) mentioned and was forced to stop the activation of one of two commands and be the second

  8. #8

  9. #9

    Thread Starter
    Member
    Join Date
    Jun 2009
    Posts
    47

    Re: out of stacks

    Dearest Martinliss
    thank's for your interest
    the code in the main form as the following

    Private Sub main1_Click()
    Form10.Show
    Unload Me
    End Sub

    Private Sub main2_Click()
    Form12.Show
    Unload Me
    End Sub

  10. #10

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