Hi list,<br>I encountered a strange error when using GDAL's MrSID driver from Java.<br>(My system is Windows XP with Visual Studio .Net 2003)<br><br>I built GDAL from SVN (I'm using the revision 11339) using NMAKE.
<br><br>I written an ImageIO plugin for loading and reading MrSID data sources.<br>This is a typical code in my plugin:<br>-------------------------------------------------------------------------------------------<br>...
<br>{<br> Dataset ds = gdal.Open(String name, int accessType);<br> ...<br> // trivial operations (getting Driver and Driver's description).<br> ...<br> ds.delete();<br>}<br>...<br>// trivial operations
<br>...<br>{<br> ...<br> Dataset ds = gdal.Open(String name, int accessType);<br> ...<br>}<br>-------------------------------------------------------------------------------------------------------------------------------------------------------------
<br>I noticed that on some MrSID data samples, when calling the Open method the second time, this error will occur:<br>Error2 CPLRealloc(): Out of memory allocating 10 bytes.<br><br>It is thrown when MrSID parses metadata on
mrsiddataset.cpp:<br>pszMetadata = (char *)CPLRealloc( pszMetadata, iLength );<br><br>To solve this problem, I built GDAL using a Visual Studio Solution (with MrSID support properly configured) and the error magically disappears.
<br><br>Any suggestion to build GDAL using NMAKE without this error?<br>(I already attempted a NMAKE clean ...)<br><br>Thank you very much.<br><br>-- <br>Best Regards,<br>Daniele Romagnoli