all groups > dotnet compact framework > december 2007 >
You're in the

dotnet compact framework

group:

Find recursion



Find recursion Hilton
12/22/2007 11:54:04 PM
dotnet compact framework: Hi,

A couple of my customers have reported "StackOverflowException" - no stack
trace, cannot reproduce, outa luck. I gave myself 30 minutes and wrote some
code which found two methods in my EXE that had recursion; in both cases I
had called "this.XYZ" instead of "base.XYZ" in a "get".

I'd be happy to make the EXE available. Warning, it was written in under an
hour, not my best creation; i.e. it might not catch all recursion, hardly
tested at all, but it might help you - it sure as hell helped me. Let me
know if anyone is interested. Also, it there is any/sufficient interest,
I'd be happy to expand the functionality of it and fix bugs etc (within
reason :)).

Hilton

Re: Find recursion joker
12/23/2007 5:46:49 AM
That's interesting.

I've actually recently observed a condition where I had a method that
was overloaded. For example.

private void DoSomething(object o)
{
if (o is bool)
{
DoSomething((bool)o);
}
}

private void DoSomething(bool b)
{
// do all the work in this method.
}

This actually "sometimes" resulted in recursion. (I typed the above
code from memory, so if it isn't completly correct forgive me). I had
to solve the issue by renaming the method that accepted the bool.

I might be interested in the source of your program, but I'm too
chicken to accept exe's

Re: Find recursion Hilton
12/23/2007 1:10:00 PM
Hi,

In my case it was the simple case of "return this.Bla" instead of "return
base.Bla"

Hilton


[quoted text, click to view]

AddThis Social Bookmark Button