Re: General dr.watson

From: Oleg Starodumov (com-dot-debuginfo-at-oleg)
Date: 11/26/04


Date: Fri, 26 Nov 2004 09:58:25 +0200


> Has someone a tutorial or can explain me howto read a dr.watson log and
> user.dmp to find back what caused my crash ?
>

Download and install Debugging Tools for Windows:
http://www.microsoft.com/whdc/ddk/debugging/default.mspx

In the Debugging Tools' help, see "Crash Dump Files" section.
In particular, it contains the information about reading Dr. Watson log.

Preconditions to successful analysis:
1) All executables must be built with debug information (now it usually means PDB file).
2) All application DLLs are rebased to unique addresses
3) All released executables and corresponding debug information files
are saved in a safe location

If debug information was available with the executables on the machine
where the crash occurred, Dr.Watson log can contain useful information.
Then you have to locate the faulting address and module in the log, and also
check the call stack to see how the application came to that place.

With the crash address and module, you can locate the source file/line by loading
the application into VS debugger (making sure that the failed module has been loaded),
opening Disassembly window, navigating to the crash address and R-Click + Go To Source.

If debug information was not available with the executables on the machine where
the crash occurred, Dr. Watson log is unlikely to be useful. Then you have
to debug the crash dump.

WinDbg (part of the Debugging Tools) is the most convenient debugger for that.
You usually have to do the following:
1. Open the crash dump in WinDbg.
2. Set image path so that it points to the place where application binaries are located
(the same that were running at the moment of the crash; with full dump it is usually
possible to debug without modules).
3. Set symbol path so that it points to the place where debug information files
for the application binaries are located. You might also need to set up the symbol path
to point to symbol server, so that you can download matching debug information
for system DLLs (and the DLLs themselves, if the crash happened on XP or newer system).
4. Run "!analyze -v" command and read its output.
5. Run ".ecxr;kb" command to get the call stack at the moment of the crash.

You can also debug crash dump files with Visual Studio debuggers,
but they are not as reliable as WinDbg in that area.
Here are good articles about dump debugging with VS.NET debugger:
http://www.codeproject.com/debug/postmortemdebug_standalone1.asp
http://msdn.microsoft.com/library/en-us/vsdebug/html/vxtskCrashDumps.asp

Regards,
Oleg



Relevant Pages

  • Re: Memory corruption and Dump Stack trace
    ... create a dump file. ... you can use JIT debugging to invoke the debugger ... crashes very randomly and thus hard to reproduce the crash. ...
    (microsoft.public.vc.mfc)
  • Re: "AUTOEXEC" - the first line in the history log
    ... It might have been put in to help debugging a crash in the not so elaborate DOS days whereas NT/XP have more sophisticated options. ... The presence of the AUTOEXEC line in the history log tells only that a crash hadn't occurred before AUTOEXEC execution began. ...
    (comp.os.msdos.4dos)
  • Re: Debuging A MFC project Highily multithreaded and Realtime
    ... Of course, if you wanted to report something meaningful, you would probably specify what ... the crash was, instead of the vague and meaningless term "crash". ... I need some help with debugging a multithreaded application. ...
    (microsoft.public.vc.mfc)
  • Re: trouble with dllhost.exe
    ... Once you DO debug the crash, you can often decipher the object causing the ... No one has yet to figure out how to make general debugging situations like ... > Each High Isolation site will have it's own dllhost.exe, ... >> code since we changed server. ...
    (microsoft.public.inetserver.iis)
  • Re: Access Application Crash
    ... rather than allenbrowne at mvps dot org. ... > I am having a consistent Access Application crash happening when a form ... > calls a certain method on a custom written class. ... After debugging and ...
    (microsoft.public.access.modulesdaovba)