[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[netCDF #QMW-534881]: OPeNDAP URL crashing netcdf 4.1.3



Hello Ellen,

First, I just want to confirm that you are using 4.1.3 and not 4.3.1?  
There was a DAP bug introduced in 4.3.1 for non-conforming OpenDAP 
servers; this bug has been resolved in a maintenance release, 4.3.1.1, 
available here:

http://www.unidata.ucar.edu/netcdf/win_netcdf

Downloading and installing these libraries should fix the problem.

Building a debug version of libnetcdf.dll in Windows can be done fairly 
easily.  You will need the 'cmake' utility available from cmake.org. If 
you require NetCDF-4 support, you will require the appropriate hdf5 
libraries available from www.hdfgroup.org.  You will also need libdap, 
but it sounds like you have that.

On my system, the hdf5 libraries, libcurl and libzip live outside of the 
'normal' path, in c:\other_libs. The subdirectories of c:\other_libs are 
as follows:

c:\other_libs\include
c:\other_libs\lib.
c:\other_libs\cmake\hdf5

I have to specify the root of this location on the command line when I 
invoke cmake, thusly:

c:\netcdf> mkdir build
c:\netcdf> cd build
c:\netcdf\build> cmake .. -DCMAKE_PREFIX_PATH=c:\other_libs\ 
-DHDF5_DIR=c:\other_libs\cmake\hdf5 -G"Visual Studio 10"

This will generate a number of Visual Studio project files which you can 
then open with Visual Studio, or you can build from the command line:

c:\netcdf\build> cmake --build . --config DEBUG

A couple of notes:

1. You will probably need to specify '-G"Visual Studio 12"'.
2. If you are doing 64-bit builds, you will need to specify '-G"Visual 
Studio 12 Win64"

When debugging with hdf5 support, you may receive a number of warnings 
due to cross-memory management from libhdf5.  There are several places 
where hdf5 allocates memory but does not free it, instead relying on the 
caller to manage this memory.  This is frowned on by Windows, and will 
spawn many warnings at runtime unless it is suppressed, or if you are 
using the Release libraries.

I hope this helps, please let me know if I can answer any other questions.

-Ward




On 2/11/14, 5:03 PM, Ellen Johnson wrote:
> New Ticket: OPeNDAP URL crashing netcdf 4.1.3
>
> Hello,
>    We currently use netcdf version 4.1.3, and notice a crash in the nc_open 
> call (only in Windows, not Linux or Mac) on the following OPeNDAP URL:
>
> http://data.nodc.noaa.gov/thredds/dodsC/testdata/pathfinderAgg/pathFinderV5.2_night.ncml
>
>    Do you know if this is a known issue, and is there a way to build a debug 
> version of libnetcdf.dll in Windows so that I may step through the code?  I 
> am using Visual Studio 2012.
>
>    Thank you!
>       ellen
>
>
>
> Ellen M. Johnson
>
> MATLAB Toolbox
>
> MathWorks
>
> 1-508-647-8288
>
> address@hidden
>
>
>
>
>
> Ticket Details
> ===================
> Ticket ID: QMW-534881
> Department: Support netCDF
> Priority: Normal
> Status: Open
> Link:  
> https://www.unidata.ucar.edu/esupport/staff/index.php?_m=tickets&_a=viewticket&ticketid=23365



Ticket Details
===================
Ticket ID: QMW-534881
Department: Support netCDF
Priority: Normal
Status: Closed