Today I saw a .NET NullReferenceException which IMHO should be a first chance exception since the exception is caught and displayed as a MessageBox.
In WinDbg, it looks like this:
0:000> .exr -1
ExceptionAddress: 000007fe8e5794ba
ExceptionCode: c0000005 (Access violation)
ExceptionFlags: 00000000
NumberParameters: 2
Parameter[0]: 0000000000000001
Parameter[1]: 0000000000000149
Attempt to write to address 0000000000000149
I wondered if ExceptionFlags
contains that information, but the WinDbg help .hh .exr
does not explain the output.
Reading MSDN for EXCEPTION_RECORD structure, I found out
- This member can be either zero, indicating a continuable exception
- or EXCEPTION_NONCONTINUABLE indicating a noncontinuable exception
and also on MSDN that EXCEPTION_NONCONTINUABLE has a value of 1.
So far, this matches my expectations, I have a first chance exception.
But then I did
0:000> .lastevent
Last event: 12c0.b2c: Access violation - code c0000005 (first/second chance not available)
Why does .lastevent
think the information is not present? Which command is more reliable?