Josh, Gerd, AFAIK there's a big mess with the error handling in such cases with HDF5, I have already filed a bug with that quite some time ago. There's another way to get HDF5 beaten up. Try writing to a memory stick that is almost full. You get assertions in debug and crash in release. Unfortunately it seems there has been little testing of the library with such borderline cases which are, nevertheless, probable. In many cases the reason is simple: support structures are not initialised properly or are modified and not rolled back. For example, if for any reason some metadata is not found or it is not possible to write something to the file, the metadata may be marked as written but because of the fault not freed, the function jumps out back to the caller leaving the state of the program inconsistent....
HTH -- dimitris 2011/5/24 Gerd Heber <[email protected]> > Josh, you definitely should call H5F.close(). I need to consult > with the local experts on what the library does in response to a > device/file > system > removal (if anything). Maybe H5F_close doesn't get called twice. Maybe > the library attempts some kind of forceful cleanup and by the time your > H5F.close() comes > around the file id is already invalid. My inclination is that if you > anticipate > events like drive removal in your application, you should handle them > appropriately. > > Best, G. > > -----Original Message----- > From: [email protected] [mailto: > [email protected]] > On Behalf Of josha > Sent: Tuesday, May 24, 2011 8:43 AM > To: [email protected] > Subject: Re: [Hdf-forum] "Assertion failed!" error when exiting program > (HDF5 1.8.6) > > Thanks for the response. I've placed a breakpoint on the one location that > I call the H5F.close() HDFDotNet wrapper method (that calls H5F_close) and > the application only seems to hit it the one time, so its surprising to > hear > this. Are you telling me that I shouldn't call close on the file myself, > that the exit handling does that on its own? > > I'm doing no specific handling on the WM_DEVICECHANGE message as I expect > that this would be dealt with in the file-handling system calls. Are you > saying I need to check for these things at the application level? > > -- > View this message in context: > > http://hdf-forum.184993.n3.nabble.com/Assertion-failed-error-when-exiting-pr > ogram-HDF5-1-8-6-tp2967435p2979798.html<http://hdf-forum.184993.n3.nabble.com/Assertion-failed-error-when-exiting-pr%0Aogram-HDF5-1-8-6-tp2967435p2979798.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 >
_______________________________________________ Hdf-forum is for HDF software users discussion. [email protected] http://mail.hdfgroup.org/mailman/listinfo/hdf-forum_hdfgroup.org
