Troubleshooting .NET “Fatal Execution Engine Error”

Well, you’ve got a Big Problem. That exception is raised by the CLR when it detects that the garbage collected heap integrity is compromised. Heap corruption, the bane of any programmer that ever wrote code in an unmanaged language like C or C++.

Those languages make it very easy to corrupt the heap, all it takes is to write past the end of an array that’s allocated on the heap. Or using memory after it has been released. Or having a bad value for a pointer. The kind of bugz that managed code was invented to solve.

But you are using managed code, judging from your question. Well, mostly, your code is managed. But you are executing lots of unmanaged code. All the low-level code that actually makes a HttpWebRequest work is unmanaged. And so is the CLR, it was written in C++ so is technically just as likely to corrupt the heap. But after over four thousand revisions of it, and millions of programs using it, the odds that it still suffers from heap cooties are very small.

The same isn’t true for all the other unmanaged code that wants a piece of HttpWebRequest. The code you don’t know about because you didn’t write it and isn’t documented by Microsoft. Your firewall. Your virus scanner. Your company’s Internet usage monitor. Lord knows whose “download accelerator”.

Isolate the problem, assume it is neither your code nor Microsoft’s code that causes the problem. Assume it is environmental first and get rid of the crapware.

For an epic environmental FEEE story, read this thread.

Leave a Comment