Josh, the assertion comes out of H5F_close (in the unmanaged library).
It appears that the application is trying to close the same file twice
in the context of the same process. (H5F_close sets the file id to -1
and that would trip the assertion in the next round.)
Separate processes (but not threads!) have different file handles etc.
and run different copies of the library (with some code sharing for DLLs).
How do you handle the drive removal, i.e., the WM_DEVICECHANGE message?

Best, G.



-----Original Message-----
From: [email protected] [mailto:[email protected]]
On Behalf Of josha
Sent: Friday, May 20, 2011 5:28 PM
To: [email protected]
Subject: [Hdf-forum] "Assertion failed!" error when exiting program (HDF5
1.8.6)

Hi all.

I'm using HDF5 1.8.6 on a Windows7 32-bit system from a data acquisition
C#/.Net application (using the HDFDotNet wrappers).  

I've noticed a runtime error(AssertionFailed) popup when I exit my
application after the following behavior:

1.) I open an HDF5 file on a USB drive (or network shared drive)
2.) I start sampling data and storing it to the HDF5 file.
3.) I (rudely) remove the USB drive (or disconnect the network shared drive)
4.) Write exceptions are handled (seemingly appropriately... no crashes)
5.) I close the application.

At this point I get the error, which mentions File:..\..\..\src\H5F.c (Line
1737) and "Expression: f->file_id>0"

I'm assuming the HDF5 library is trying to clean something up and is
confused that it can't find a file it was using... but it seems it should
still be able to recover when it can't.  Have I missed something?

Thanks!

Josh Anderson 

--
View this message in context:
http://hdf-forum.184993.n3.nabble.com/Assertion-failed-error-when-exiting-pr
ogram-HDF5-1-8-6-tp2967435p2967435.html
Sent from the hdf-forum mailing list archive at Nabble.com.

_______________________________________________
Hdf-forum is for HDF software users discussion.
[email protected]
http://mail.hdfgroup.org/mailman/listinfo/hdf-forum_hdfgroup.org


_______________________________________________
Hdf-forum is for HDF software users discussion.
[email protected]
http://mail.hdfgroup.org/mailman/listinfo/hdf-forum_hdfgroup.org

Reply via email to