WinDbg - looking for NullPointerException ... - where to go next?

We have some problems on the farm server that crashes several times a day. None of us have experience with WinDbg, but a colleague of mine managed to create dumps using adsutil.vbs and now I'm analyzing the dump.

Loading symbols, etc. I managed to do it - I then read a bit and tried both: parse -v and a few other commands. Among them, I've used .exr -1, which gives me the following:

0:013> .exr -1
ExceptionAddress: 089644b9
   ExceptionCode: c0000005 (Access violation)
  ExceptionFlags: 00000000
NumberParameters: 2
   Parameter[0]: 00000000
   Parameter[1]: 00000000
Attempt to read from address 00000000

      

Somewhere in the analysis dump! I have read some of the Nullpointer-Exception details that are happening so far. Now I'm a little stuck - having a reference to a memory location, not knowing where to look next ... What would you suggest I do now?

+2


source to share


2 answers


Since you seem to be able to create a dump as you wish (since the server crashes too often), I would do this:

  • Create a full crash dump if you don't already have one. You can use AdPlus (found in WinDbg lib) to do this, just read the docs to see how.
  • Debug the dump in your own development environment, either Visual Studio (if you have the latest version) or WinDbg itself having all the source code.


This way, you can see exactly what your code is doing when it tried to access the null pointer, including the complete memory state of the process at the time of the failure, in the convenience of your own development environment.

WinDbg is a fantastic tool for debugging production, but whenever possible, I always prefer to take the dumps home, where it is much easier to do analysis.

+1


source


I would suggest starting with the WinDbg tutorials on this MSDN blog . There are about five of them on the sidebar under the "debug school". The links cover many basic aspects of debugging .net applications.



Or you can go straight to Hunting Exceptions with Windbg . "

+3


source







All Articles