Versions impacted by the bug
5.10 snapshot
What went wrong?
A user reported being unable to plot aerosol data from an HDF5 dataset using the latest Panoply, which is based on a netCDF-Java 5.10 snapshot from a couple weeks ago. A stack trace revealed that the problem was deep in the weeds of NJ when the Deflate filter tries to uncompress the data.
I then checked what would happen trying to plot the data using IDV, although admittedly it's an IDV 5.5 from a few years ago. The error dialog there reported the same exception message.
See following stack trace for the gory details.
The dataset was downloaded from radiantearth.github.io. The sample files I downloaded from there and which both demonstrated the problem were the 20200101 and 20200301 files.
Relevant stack trace
java.lang.IllegalArgumentException: Negative initial size: -1895699952
at java.base/java.io.ByteArrayOutputStream.<init>(ByteArrayOutputStream.java:78)
at ucar.nc2.filter.Deflate.decode(Deflate.java:75)
at ucar.nc2.internal.iosp.hdf5.H5tiledLayoutBB$DataChunk.getByteBuffer(H5tiledLayoutBB.java:235)
at ucar.nc2.iosp.LayoutBBTiled.hasNext(LayoutBBTiled.java:101)
at ucar.nc2.internal.iosp.hdf5.H5tiledLayoutBB.hasNext(H5tiledLayoutBB.java:143)
at ucar.nc2.iosp.IospHelper.readData(IospHelper.java:364)
at ucar.nc2.iosp.IospHelper.readDataFill(IospHelper.java:292)
at ucar.nc2.internal.iosp.hdf5.H5iospNew.readData(H5iospNew.java:230)
at ucar.nc2.internal.iosp.hdf5.H5iospNew.readData(H5iospNew.java:204)
at ucar.nc2.NetcdfFile.readData(NetcdfFile.java:2122)
at ucar.nc2.Variable.reallyRead(Variable.java:874)
at ucar.nc2.Variable._read(Variable.java:768)
at ucar.nc2.Variable.read(Variable.java:600)
at ucar.nc2.dataset.VariableDS.reallyRead(VariableDS.java:559)
at ucar.nc2.dataset.VariableDS._read(VariableDS.java:496)
at ucar.nc2.Variable.read(Variable.java:600)
at ucar.nc2.Variable.read(Variable.java:546)
Relevant log messages
No response
If you have an example file that you can share, please attach it to this issue.
If so, may we include it in our test datasets to help ensure the bug does not return once fixed?
Note: the test datasets are publicly accessible without restriction.
Yes
Code of Conduct
Versions impacted by the bug
5.10 snapshot
What went wrong?
A user reported being unable to plot aerosol data from an HDF5 dataset using the latest Panoply, which is based on a netCDF-Java 5.10 snapshot from a couple weeks ago. A stack trace revealed that the problem was deep in the weeds of NJ when the Deflate filter tries to uncompress the data.
I then checked what would happen trying to plot the data using IDV, although admittedly it's an IDV 5.5 from a few years ago. The error dialog there reported the same exception message.
See following stack trace for the gory details.
The dataset was downloaded from radiantearth.github.io. The sample files I downloaded from there and which both demonstrated the problem were the 20200101 and 20200301 files.
Relevant stack trace
Relevant log messages
No response
If you have an example file that you can share, please attach it to this issue.
If so, may we include it in our test datasets to help ensure the bug does not return once fixed?
Note: the test datasets are publicly accessible without restriction.
Yes
Code of Conduct