New topic: Stack Overflow - How to find cause?? [FIXED]
<http://forums.realsoftware.com/viewtopic.php?t=45255> Page 1 of 1 [ 4 posts ] Previous topic | Next topic Author Message tseyfarth Post subject: Stack Overflow - How to find cause?? [FIXED]Posted: Tue Sep 04, 2012 6:07 pm Joined: Sat Dec 04, 2010 9:14 pm Posts: 687 Hello All, A console app is giving me fits. It crashes unexpectedly. There is not even a chance for any of the Error Handlers to take over. I found that it is a stack overflow. C++ Debugger says "Unhandled exception in A.exe (NTDLL.DLL): 0xC00000FD: Stack Overflow. How do I go about finding the cause and killing it? This BTW, does not appear to occur when in debug mode. Only after compiled and running. Edit** For some reason at first, I could not make it happen in debug. Right after posting, I was able to and found that a method was calling itself. Thank you! Tim Last edited by tseyfarth on Tue Sep 04, 2012 6:16 pm, edited 1 time in total. Top DaveS Post subject: Re: Stack Overflow - How to find cause??Posted: Tue Sep 04, 2012 6:09 pm Joined: Sun Aug 05, 2007 10:46 am Posts: 4102 Location: San Diego, CA I have found the 99.9% of the time when I get a stack over-flow it is due to run-away recursion Sub Test(x as integer) Test(x) End Sub And you error handling will probably have a hard time catching it... since there would be no stack left for IT to use... so you get a hard-crash _________________ Dave Sisemore MacPro, OSX 10.7.3 RB2011r3 Note : I am not interested in any solutions that involve custom Plug-ins of any kind Top tseyfarth Post subject: Re: Stack Overflow - How to find cause?? [FIXED]Posted: Tue Sep 04, 2012 6:17 pm Joined: Sat Dec 04, 2010 9:14 pm Posts: 687 Hi Dave, I just edited my post, I had not realized you replied! Thank you too! The problem was just that. A method was calling itself. Thanks for the rapid response! Tim Top DaveS Post subject: Re: Stack Overflow - How to find cause?? [FIXED]Posted: Tue Sep 04, 2012 6:21 pm Joined: Sun Aug 05, 2007 10:46 am Posts: 4102 Location: San Diego, CA Note... Recursion can be a useful tool... IF handled properly. You just need to make sure that a recursive routine always unwinds itself..... _________________ Dave Sisemore MacPro, OSX 10.7.3 RB2011r3 Note : I am not interested in any solutions that involve custom Plug-ins of any kind Top Display posts from previous: All posts1 day7 days2 weeks1 month3 months6 months1 year Sort by AuthorPost timeSubject AscendingDescending Page 1 of 1 [ 4 posts ] -- Over 1500 classes with 29000 functions in one REALbasic plug-in collection. The Monkeybread Software Realbasic Plugin v9.3. http://www.monkeybreadsoftware.de/realbasic/plugins.shtml [email protected]
