Stack Overflow?

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • David N.

    #1

    Stack Overflow?


    My small C# application, running on a Windows 2003 server machine with 512
    RAM and 80 gigabytes of diskspace, always bombs out with the following
    error:

    [color=blue][color=green]
    >> Fatal stack overfollow error.[/color][/color]

    What can I do to fix this error?


  • Jay B. Harlow [MVP - Outlook]

    #2
    Re: Stack Overflow?

    David,
    Have you tried single stepping it in VS.NET to see what its doing?

    Are you using any P/Invoke?

    Verify you do not have a property procedure referencing itself. Or that you
    do not have a method that calls itself uncontained...

    Something like:

    class FatalStack
    {
    private int fatal;
    public int Fatal
    {
    get { return Fatal; } // incorrect
    set { Fatal = value; } // incorrect
    }

    Notice that the private field is all lower case, but in the Property Get/Set
    I use the property name which is mixed case. This will cause the property to
    call itself until stack overflow... You need to use the field name in the
    property, such as:

    public int Fatal
    {
    get { return fatal; } // correct
    set { fatal = value; } // correct
    }

    I suspect its a property procedure.

    Hope this helps
    Jay

    " David N." <huongdat@comca st.net> wrote in message
    news:OF2posuVDH A.652@tk2msftng p13.phx.gbl...[color=blue]
    >
    > My small C# application, running on a Windows 2003 server machine with 512
    > RAM and 80 gigabytes of diskspace, always bombs out with the following
    > error:
    >
    >[color=green][color=darkred]
    > >> Fatal stack overfollow error.[/color][/color]
    >
    > What can I do to fix this error?
    >
    >[/color]


    Comment

    • Andre

      #3
      Re: Stack Overflow?

      And what is this 'small c# application' doing? Could you post the code?


      -Andre


      David N. wrote:[color=blue]
      > My small C# application, running on a Windows 2003 server machine with 512
      > RAM and 80 gigabytes of diskspace, always bombs out with the following
      > error:
      >
      >
      >[color=green][color=darkred]
      >>>Fatal stack overfollow error.[/color][/color]
      >
      >
      > What can I do to fix this error?
      >
      >[/color]

      Comment

      Working...