Bug fix: Don't forget closing files#1083
Conversation
e0def7e to
d2435db
Compare
d2435db to
3378311
Compare
|
I've added a failing test now and will push the fix again after the CI has run |
|
This fails less tests than I had hoped for, but it does fail some. (Also, it fails for me locally) |
| if( IOHandler()->m_frontendAccess == Access::READ_ONLY ) | ||
| for( auto it = begin; it != end; ++it ) | ||
| { | ||
| // Phase 1 |
There was a problem hiding this comment.
What does Phase mean in this context? :)
There was a problem hiding this comment.
It's just the 3 discrete steps that each iteration of the loop consists of: Flushing the frontend, closing the file, flushing the backend. I just added those comments as an optical guideline to find things faster.
There was a problem hiding this comment.
Cool, thanks! Do we maybe want to add this to the comment, e.g. "Phase 1: flush frontend" etc.? Good to keep the context in such long logic chains :)
* Failing test * Bug fix: Don't forget closing files
* Bug fix: Don't forget closing files (#1083) * Failing test * Bug fix: Don't forget closing files * HDF5: Fix String Vlen Attribute Reads (#1084) We inofficially try to also support HDF5 variable lengths strings in reading, just to increase compatibility. This was never working it seems. * Fix reading of vector attributes with only one contained value (#1085) * Failing test * Conversions in Attribute.hpp 1) single values to 1-value vectors 2) vectors to arrays 3) arrays to vectors * Some cleanup in Attribute.hpp 1) Simplify types in DoConvert, remove unnecessary template parameter 2) Replace a long if-then-else chain by variantSrc::visit * CoreTest: Fix std::array constructors Make more widely compile-able. * Explicit casting in some places This avoids some warnings * Intel compilers: Don't use variantSrc::visit They don't like it * Remove scattered checks for vector attributes * Generalize icpc guard As defined in CMake for compiler identification. * Doc ICC version (2021.3.0) * setAttribute: Reject Empty Strings (#1087) * setAttribute: Reject Empty Strings Some backends, especially HDF5, do not allow us to define zero-sized strings. We thus need to catch this in the frontend and forward the restriction to the user. * Test: setAttribute("key", "") throws * setAttribute Check: C++14 compatible * Don't read iterations if they have already been parsed (#1089) * Release: 0.14.2 Co-authored-by: Franz Pöschel <franz.poeschel@gmail.com>
|
I already applied this to 0.14.2 :) |
Noticed while working on #949, our refactored flush logic will sometimes forget to close a file
TODO
Probablyno it does notIterationOpenedneeds a third entryCloseMeor something