jtebert / kilosim

Kilobot simulator optimized for performance and code transferability
https://jtebert.github.io/kilosim/index.html
MIT License
6 stars 0 forks source link

Handle I/O failures with HDF5 #8

Open jtebert opened 5 years ago

jtebert commented 5 years ago

There are examples of using try/catch for this in the HDF5 tutorial examples.

These might also be the cause of some intermittent segfaults?

jtebert commented 5 years ago

(Segfaults might also be caused by unclosed files, or for that occasional segfault at the end, by something with shared pointers)

jtebert commented 5 years ago

Program segfaults at end if the H5 file did not exist before running the simulation. Everything seems to work and the data is correctly saved, though. I suspect it's somewhere in a destructor.

jtebert commented 5 years ago

Another one: if the folder for the logger doesn't exist, the programs fails with an error message and exists gracefully, but the error message isn't informative. (Generic HDF IO error, I think.)