Page 1 of 1

Which thread threw the exception?

Posted: Tue Aug 23, 2005 6:30 pm
by preston
First I want to say that MadExcept rocks. Definately worth the licensing fees.

I've got a statck trace that contains multiple threads. How do I know which thread threw the exception?

Re: Which thread threw the exception?

Posted: Tue Aug 23, 2005 6:40 pm
by madshi
preston wrote:First I want to say that MadExcept rocks. Definately worth the licensing fees.
Thanks... :D
preston wrote:I've got a statck trace that contains multiple threads. How do I know which thread threw the exception?
The crashing thread is always listed first in the bug report.

Posted: Wed Aug 24, 2005 5:07 pm
by preston
In this case then does it mean MadExcept threw the exception?

madExcept version : 2.7g
exception class : EAccessViolation
exception message : Access violation at address 462B462B. Read of address 462B462B.

thread $bf8:
462b462b ???
7c91920e ntdll.dll LdrShutdownThread
004055c1 hallmark.exe System EndThread
0045208f hallmark.exe Classes ThreadProc
0040556c hallmark.exe System ThreadWrapper
0042f7a7 hallmark.exe madExcept ThreadExceptFrame

Posted: Wed Aug 24, 2005 5:17 pm
by madshi
Nope. You'll see "madExcept.ThreadExceptFrame" in most if not all threads. It's just a wrapper with a try..except block in it, which makes sure that madExcept gets a hold of all exceptions in the thread.

The thread during shutdown of the thread jumped to code location "462b462b". At this code location there was no code, though. The location was not even allocated. Thus the exception.

The big question is: Why did the thread try to jump to that code location? That's very hard to say. I'd guess that the thread's stack was overwritten with wild data somewhere. Might be one of the typical "buffer overflow" stories. Does that thread have big local variables? Check out whether you're writing over the bounds somewhere.