There are only a few things that can make a .NET process crash. The most common one is an Unhandled Exception getting raised. Another way that is can happen is by creating a GC Hole.
What is a GC Hole So first a little background on what I mean by a GC Hole. A GC Hole is any corruption that happens inside of the managed heaps. Under normal circumstances, this cannot happen as you don?t have pointers that reference objects in the heap so you can?t corrupt them. This corruption is generally seen by the GC (Garbage Collector) when it is trying to compact the heaps and release objects no longer referenced.
How does a GC Hole get created So if we don?t have access to pointers (not counting managed C++ and that is a whole different conversation), how can this occur? Well the most common way is by making a native call (P/Invoke) that returns data. There are actually two things that can happen during this process ...
Go to the complete details ...