C# – .NET Runtime Error causes process to crash! But there’s no unhandled exception – Why? CLR bug

cnet

I have a .Net process which runs 24/7 which crashes once or twice per week. I have the AppDomain.CurrentDomain.UnhandledException event hooked up to log4net and the event never gets fired! The process just crashes with logging anything! This looks like a .Net runtime/CLR bug as I just get a message in the Event Log saying ".NET Runtime 2.0 Error".

I am running .Net 3.0 Sp1.

Can some please help me figure out how to fix this?

Event log message:
.NET Runtime 2.0 Error Type: Error Event Id: 1000

Event log description: Faulting application appName.exe, version 0.0.0.0, stamp 4ca5d33d, faulting module mscorwks.dll, version 2.0.50727.3607, stamp 4add5446, debug? 0, fault address 0x0010724e.

Best Answer

I believe that a StackOverflowException would not be caught like this, as there's nowhere for the code to run. This would possibly be a good candidate for something that occurs on a reasonably regular basis - you may need to check through your code for infinite loops/recursion.

Related Topic