Hello,

I have implemented a custom VOL plugin for HDF5 and I noticed that every time 
the application exits, the file_close callback is called one more time at the 
end. The contents of the object passed as a parameter are unspecified and 
sometimes the same as the previous objects, so it is hard for me to identify 
this redundant function call.

For example, having the following user application:

file_id = H5Fcreate(“myfile.h5", H5F_ACC_TRUNC, H5P_DEFAULT, H5P_DEFAULT);
status = H5Fclose(file_id);

The first API call will call the file_open callback through the VOL plugin.
The second API call will call the file_close callback through the VOL plugin 
with parameter the object specifying the file we want to close. This object 
contains the file name.
However, I see another call of the file_close callback at the very end with an 
invalid object (although not NULL) and file name garbage.
This causes my program to crash, since I am trying to close the underlying file 
which is invalid! I cannot think of a way to identify if this call is a 
redundant call and to ignore it.

Do you have nay idea of how to deal with this redundant callback?


Thanks,

Dimos

---
Dimokritos Stamatakis
PhD student,
Brandeis University

---
Dimokritos Stamatakis
PhD student,
Brandeis University

_______________________________________________
Hdf-forum is for HDF software users discussion.
[email protected]
http://lists.hdfgroup.org/mailman/listinfo/hdf-forum_lists.hdfgroup.org
Twitter: https://twitter.com/hdf5

Reply via email to