[gdal-dev] gdal 1.5.1 Bus Error - core dump on Solaris 9
Gong, Shawn (Contractor)
Shawn.Gong at drdc-rddc.gc.ca
Mon May 26 12:25:44 EDT 2008
hi Frank and list,
I have written this small code to debug gdal bus error.
"python test.py" failed on the last line. It wrote 178 bytes to
working_dir/test2.tif then core dumped.
python error message:
ERROR 1: /home/sgong/working_dir/test2.tif:No space to read TIFF
directory
ERROR 1: TIFFReadDirectory:Failed to read directory at offset 8
Bus error (core dumped)
help is appreciated,
Shawn
test.py
=================
import os
import gdal
import string
import Numeric
import gdalnumeric
import math
import gvutils
from gdalconst import *
TEMP_PATH__ = os.path.join(os.environ['MY_PATH'], 'working_dir' )
file_read = os.path.join(TEMP_PATH__,"A-Pan.tif")
file_write = os.path.join(TEMP_PATH__,"test2.tif")
dataset = gdal.Open(file_read, GA_ReadOnly )
array = dataset.ReadAsArray(1,1,200,150)
extract_ds = gdalnumeric.OpenArray(array)
#extract_ds.SetGCPs(gcps,projection)
print "step 1"
driver = gdal.GetDriverByName( "GTiff" )
print "step 2"
driver.CreateCopy( file_write, extract_ds )
-----Original Message-----
From: fwarmerdam at gmail.com [mailto:fwarmerdam at gmail.com] On Behalf Of
Frank Warmerdam
Sent: Wednesday, May 21, 2008 3:20 PM
To: Gong, Shawn (Contractor)
Cc: gdal-dev at lists.osgeo.org
Subject: Re: [gdal-dev] gdal 1.5.1 Bus Error - core dump on Solaris 9
On Wed, May 21, 2008 at 1:17 PM, Gong, Shawn (Contractor)
<Shawn.Gong at drdc-rddc.gc.ca> wrote:
> hi list,
>
> I have been using gdal 1.4, and have recently built gdal 1.5.1 for its
> large image support.
> Gdal 1.5.1 and OpenEV 1.8 building was fine. Then I encounter Bus
Error
> - core dump on Solaris 9.
> I have tracked it down to where the Bus Error occurred:
> gtiff_driver = gdal.GetDriverByName( 'GTiff' )
> self.new_ds = gtiff_driver.CreateCopy( fname, vrtds, ...
> A "core" file is generated and kept growing to near half GB.
>
> I have followed Frank's advices of using -fPIC during compiling, and
> rebuilt Gdal 1.5.1 from scratch. But I still get the same error.
Shawn,
I don't know what is happening here. I would suggest you
try and replicate the crash in gdb and get a traceback for
a clue of what is going wrong.
Best regards,
--
---------------------------------------+--------------------------------
------
I set the clouds in motion - turn up | Frank Warmerdam,
warmerdam at pobox.com
light and sound - activate the windows | http://pobox.com/~warmerdam
and watch the world go round - Rush | Geospatial Programmer for Rent
-------------- next part --------------
A non-text attachment was scrubbed...
Name: test2.tif
Type: image/tiff
Size: 178 bytes
Desc: test2.tif
Url : http://lists.osgeo.org/pipermail/gdal-dev/attachments/20080526/8293914e/test2.tif
More information about the gdal-dev
mailing list