Opened 19 years ago

Closed 14 years ago

#906 closed defect (worksforme)

NetCDF segmentation fault

Reported by: jdenisgiguere@… Owned by: chaitanya
Priority: normal Milestone:
Component: GDAL_Raster Version: 1.6.2
Severity: normal Keywords: netcdf
Cc: Mateusz Łoskot, dnadeau, warmerdam, Kyle Shannon

Description (last modified by Mateusz Łoskot)

Hi,

I get some trouble with NetCDF file avalaible on http://nomad.geo.usherb.ca/~level2/2002.07.01/.

When I lauch gdalinfo I get a segmentation fault.

I see on old mailing list message that it is not all version of NetCDF file that are readable with gdal. I think that it could be a good idea that in case that the nc file is not supported, there is a nicer message. :-)

Also, there is a open source library (I don't study the license) that allow reading and writing my problematic file. This is the netcdf-bin package of debian. The source seems to come from

http://my.unidata.ucar.edu/content/software/netcdf/index.html

I test gdalinfo 1.2.6 and today cvs snapshot

Change History (16)

comment:1 by warmerdam, 19 years ago

Jean-Denis, 

Could you indicate what version of GDAL you were using? 

Denis Nadeau is currently working on netcdf support in GDAL, so I will pass
this report on to him.

comment:2 by jdenisgiguere@…, 19 years ago

(In reply to comment #1)
> Jean-Denis, 
> 
> Could you indicate what version of GDAL you were using? 
> 
> Denis Nadeau is currently working on netcdf support in GDAL, so I will pass
> this report on to him.

The bug was reported against version 1.2.6 and cvs snapshot of 2005-08-13.

comment:3 by denis.nadeau@…, 19 years ago

I have done some same for netcdf to support CF conventions.  Could you
provide me with some data where gdal core dumps?


Thanks
Denis

comment:4 by jdenisgiguere@…, 19 years ago

(In reply to comment #3)
> I have done some same for netcdf to support CF conventions.  Could you
> provide me with some data where gdal core dumps?
> 
> 
> Thanks
> Denis

http://nomad.geo.usherb.ca/~level2/2002.07.01/

comment:5 by denis.nadeau@…, 19 years ago

I have solved the problem.  Please update your gdal/frmts/netcdf directory,
recompile and give a try.  I now read latitude and longitude for
geotransformation.  

comment:6 by Mateusz Łoskot, 16 years ago

Cc: Mateusz Łoskot added
Description: modified (diff)
Keywords: netcdf added

comment:7 by mgrizonnet, 15 years ago

Version: unspecified1.6.1

Hi,

I have got the same segmentation fault with various netcdf files with the gdalinfo command.

OS: Debian testing gdal: compile from source 1.6.1 (build with the option --with-netcdf=netcdf-install-dir). netcdf : compile from source 4.0.1 netcdf data example : ftp://ftp.cdc.noaa.gov/Datasets/noaa.oisst.v2/sst.mnmean.nc

I had the same error with netcdf files from the unidata websites.

Regards,

Manuel

comment:8 by warmerdam, 15 years ago

Cc: dnadeau warmerdam added
Owner: changed from denis.nadeau@… to chaitanya
Priority: highnormal

Chaitanya,

Could you please try to reproduce and resolve this issue with the referenced dataset?

comment:9 by chaitanya, 15 years ago

Status: newassigned

I have tried this with various versions including 1.6.1, trunk and the 1.6 branch with and without an external netcdf library. I couldn't reproduce the issue with them.

However I did get a problem with an already installed version on my testing machine. It reported 1.6.1, 2009/05/11 but I don't remember how I compiled it. Also, the error always occured, irrespective of the test data at the end of the execution, after all the expected output from the program. If this is how your problem is, it might be fixed by just updating your gdal library.

Could you tell me where the segmentation fault occured? The console output.

comment:10 by mgrizonnet, 15 years ago

Hi

I tried with gdal 1.6.2 compiled from source with the same result today. The segmentation fault occured with the command:

gdalinfo filename.nc

The output of the command is only "segmentation fault" and return immediately after.

To be sure that I don't make a mistake. How I proceed:

compile netcdf from source and install it in $REP/netcdf-install

compile gdal from source with the commands: ./configure --with-netcdf=$REP/netcdf-install make make install

What is the "internal" netCDF that you spoke?

Regards,

Manuel

comment:11 by dnadeau, 15 years ago

This is what I have been using for testing:

hdf5-1.8.3-snap2.tar.gz
netcdf-4-daily.tar.gz

I got a snapshot of GDAL with SVN.

Thinks are working using sst.mnmean.nc

I could not retrieve the files from Sherbrooke University.

http://nomad.geo.usherb.ca/~level2/2002.07.01/

Could you send me a new link? The file might have something different that cause this error.

comment:12 by mgrizonnet, 15 years ago

Version: 1.6.11.6.2

I made the test on my laptop (ubuntu 9.4 32 bits) and it does not segfault anymore...

This is what I have been using for testing this time: -netcdf-4-1.tar.gz same as my previous test on debian -a snapshot of GDAL with SVN.

I am not a specialist of gdal, netcdf and co but I don't think that the problem comes from the fact that I test now with a snapshot of GDAL on my laptop.

I think more of a problem with version of internal libraries (conflicts..) or perhaps with 64 bits architecture (the PC which segfault got a processor amd64)

I can give you more details on my config if you will.

Regards,

Manuel

comment:13 by chaitanya, 15 years ago

I did all my testing on 64-bit machine. Intel Core 2 Duo T6400. No segfault so far.

comment:14 by Kyle Shannon, 14 years ago

Cc: Kyle Shannon added

I am not getting any issues on my build, netcdf 4.0.1 (last stable) Intel(R) Xeon(R) CPU X5472 @ 3.00GHz. Is this still an issue Manuel?

comment:15 by Kyle Shannon, 14 years ago

Chaitanya, I haven't had any problems on my builds, was this just a build issue? Can we close this ticket?

comment:16 by chaitanya, 14 years ago

Resolution: worksforme
Status: assignedclosed

The problem seems to be very isolated. Closing.

Note: See TracTickets for help on using tickets.