Hi,

since some time (I don't know exactly since when, but I regularly update gdal from svn and I don't remember this happening earlier), there is a problem with the python swig bindings when doing this:

data = gdal_array.BandReadAsArray(gdal.Open(filename).GetRasterBand(1))

instead of this:

ds = gdal.Open(filename)
data = gdal_array.BandReadAsArray(ds.GetRasterBand(1))

The first version gives me a segfault, the second works OK. Probably some refcounting issue?

I'm a bit in a hurry and have currently no time for further investigations. Could look at it in more detail later next week, if necessary.

this is on linux ('Arch') 64 bit, gdal fresh from svn, python 2.6.5, gcc 4.4.3

Regards,
Vincent Schut.
_______________________________________________
gdal-dev mailing list
gdal-dev@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/gdal-dev

Reply via email to