HDF EOS segmentation fault

classic Classic list List threaded Threaded
5 messages Options
Reply | Threaded
Open this post in threaded view
|

HDF EOS segmentation fault

Jan Cermak-2
Hi,

When I read in an hdfeos dataset from a MYD06 file I get a segfault of the following type:
*** glibc detected *** python: double free or corruption (fasttop): 0x081b8d90 ***
This occurs either at one of the steps following the data read or at the termination of the program. There does not seem to be a pattern. Here is some example code:

#!/usr/bin/env python
import gdal
DSname='HDF4_EOS:EOS_SWATH:"/home/jancer/data/tmp/MODIS/MYD06_L2.A2006220.1315.005.2006222153137.hdf":mod06:Cloud_Optical_Thickness'
DSobj = gdal.Open(DSname)
data = DSobj.ReadAsArray()
data.shape
halfdata = data/2.

There is a sample file at
ftp://ladsweb.nascom.nasa.gov/allData/5/MYD06_L2/2006/220/MYD06_L2.A2006220.1315.005.2006222153137.hdf


What's my mistake?

Thanks
Jan
_______________________________________________
Gdal-dev mailing list
[hidden email]
http://lists.maptools.org/mailman/listinfo/gdal-dev
Reply | Threaded
Open this post in threaded view
|

Re: HDF EOS segmentation fault

Frank Warmerdam
Jan Cermak wrote:

> Hi,
>
> When I read in an hdfeos dataset from a MYD06 file I get a segfault of the following type:
> *** glibc detected *** python: double free or corruption (fasttop): 0x081b8d90 ***
> This occurs either at one of the steps following the data read or at the termination of the program. There does not seem to be a pattern. Here is some example code:
>
> #!/usr/bin/env python
> import gdal
> DSname='HDF4_EOS:EOS_SWATH:"/home/jancer/data/tmp/MODIS/MYD06_L2.A2006220.1315.005.2006222153137.hdf":mod06:Cloud_Optical_Thickness'
> DSobj = gdal.Open(DSname)
> data = DSobj.ReadAsArray()
> data.shape
> halfdata = data/2.
>
> There is a sample file at
> ftp://ladsweb.nascom.nasa.gov/allData/5/MYD06_L2/2006/220/MYD06_L2.A2006220.1315.005.2006222153137.hdf

Jan,

I believe you are experiencing one of several bugs that have been fixed
in the last six months or so in GDAL's HDF driver.  Can you update to
either a 1.4 branch snapshot or a trunk snapshot from:

  http://download.osgeo.org/gdal/daily

and see if the problem still persists? (or perhaps grab a recent FWTools
build).

Best regards,
--
---------------------------------------+--------------------------------------
I set the clouds in motion - turn up   | Frank Warmerdam, [hidden email]
light and sound - activate the windows | http://pobox.com/~warmerdam
and watch the world go round - Rush    | President OSGeo, http://osgeo.org

_______________________________________________
Gdal-dev mailing list
[hidden email]
http://lists.maptools.org/mailman/listinfo/gdal-dev
Reply | Threaded
Open this post in threaded view
|

Re: HDF EOS segmentation fault

Jan Cermak-2
Frank Warmerdam wrote:

> Jan Cermak wrote:
>> Hi,
>>
>> When I read in an hdfeos dataset from a MYD06 file I get a segfault of
>> the following type:
>> *** glibc detected *** python: double free or corruption (fasttop):
>> 0x081b8d90 ***
>> This occurs either at one of the steps following the data read or at
>> the termination of the program. There does not seem to be a pattern.
>> Here is some example code:
>>
>> #!/usr/bin/env python
>> import gdal
>> DSname='HDF4_EOS:EOS_SWATH:"/home/jancer/data/tmp/MODIS/MYD06_L2.A2006220.1315.005.2006222153137.hdf":mod06:Cloud_Optical_Thickness'
>>
>> DSobj = gdal.Open(DSname)
>> data = DSobj.ReadAsArray()
>> data.shape
>> halfdata = data/2.
>>
>> There is a sample file at
>> ftp://ladsweb.nascom.nasa.gov/allData/5/MYD06_L2/2006/220/MYD06_L2.A2006220.1315.005.2006222153137.hdf
>>
>
> Jan,
>
> I believe you are experiencing one of several bugs that have been fixed
> in the last six months or so in GDAL's HDF driver.  Can you update to
> either a 1.4 branch snapshot or a trunk snapshot from:
>
>  http://download.osgeo.org/gdal/daily
>
> and see if the problem still persists? (or perhaps grab a recent FWTools
> build).
>
> Best regards,


Hi Frank,

actually that was what I suspected when the problem first occurred. So I
updated to gdal 1.4.2 (1007/06/27) a week ago. This didn't make any
difference though. I just tried the latest nightly build but this gives
me an import error, so I reverted to 1.4.2

By the way, I only get the segfault for MYD06 files. MYD021km etc. work
fine.

Any suggestions?
Jan



_______________________________________________
Gdal-dev mailing list
[hidden email]
http://lists.maptools.org/mailman/listinfo/gdal-dev
Reply | Threaded
Open this post in threaded view
|

Re: HDF EOS segmentation fault

Frank Warmerdam
Jan Cermak wrote:
> Hi Frank,
>
> actually that was what I suspected when the problem first occurred. So I
> updated to gdal 1.4.2 (1007/06/27) a week ago. This didn't make any
> difference though. I just tried the latest nightly build but this gives
> me an import error, so I reverted to 1.4.2
>
> By the way, I only get the segfault for MYD06 files. MYD021km etc. work
> fine.

Jan,

I believe you are specifically running into:

   http://trac.osgeo.org/gdal/ticket/1701

Fixed as:

   http://trac.osgeo.org/gdal/changeset/11742

I believe this fix was post 1.4.2, so you would need up to update to
the stable branch (1.4) nightly snapshot.  I don't know what import
error you encountered, but I would suggest trying to work through it.

(or using FWTools for the script).

Best regards,
--
---------------------------------------+--------------------------------------
I set the clouds in motion - turn up   | Frank Warmerdam, [hidden email]
light and sound - activate the windows | http://pobox.com/~warmerdam
and watch the world go round - Rush    | President OSGeo, http://osgeo.org

_______________________________________________
Gdal-dev mailing list
[hidden email]
http://lists.maptools.org/mailman/listinfo/gdal-dev
Reply | Threaded
Open this post in threaded view
|

Re: HDF EOS segmentation fault

Jan Cermak-2
Frank Warmerdam wrote:

> Jan,
>
> I believe you are specifically running into:
>
>   http://trac.osgeo.org/gdal/ticket/1701
>
> Fixed as:
>
>   http://trac.osgeo.org/gdal/changeset/11742
>
> I believe this fix was post 1.4.2, so you would need up to update to
> the stable branch (1.4) nightly snapshot.  I don't know what import
> error you encountered, but I would suggest trying to work through it.
>
> (or using FWTools for the script).
>
> Best regards,


Hi Frank,

Updating to stable branch nightly seems to have fixed it. Thanks very much!

All best,
Jan

_______________________________________________
Gdal-dev mailing list
[hidden email]
http://lists.maptools.org/mailman/listinfo/gdal-dev