简体   繁体   English

“断言失败。” 退出程序时出错 (HDF5 1.8.6)

[英]“Assertion failed!” error when exiting program (HDF5 1.8.6)

I'm using HDF5 1.8.6 on a Windows7 32-bit system from a data acquisition C#/.Net application (using the HDFDotNet wrappers).我在来自数据采集 C#/.Net 应用程序(使用 HDFDotNet 包装器)的 Windows7 32 位系统上使用 HDF5 1.8.6。

I've noticed a runtime error(AssertionFailed) popup when I exit my application after the following behavior:当我在以下行为后退出我的应用程序时,我注意到运行时错误(AssertionFailed)弹出窗口:

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. 1.) 我在 USB 驱动器(或网络共享驱动器)上打开一个 HDF5 文件 2.) 我开始采样数据并将其存储到 HDF5 文件中。 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. 3.)我(粗鲁地)移除 USB 驱动器(或断开网络共享驱动器) 4.)处理写入异常(似乎适当......没有崩溃) 5.)我关闭应用程序。

At this point I get the error, which mentions File:......\src\H5F.c (Line 1737) and "Expression: f->file_id>0"此时我收到错误,其中提到 File:......\src\H5F.c(第 1737 行)和“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.我假设 HDF5 库正在尝试清理某些东西并且很困惑它找不到它正在使用的文件......但它似乎仍然应该能够在它不能恢复时恢复。 Have I missed something?我错过了什么吗?

Thanks!谢谢!

Josh Anderson乔什·安德森

I bet the HDF5 has a close/exit/shutdown function that you should be calling before you exit.我敢打赌 HDF5 有一个关闭/退出/关闭 function,您应该在退出之前调用它。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM