Opening the same file two times in row causes softare to freeze
Issue #8
closed
Opening .blf file, closing it and opening again causes software to freeze. Tried with different .blf files, no difference between sizes of files.
Comments (8)
-
repo owner -
reporter After using method "close" and deleting object handling the file, creating another file handling the same path causes software to freeze.
-
repo owner That sounds like a memory leak. I checked with Valgrind and indeed found some issues in freeing the LogContainers in UncompressedFile. I fixed this with the introduction of std::shared_ptr.
The changes are in branch hotfix/8. Can you check if this solves the issue?
-
repo owner - changed status to open
-
reporter It solved the problem :)
-
reporter - changed status to resolved
hotfix/8 solves the issue
-
repo owner -
assigned issue to
-
assigned issue to
-
repo owner - changed status to closed
- Log in to comment
Hi Robert,
please tell me more about the Use Case. Normally you delete the object and open up a new one. So, do you intent to reopen the file for adding more data or for continuing the read? As the README.md states, this is not yet supported.
But if just want to read it again from the beginning or want to overwrite the existing file, I can understand that this should work. Now in the current implementation, if you close the file, the meta data still remains. This was intentional, as you then can still get the number of objects written, or the file size. So to keep this behavior, it doesn't make sense to clear the meta data on close, but I can implement to clear the meta data on (re)open. Then the aforementioned Use Cases (read again, overwrite) would work.
Bye Tobias