Catching Crashes....
-
Hi. I am feeling a bit overwhelmed at the moment, I could use a small amount of direction... :) How do I go about installing a crash handler into my own application? One that would catch crashes and generate a minidump? I've already got one that works in .net 2003 -- but will need to move on to the next devstudio sooner or later....
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Peter Weyzen Staff Engineer [SoonR Inc.](http://www.soonr.com)
-
Hi. I am feeling a bit overwhelmed at the moment, I could use a small amount of direction... :) How do I go about installing a crash handler into my own application? One that would catch crashes and generate a minidump? I've already got one that works in .net 2003 -- but will need to move on to the next devstudio sooner or later....
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Peter Weyzen Staff Engineer [SoonR Inc.](http://www.soonr.com)
Don't. Dr.Watson already does this. To configure enter "drwtsn32" in the run dialog.
Steve
-
Hi. I am feeling a bit overwhelmed at the moment, I could use a small amount of direction... :) How do I go about installing a crash handler into my own application? One that would catch crashes and generate a minidump? I've already got one that works in .net 2003 -- but will need to move on to the next devstudio sooner or later....
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Peter Weyzen Staff Engineer [SoonR Inc.](http://www.soonr.com)
How does the .Net 2003 one work? You could add exception handling to catch crashes. Not sure what information you might want in a "mini-dump" One place I worked at had a trace mode that users could turn on to log application execution. The trace would generate text for key function call points and variables. There was also an exception handler that would save the trace log out before closing.
-
Don't. Dr.Watson already does this. To configure enter "drwtsn32" in the run dialog.
Steve
DrWatson is really only appropriate in an environment I am in control of. I work on a commercial application.... which does crash from time to time. I wanna capture these crashes on user's machines out there in the real world... DrWatson is not appropriate for this situation. So, back to my original question...
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Peter Weyzen Staff Engineer [SoonR Inc.](http://www.soonr.com)
-
DrWatson is really only appropriate in an environment I am in control of. I work on a commercial application.... which does crash from time to time. I wanna capture these crashes on user's machines out there in the real world... DrWatson is not appropriate for this situation. So, back to my original question...
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Peter Weyzen Staff Engineer [SoonR Inc.](http://www.soonr.com)
Look into the MiniDumpWriteDump[^] and SetUnhandledExceptionFilter[^] functions.
Steve
-
How does the .Net 2003 one work? You could add exception handling to catch crashes. Not sure what information you might want in a "mini-dump" One place I worked at had a trace mode that users could turn on to log application execution. The trace would generate text for key function call points and variables. There was also an exception handler that would save the trace log out before closing.
A minidump is somethat can be generated by a windows api -- it's a binary file that contains the status of the program at the time of the crash. It contains registers, stack frames, list of modules loaded, etc... You can load the dump directly into visual studio, to see the conditions of the crash. It's very handy. We like to do this automatically -- if their program crashes, it generates this file and get's uploaded back to our servers. It's a handy way to see what problems our users are running into without having to interact with them...
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Peter Weyzen Staff Engineer [SoonR Inc.](http://www.soonr.com)
-
Look into the MiniDumpWriteDump[^] and SetUnhandledExceptionFilter[^] functions.
Steve
Thanks for that. Our old crash handling code was kinda complex, but could be boiled down to just this... With the conversion from 2003 to 2005 there's lots of things to figure out, lots of things that were defined and are now not defined....
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Peter Weyzen Staff Engineer [SoonR Inc.](http://www.soonr.com)