I'm working on a compression filter for HDF5, but I had some problems with
jhdf5 opening the filtered datasets.
I managed to trace down the problem to this: the filter plugin is found,
starts execution, but when it wants to free the original buffer, the
program exits with a memory heap corruption error. This is a minimal
version of the filter that reproduces the error:
This (dummy) filter works from C++, from the command line with h5dump, and
also with HDFView. I only had a problem when using it with Fiji, which uses
the jhdf5 library (14.12.2).
I compiled the dll with Visual Studio 2013 on Windows 7 64 bit, and use the
64 bit version of Java 8 with Fiji.
Hi,
I'm working on a compression filter for HDF5, but I had some problems with jhdf5 opening the filtered datasets.
I managed to trace down the problem to this: the filter plugin is found, starts execution, but when it wants to free the original buffer, the program exits with a memory heap corruption error. This is a minimal version of the filter that reproduces the error:
This (dummy) filter works from C++, from the command line with h5dump, and also with HDFView. I only had a problem when using it with Fiji, which uses the jhdf5 library (14.12.2).
I compiled the dll with Visual Studio 2013 on Windows 7 64 bit, and use the 64 bit version of Java 8 with Fiji.
Thanks for the tip, I didn't realize these functions existed.
Unfortunately, however, this didn't fix the problem...
Balint
···
2016-01-08 15:03 GMT+01:00 Daniel Tetlow <daniel.tetlow@optasense.com>:
Hi,
You could try using the H5allocate_memory and H5free_memory functions in
the filter, instead of regular malloc and free.
Dan.
*From:* Hdf-forum [mailto:hdf-forum-bounces@lists.hdfgroup.org] *On
Behalf Of *Bálint Balázs
*Sent:* 08 January 2016 13:51
*To:* hdf-forum@lists.hdfgroup.org
*Subject:* [Hdf-forum] Memory corruption problems with a dynamic filter
in jhdf5
Hi,
I'm working on a compression filter for HDF5, but I had some problems with
jhdf5 opening the filtered datasets.
I managed to trace down the problem to this: the filter plugin is found,
starts execution, but when it wants to free the original buffer, the
program exits with a memory heap corruption error. This is a minimal
version of the filter that reproduces the error:
This (dummy) filter works from C++, from the command line with h5dump, and
also with HDFView. I only had a problem when using it with Fiji, which uses
the jhdf5 library (14.12.2).
I compiled the dll with Visual Studio 2013 on Windows 7 64 bit, and use
the 64 bit version of Java 8 with Fiji.