-
Notifications
You must be signed in to change notification settings - Fork 180
Segfault on NetCDF-Java #510
Comments
Have built a work around locally but not using the Not an ideal solution as its very basic and covers only the simplest of use cases |
Greetings Ross, In order to write netcdf4 files, you need to have at least netCDF-C 4.3.1 Thanks! Sean On Mon, Apr 4, 2016 at 7:05 AM, Robin Moss [email protected] wrote:
|
I did wonder if the version would be an issue so i built NetCDF 4.4.0 and still get the same issue, however i didn't do much in terms on configuring the NetCDF build, so here's the
|
Thanks for testing out 4.4.0! In terms of library configureation, all it needs to have enabled is netCDF-4 output, so your config looks ok. I can confirm this behavior on Mac OSX using toolsUI (current master). It may take us a bit to track down exactly what is going on here. It's interesting that using FileWriter works, but not FileWriter2. @DennisHeimbigner - would you have any ideas regarding the Java - C communications path for netCDF4 writing? I have not been down at that layer myself. |
I think its worth noting that we are creating a NetCDF file from scratch using NcML. Using FileWriter2 looks like it tries to copy the file, which also lead to assertion errors in Nc4Iosp. The way i ended up doing it is something like this:
|
One last note :) If i use ncml to write an existing file (i.e. have a location="") it works fine, even if the location file has no data. |
@DennisHeimbigner - just checking in to see if you have any ideas about this one. |
Ok, so the size of test_var is 40000_1500_2 = 120,000,000 bytes. |
Just written a tiny test, and changed the heap space ( It's worth noting that i am trying to create an empty NetCDF 4 file, we are using NcML as a file template.
With NcML:
|
The issues seems to be in the dataset that the NcMLReader generates, internally i've had to take that dataset and re-create it. Admittedly i'm only touching the surface of the Dataset (dimensions, variables, attributes).
This works for my use case, but won't for any more details uses of NcML, although it may give some insight into whats happening. |
Hi,
I've encountered an interesting issue with NetCDF-Java where creating a netcdf file from an NCML file with a large dimension causes a segfault.
In short when i have a large dimension (in this case 40,000) the netcdf file seems to write a netcdf file but there is a segfault which crashes the toolsUi and the Java application we're using the netcdf-java library under.
This is a test ncml file, note that we're creating a new NetCDF file directly from the ncml file:
I can't find anything that states that this dimension length would be too big and if it was i would of expected an error from the netcdf library not a segfault in libc
Any help with this would be apprecaited, thanks in advance
ncml from opening the outputted nc file
Running on Ubuntu (uname -a : Linux UKWGPVL32 3.13.0-39-generic #66-Ubuntu SMP Tue Oct 28 13:30:27 UTC 2014 x86_64 x86_64 x86_64 GNU/Linux)
nc-config --version : netCDF 4.1.3
toolsUi.txt
hs_err_pid29553.txt
The text was updated successfully, but these errors were encountered: