Ticket #4047 (closed defect: fixed)

Opened 13 months ago

Last modified 4 months ago

gdal_translate segfault when translating ERS to NetCDF.

Reported by: JoshVote Owned by: warmerdam
Priority: normal Milestone:
Component: default Version: unspecified
Severity: normal Keywords: gdal_translate netcdf large segfault
Cc: kyle

Description

Currently I have a 'large' 8GB ER Mapper (ERS) dataset that I want to convert to a NetCDF file with gdal_translate which always results in a segfault when using the following command:

gdal_translate -of netCDF source.ers output.nc

Whereas translating small < 4GB subsets taken from various locations within the source dataset works as expected

gdal_translate -of netCDF -srcwin 0 0 100 100 source.ers output-subset.nc
gdal_translate -of netCDF -srcwin 50000 40000 100 100 source.ers output-subset.nc

It may be a red herring but the segfault ONLY occurs after an 8GB NetCDF file has been almost entirely written.

This testing has been done under Debian Squeeze with GDAL trunk (rev 22206) built from source and the NetCDF 4.1.1 libraries.

I've attached the ERS header for the dataset I am attempting to translate.

Attachments

reprojected_magmap.ers Download (0.6 KB) - added by JoshVote 13 months ago.
ERS header of the large dataset that cannot be translted.
force-netcdf4.patch Download (441 bytes) - added by JoshVote 12 months ago.
A patch for forcing the usage of NetCDF4

Change History

Changed 13 months ago by JoshVote

ERS header of the large dataset that cannot be translted.

Changed 12 months ago by JoshVote

A patch for forcing the usage of NetCDF4

Changed 12 months ago by JoshVote

I've attached a patch (idea stolen from http://trac.osgeo.org/gdal/ticket/3166) that forces gdal to write NetCDF4 that fixes my problem but obviously forces the usage of NetCDF 4.

Whilst I don't expect this change to make it to trunk is it at all possible to specify netcdf3 or netcdf4 explicitly when specifying an output format for gdal_translate and any other gdal tools?

Changed 12 months ago by rouault

  • cc kyle added

Changed 6 months ago by etourigny

can you try latest trunk version, and use the option "-co FORMAT=NC4" or "-co FORMAT=NC4" option? This should resolve the problem. Support for NC4/NC4 Classic has been added in r23272. You can also use "-co COMPRESS=DEFLATE" to use compression.

Changed 4 months ago by etourigny

  • status changed from new to closed
  • resolution set to fixed

this issue should be resolved when using FORMAT=NC4 or FORMAT=NC4C creation option, closing for lack of user input.

Note: See TracTickets for help on using tickets.