Saturday, January 29, 2011

Why do I keep getting exception code e0434352?

If you want to know how to debug CLR exceptions using cdb then read this post.



Exception code e0434352 is the exception code used internally by the CLR to represent most exceptions(*).



Regardless of if you throw a System.NullReferenceException or a System.ArgumentException in C#, you'll throw a SEH exception e0434352 under the covers.



A fun way to validate this theory is to watch what happens to the CLR exceptions settings in cdb. Fire up cdb, and see the state of clr exceptions:



0:000> .shell -ci "sx" findstr clr
clr - CLR exception - second-chance break - not handled
clrn - CLR notification exception - break - handled
.shell: Process exited


Now, set the exception handler for exception number e0434352 and recheck the value of the clr exception handler:

0:000> sxe e0434352
0:000> .shell -ci "sx" findstr clr
clr - CLR exception - break - not handled
clrn - CLR notification exception - break - handled
.shell: Process exited


Armed with this knowledge I expect this post makes more sense.



NitPickers Corner:

(*) I know of at least Divide by Zero not using this exception code.

4 comments:

  1. Thanks for this post. I got this exception in Visual Studio (http://i.imgur.com/1DUZZ.png) and was curious about what the exception code meant.

    ReplyDelete
  2. This comment has been removed by a blog administrator.

    ReplyDelete
  3. Reading your article is such a privilege. It does inspire me, I hope that you can share more positive thoughts. Visit my site too. The link is posted below.

    n8fan.net

    www.n8fan.net

    ReplyDelete