#6337 closed defect (fixed)
gdalinfo and gdal_translate seg faulting for unsigned short variables in netcdf file
Reported by: | brodzik | Owned by: | warmerdam |
---|---|---|---|
Priority: | normal | Milestone: | 1.11.5 |
Component: | GDAL_Raster | Version: | unspecified |
Severity: | normal | Keywords: | netcdf unsigned short |
Cc: |
Description
I am using gdalinfo and gdal_translate to extract information from netCDF files with multiple variables into individual geoTiffs. The netCDF files contain 5 "SUBDATASETS" variables, as follows from gdalinfo:
Subdatasets: SUBDATASET_1_NAME=NETCDF:"EASE2_N25km.F13_SSMI.2003001.19H.E.GRD.CSU.v0.1.nc":TB SUBDATASET_1_DESC=[1x720x720] brightness_temperature (16-bit unsigned integer) SUBDATASET_2_NAME=NETCDF:"EASE2_N25km.F13_SSMI.2003001.19H.E.GRD.CSU.v0.1.nc":TB_num_samples SUBDATASET_2_DESC=[1x720x720] TB_num_samples (8-bit unsigned integer) SUBDATASET_3_NAME=NETCDF:"EASE2_N25km.F13_SSMI.2003001.19H.E.GRD.CSU.v0.1.nc":TB_std_dev SUBDATASET_3_DESC=[1x720x720] TB_std_dev (16-bit unsigned integer) SUBDATASET_4_NAME=NETCDF:"EASE2_N25km.F13_SSMI.2003001.19H.E.GRD.CSU.v0.1.nc":Incidence_angle SUBDATASET_4_DESC=[1x720x720] Incidence_angle (16-bit integer) SUBDATASET_5_NAME=NETCDF:"EASE2_N25km.F13_SSMI.2003001.19H.E.GRD.CSU.v0.1.nc":TB_time SUBDATASET_5_DESC=[1x720x720] TB_time (16-bit integer)
Note that there are 2 16-bit unsigned integer data sets, 1 8-bit unsigned int and 2 16-bit signed integers.
Calls to gdalinfo and gdal_translate both seg fault for the 16-bit unsigned ints, but work as I would expect for the other 3 variables. Here is a sample of how I am calling gdalinfo:
vagrant@vigloo:/projects/CHARIS/tmp_mjb/2003001/2003001$ gdalinfo NETCDF:"EASE2_N25km.F13_SSMI.2003001.19H.E.GRD.CSU.v0.1.nc":TB Segmentation fault (core dumped) vagrant@vigloo:/projects/CHARIS/tmp_mjb/2003001/2003001$ gdalinfo NETCDF:"EASE2_N25km.F13_SSMI.2003001.19H.E.GRD.CSU.v0.1.nc":TB_num_samples Driver: netCDF/Network Common Data Format Files: EASE2_N25km.F13_SSMI.2003001.19H.E.GRD.CSU.v0.1.nc...(rest of gdalinfo output snipped...)
I have produced this behavior using GDAL 2.0.0 built on Ubuntu and GDAL 1.11.2 built on MacOSX.
I would be happy to provide the netCDF file for testing if you need it. It's nearly 1 MB in size, so I wasn't sure if it would be wise to attach it to a trac ticket.
Change History (7)
comment:1 by , 8 years ago
comment:3 by , 8 years ago
Component: | default → GDAL_Raster |
---|---|
Keywords: | netcdf unsigned short added |
comment:4 by , 8 years ago
trunk r33190 "netCDF: disable code used in creation path of uint16 since there are other parts required to make this work"
comment:5 by , 8 years ago
Milestone: | → 1.11.5 |
---|---|
Resolution: | → fixed |
Status: | new → closed |
comment:7 by , 8 years ago
You have to checkout one of the SVN branch (1.11, 2.0 or trunk) and build from sources.
You can write here the URL if it is a publicly accessible resource. Otherwise send it to me by email at even.rouault at spatialys.com