<html>
<head>
<style>
.hmmessage P
{
margin:0px;
padding:0px
}
body.hmmessage
{
FONT-SIZE: 10pt;
FONT-FAMILY:Tahoma
}
</style>
</head>
<body class='hmmessage'><div style="text-align: left;">Shawn,<br><br>Hopefully we can solve both our problems. It's hard for the developers to run their tests unless they have similiar hardware. If one of the developers want, i may be able to produce a SPARC system to run tests through.<br></div><br>-- Dan Greve<br>-- Software Engineer<br>-- Northrop Grumman Corp.<br><br><hr id="stopSpelling">> Subject: RE: [gdal-dev] Problem with libTiff on Solaris 10<br>> Date: Fri, 30 May 2008 12:54:44 -0400<br>> From: Shawn.Gong@drdc-rddc.gc.ca<br>> To: grevedan@hotmail.com; gdal-dev@lists.osgeo.org<br>> <br>> Dan and list,<br>> <br>> This error looks very similar to what I have experienced on our Sun machine, trying to build and run gdal 1.5.1.<br>> Our Sun system is SPARC Solaris 9 64-bit.<br>> <br>> Error message when Python codes call "gtiff_driver.CreateCopy( fname, vrtds, ...)"<br>> ERROR 1: /home/sgong/../working_dir/test2.tif:No space to read TIFF directory<br>> ERROR 1: TIFFReadDirectory:Failed to read directory at offset 8 Bus error (core dumped)<br>> <br>> <br>> thanks, <br>> Shawn <br>> <br>> ________________________________________<br>> From: gdal-dev-bounces@lists.osgeo.org [mailto:gdal-dev-bounces@lists.osgeo.org] On Behalf Of Dan Greve<br>> Sent: Friday, May 30, 2008 11:51 AM<br>> To: gdal-dev@lists.osgeo.org<br>> Subject: [gdal-dev] Problem with libTiff on Solaris 10<br>> <br>> Greetings,<br>> <br>> I am using the latest stable build, gdal-1.5.1 on a SPARC Solaris 10 64-bit system. It is configured with the default drivers, but is using --with-jpeg=internal --with-libtiff=internal --with-geotiff=internal. Using the 32-bit compiler options and libraries, I can successfully build libgdal.so and the utility programs. However, when trying to do a gdal_translate from one simple uncompressed 3-band geotiff into another simple uncompressed 3-band geotiff, I get a "bus error" segfault. Also, if the output tiff already exists I get two errors. "No space to read tiff directory" and "TiffReadDirectory: failed to read directory at offset 8". A quick google revealed two similiar errors, here and here. Diving into the debugger, the problem seems to lie in the tif_dirwrite.c, starting with line 755. I believe it's due to _TIFFmalloc not allocating memory properly. The crash actual occurs on line 781, *(uint32*)n=(uint32)o->tdir_count; <br>> <br>> o->tdir_count is valid, but setting n to any value causes a segfault, as though TIFFmalloc did not allocate the whole requested 186 bytes. Any ideas?<br>> <br>> <snip file=tif_dirwrite.c><br>> dirmem=_TIFFmalloc(dirsize);<br>> if (dirmem==NULL)<br>> {<br>> TIFFErrorExt(tif->tif_clientdata,module,"Out of memory");<br>> goto bad;<br>> }<br>> if (!(tif->tif_flags&TIFF_BIGTIFF))<br>> {<br>> uint8* n;<br>> TIFFDirEntry* o;<br>> n=dirmem;<br>> *(uint16*)n=ndir;<br>> if (tif->tif_flags&TIFF_SWAB)<br>> TIFFSwabShort((uint16*)n);<br>> n+=2;<br>> o=dir;<br>> for (m=0; m<ndir; m++)<br>> {<br>> *(uint16*)n=o->tdir_tag;<br>> if (tif->tif_flags&TIFF_SWAB)<br>> TIFFSwabShort((uint16*)n);<br>> n+=2;<br>> *(uint16*)n=o->tdir_type;<br>> if (tif->tif_flags&TIFF_SWAB)<br>> TIFFSwabShort((uint16*)n);<br>> n+=2;<br>> *(uint32*)n=(uint32)o->tdir_count;<br>> if (tif->tif_flags&TIFF_SWAB)<br>> TIFFSwabLong((uint32*)n);<br>> n+=4;<br>> _TIFFmemcpy(n,&o->tdir_offset,4);<br>> n+=4;<br>> o++;<br>> }<br>> *(uint32*)n = (uint32)tif->tif_nextdiroff;<br>> }<br>> </snip><br>> <br>> -- Dan Greve<br>> -- Software Engineer<br>> -- Northrop Grumman Corp.<br>> <br>> <br><br /><hr />Keep your kids safer online with Windows Live Family Safety. <a href='http://www.windowslive.com/family_safety/overview.html?ocid=TXT_TAGLM_WL_Refresh_family_safety_052008' target='_new'>Help protect your kids.</a></body>
</html>