HighTechTalks DotNet Forums  

Find recursion

Dotnet Framework (Compact Framework) microsoft.public.dotnet.framework.compactframework


Discuss Find recursion in the Dotnet Framework (Compact Framework) forum.



Reply
 
Thread Tools Search this Thread Display Modes
  #1  
Old   
Hilton
 
Posts: n/a

Default Find recursion - 12-23-2007 , 01:54 AM






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



Reply With Quote
  #2  
Old   
joker
 
Posts: n/a

Default Re: Find recursion - 12-23-2007 , 07:46 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

Thanks,

Reply With Quote
  #3  
Old   
Hilton
 
Posts: n/a

Default Re: Find recursion - 12-23-2007 , 03:10 PM



Hi,

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

Hilton


"joker" <joker (AT) wizebid (DOT) com> wrote

Quote:
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

Thanks,



Reply With Quote
Reply




Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.4
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.