Changes between Initial Version and Version 5 of Ticket #4554


Ignore:
Timestamp:
Mar 10, 2012, 6:21:02 AM (12 years ago)
Author:
jluis
Comment:

Replying to etourigny:

With much help from Even and Frank, the source of the error message has been found.

It seems that the hdf5 library uses atextit() exit handlers (specifically the function H5_term_library()) which get called before gdal unloads. The call to nc_close (ehich calls H5close()) raises an error because the hdf5 library has been unloaded.

Disabling most of gdaldllmain.cpp seems to solve it temporarily, but a better solution should be found.

//#ifdef __GNUC__
#ifdef notdef

Not sure if this happens in Windows - adding Joaquim in cc... Can you see if you get the same error?

Legend:

Unmodified
Added
Removed
Modified
  • Ticket #4554

    • Property Cc etourigny jluis added
  • Ticket #4554 – Description

    initial v5  
    1 I have two netcdf files containing multiple datasets.
     1Etienne,
    22
    3 The netCDF driver produces some HDF5-DIAG error message on the first file but on the second file, the driver handles it without any error.
     3On Win7 64 with HDF5 1.8.8 and netCDF 4.1.3 I get this
     4
    45
    56{{{
    6 gdalwarp -of netCDF multipledataset1.nc dataset1.nc
     7c:\>gdalwarp -of netCDF multipledataset1.nc dataset1.nc
    78Warning 1: No UNIDATA NC_GLOBAL:Conventions attribute
    89Input file multipledataset1.nc has no raster bands.
    9 HDF5-DIAG: Error detected in HDF5 (1.8.8) thread 0:
    10   #000: H5T.c line 1721 in H5Tclose(): not a datatype
    11     major: Invalid arguments to routine
    12     minor: Inappropriate type
    1310
    14 gdalwarp -of netCDF multipledataset2.nc dataset2.nc2
     11c:\>gdalwarp -of netCDF multipledataset2.nc dataset1.nc
    1512Input file multipledataset2.nc has no raster bands.
    1613}}}
     14
     15and with the -debug mode
     16
     17
     18{{{
     19c:\>gdalwarp --debug on -of netCDF multipledataset1.nc dataset1.nc
     20GDAL_netCDF:
     21=====
     22calling nc_open( multipledataset1.nc )
     23
     24GDAL_netCDF: driver detected file type=3, libnetcdf detected type=4
     25GDAL_netCDF: seting file type to 4, was 3
     26GDAL_netCDF: dim_count = 2
     27Warning 1: No UNIDATA NC_GLOBAL:Conventions attribute
     28GDAL_netCDF: var_count = 4
     29GDAL: GDALOpen(multipledataset1.nc, this=00000000005B6660) succeeds as netCDF.
     30Input file multipledataset1.nc has no raster bands.
     31GDAL: force close of multipledataset1.nc in GDALDriverManager cleanup.
     32GDAL: GDALClose(multipledataset1.nc, this=00000000005B6660)
     33}}}