Note that there are some explanatory texts on larger screens.

plurals
  1. POHow to debug / mitigate uncatchable exceptions
    primarykey
    data
    text
    <p>So, for a project I have to use the notoriously error prone GDAL (<a href="http://www.gdal.org/" rel="nofollow">http://www.gdal.org/</a>) library written in unmanaged C++ (actually I'm using the C# bindings). The problem is sometimes the library bombs and crashes the vhost32.exe process. There is nothing I can do about that. Empty catch blocks won't do me no good, the AppDomain.CurrentDomain.UnhandledException isn't even raised.</p> <p>The exception thrown is </p> <blockquote> <p>Unhandled exception at 0x77B9AA3C (ntdll.dll) in RASTER.exe: 0xC0000374: A heap has been corrupted (parameters: 0x77BAFE38).</p> </blockquote> <p>So obviously this exception is unrecoverable and Windows shuts down my process. So far so good. Now the problem is, where to I go from here? I don't want the whole process to be killed just because a call to a buggy library fails. What are my options? Spawning a second process and using named pipes for inter-process communication? That would still mean that the <em>other</em> process crashes with that "Windows is checking for a solution to the problem..." popup. Not good. Unfortunately, for the functionality I need there is no alternative to that library.</p> <pre><code>&lt;gcConcurrent enabled="false" /&gt; &lt;legacyCorruptedStateExceptionsPolicy enabled="true" /&gt; </code></pre> <p>in my App.config doesn't change a thing. Neither does decorating the method that bombs with the <code>[HandleProcessCorruptedStateExceptions]</code> attribute.</p> <p>Is there anything I can do?</p>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload