J
Jolyroger
For months I've been plagued by a mysterious bug. The bug is very rare and
seems to only appear when running the application outside of the debugger.
In addition, the bug will only appear for a typical user a few times per
month, so its rarity makes it even harder to track down.
The app is coded in Visual Studio 2005.
When the bug strikes, a standard "Unhandled exception has occurred in your
application" dialog appears with this trace:
System.Threading.ThreadAbortException: Thread was being aborted.
at System.Windows.Forms.NativeWindow.DefWndProc(Message& m)
at System.Windows.Forms.Timer.TimerNativeWindow.WndProc(Message& m)
at System.Windows.Forms.NativeWindow.Callback(...)
Does anyone know what could cause an exception with a stack trace like this?
The stack trace implies that a Timer is involved, but I've double-checked
all the Timers and I can't see how this would be the case.
I'd love it if I could understand what could cause this bug, but if that's
not possible, as a consolation prize I'd at least like to suppress the
unhandled exception dialog from appearing. I'm already handling these
events...
Application.ThreadException += new
System.Threading.ThreadExceptionEventHandler(Application_ThreadException);
AppDomain.CurrentDomain.UnhandledException += new
UnhandledExceptionEventHandler(WorkerThreadHandler);
....but this unhandled exception message is still getting through.
Please help me. What should I do?
seems to only appear when running the application outside of the debugger.
In addition, the bug will only appear for a typical user a few times per
month, so its rarity makes it even harder to track down.
The app is coded in Visual Studio 2005.
When the bug strikes, a standard "Unhandled exception has occurred in your
application" dialog appears with this trace:
System.Threading.ThreadAbortException: Thread was being aborted.
at System.Windows.Forms.NativeWindow.DefWndProc(Message& m)
at System.Windows.Forms.Timer.TimerNativeWindow.WndProc(Message& m)
at System.Windows.Forms.NativeWindow.Callback(...)
Does anyone know what could cause an exception with a stack trace like this?
The stack trace implies that a Timer is involved, but I've double-checked
all the Timers and I can't see how this would be the case.
I'd love it if I could understand what could cause this bug, but if that's
not possible, as a consolation prize I'd at least like to suppress the
unhandled exception dialog from appearing. I'm already handling these
events...
Application.ThreadException += new
System.Threading.ThreadExceptionEventHandler(Application_ThreadException);
AppDomain.CurrentDomain.UnhandledException += new
UnhandledExceptionEventHandler(WorkerThreadHandler);
....but this unhandled exception message is still getting through.
Please help me. What should I do?