Hello,
I'm developing some custom conversion functions. I'm using Windows 32bit
at HDF5 version 1.8.9. It seems that when I register them with
H5T_PERS_SOFT that they are not called with H5T_CONV_FREE when
H5Tunregister is called. In fact, H5Tunregister does not appear to do
anything, including actually unregister the converters. Actual
unregistration does not appear to happen until H5close is called or hdf5
shared library is unloaded.
This is a problem because I'm calling the registration functions from a
second library. What happens is that I register the functions when the
library is loaded. The H5T_CONV_INIT functions allocate memory and store
pointers in cdata->priv. After using my custom library, the following
happens:
Main program completes
Main program unloads my custom library
Main program unloads hdf5 library*
Main program crashes
*At this point, the converters are called with H5T_CONV_FREE. The crash
is caused when the custom conversion functions are called since they are
no longer loaded.
As a workaround, I think I can call H5close when my library unloads.
However, I'm not sure that that will work in all cases (what if the hdf5
library is still needed, but the custom library is not?)
Any other suggestions? Can anyone confirm this behavior?
Jason
_______________________________________________
Hdf-forum is for HDF software users discussion.
[email protected]
http://mail.hdfgroup.org/mailman/listinfo/hdf-forum_hdfgroup.org