Hi list,<br>I encountered a strange error when using GDAL&#39;s MrSID driver from Java.<br>(My system is Windows XP with Visual Studio .Net 2003)<br><br>I built GDAL from SVN (I&#39;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>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Dataset ds = gdal.Open(String name, int accessType);<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; ...<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; // trivial operations (getting Driver and Driver&#39;s description).<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; ...<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; ds.delete();<br>}<br>...<br>// trivial operations
<br>...<br>{<br>&nbsp;...<br>&nbsp;Dataset ds = gdal.Open(String name, int accessType);<br>&nbsp;...<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