Stack Overflow?

  • Thread starter Thread starter David N.
  • Start date Start date
D

David N.

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:


What can I do to fix this error?
 
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
 
Back
Top