Opened 16 years ago

Closed 11 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 Changed 16 years ago by warmerdam

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 Changed 16 years ago by jdenisgiguere@…

(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 Changed 16 years ago by denis.nadeau@…

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 Changed 16 years ago by jdenisgiguere@…

(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 Changed 16 years ago by denis.nadeau@…

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 Changed 13 years ago by Mateusz Łoskot

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

comment:7 Changed 12 years ago by mgrizonnet

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 Changed 12 years ago by warmerdam

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 Changed 12 years ago by chaitanya

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 Changed 12 years ago by mgrizonnet

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 Changed 12 years ago by dnadeau

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 Changed 12 years ago by mgrizonnet

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 Changed 12 years ago by chaitanya

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

comment:14 Changed 12 years ago by Kyle Shannon

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 Changed 11 years ago by Kyle Shannon

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

comment:16 Changed 11 years ago by chaitanya

Resolution: worksforme
Status: assignedclosed

The problem seems to be very isolated. Closing.

Note: See TracTickets for help on using tickets.