[gdal-dev] Heap corruption when using GDALDriver.CreateCopy (C# Bindings, 1.9.2)

lightxx t-h at t-h.cc
Wed Oct 16 00:49:35 PDT 2013


I'm using the NuGet GDAL C# bindings (1.9.2). When I try to convert from an
jp2 file (using the GDALDriver.CreateCopy method) the process bombs with an
uncatchable Heap Corruption Exception. The exception thrown is "Unhandled
exception at 0x77B9AA3C (ntdll.dll) in RASTER.exe: 0xC0000374: A heap has
been corrupted (parameters: 0x77BAFE38)."

Interestingly enough, if I try that with the pre-built binaries
(gdal_translate.exe) everything works as supposed, although terribly slow.

Now I'd like to know if this is a known problem, or if there are any
workarounds to mitigate that problem. After all Windows terminates the
running process when this exception occurs, so there is no way of handling -
not even catching - this exception from managed code.

For your convenience, I've attached a minimum working example. You can find
it here: http://pastebin.com/2ri0X4Lt



--
View this message in context: http://osgeo-org.1560.x6.nabble.com/Heap-corruption-when-using-GDALDriver-CreateCopy-C-Bindings-1-9-2-tp5083834.html
Sent from the GDAL - Dev mailing list archive at Nabble.com.


More information about the gdal-dev mailing list