5

I'm just getting started with windbg/sos and I created a simple console application for testing (that throws an unhandled exception). It seems like after I load sos I will get an exception on the very next call.

For example:

ntsd consoleapplication1.exe
.symfix
.reload
g
.loadby sos clr

if I call:

!threads
"c0000005 Exception in C:\Windows\Microsoft.NET\Framework\v4.0.30319\sos.threads
      PC: 592b7713  VA: 00000000  R/W: 0  Parameter: 00000000"

if I call:

!ClrStack
c0000005 Exception in C:\Windows\Microsoft.NET\Framework\v4.0.30319\sos.ClrStack
      PC: 592b7713  VA: 00000000  R/W: 0  Parameter: 00000000

Every call after my 1st call will work (it's only the first call that fails after loading SOS).

I tried this recommendation and recompiled my code with native code debugging enabled but it did not make a difference.

Version of windbg: 6.3.9600.16384 X86

feetwet
  • 3,248
  • 7
  • 46
  • 84
coding4fun
  • 8,038
  • 13
  • 58
  • 85

1 Answers1

3

This seems to be a problem of WinDbg. I tried it with a .NET 4.0 console application, x86 target. I did not check the checkmark for Enable native code debugging, since I never did that before.

I can reproduce your problem in WinDbg (NTSD) 6.3.9600.16384 x86 with both debug build and release build.

For me it works with WinDbg (NTSD) 6.2.9200.16384 x86 with both debug build and release build.

Since I often have the problem of duplicate output in 6.3 anyway, I am still using version 6.2 as my default WinDbg version.

Thomas Weller
  • 55,411
  • 20
  • 125
  • 222