• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 481
  • Last Modified:

VB.NET - Troubleshooting a StackOverflow Exception

How can I go about troubleshooting this exception?

It happens randomly, I'm running the IDE and app in the background and when it happens all I can see on the notice box is the StackOverflow Exception and the "ok" button... the rest of the box is black so I can't see any details, etc...

When this exception occurs how can I see what is causing it? I appears to highlight a function that is called (in light grey), but that function calls a variety of other subs & functions as well...
 
What is the best way to find out where this is happening exactly? (ApplicationEvents didn't log anything or add anything to the event viewer either)

I have no idea what could be causing this error :(

Hanging application TSN.exe, version 1.0.0.0, hang module hungapp, version 0.0.0.0, hang address 0x00000000.

Category: 101 Event ID: 1002
0
mcainc
Asked:
mcainc
  • 2
  • 2
1 Solution
 
omegaomegaDeveloperCommented:
Hello, mcainc,

This sort of problem is sometimes a result of unterminated recursion.  Do any of your routines make recursive (or reentrant) calls?  If you can't pinpoint the problem by inspection, you may have to add some tracing lines to your code.  (It's slow and a bit old fashioned, but works.)

Cheers,
Randy


0
 
mcaincAuthor Commented:
hey randy,

my classes go kind of deep... call other classes, etc. it is an irc chat client (that allows for multiple connections) so there is a ton of stuff thats going on everywhere

i tried to profile the application with ANTS on a machine here... and when i came back the machine was locked up

this sucks, i wish there was a way to show me what function or object locked up

i guess i will try to add a ton of tracing lines to the app & its classes to see which one was fired last

would a try / catch be able to catch a stack overflow exception?
0
 
omegaomegaDeveloperCommented:
Hi, mcainc,

No, I think that try/catch can't handle this error.  I don't know the details, but the exception handling probably need some space on the stack in order to function.  I found some words in the following link that may be helpful in understanding this (and if you can work in C++ may even provde hope for catching the exception).

http://msdn.microsoft.com/en-us/library/89f73td2(VS.80).aspx

The fact that the problem seems to be random makes it doubly difficult to track down.  If you could find a circumstance where the problem was reliably reproduced it would help quite a lot.

You say that the application is very deep with multiple connections.  Is it possible that it actually requires more stack than what is available?

Cheers,
Randy
0
 
mcaincAuthor Commented:
turns out it was a 3rd party dll that was acting up due to some malformed files it loaded... glad thats over!
0

Featured Post

Free Tool: Path Explorer

An intuitive utility to help find the CSS path to UI elements on a webpage. These paths are used frequently in a variety of front-end development and QA automation tasks.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

  • 2
  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now