-
Notifications
You must be signed in to change notification settings - Fork 429
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Using Snapshots in other classes #134
Comments
Just to provide an update, I have edited some code, but when I close the database, the JVM crashes with the fatal error exception. However if I leave the database connection open, then it works fine:
|
This code sample close the database and snapshot (in finally clause) before returning the DBIterator. Both should only be closed after DBIterator is used/iterated and not before usage. But it is true that DB/Iterator/Snapshot should fail with a proper message when resources are closed when used. |
I've tried it with 4 different JDKs and the error is the same. Sometimes the program works fine, but 90% of the time the JVM crashes upon db.close(); This only happens when the DB/Iterator/Snapshot is used in a different class. It works absolutely fine 100% of the time if the DB/Iterator/Snapshot is used within the same class. So to summarise; JVM crashes if DB/Iterator/Snapshot is used in a different class. |
Hello,
I have followed the documentation and there is limited information on how to use Snapshots in other methods and classes. When I open a database instance, take a snapshot, then export it to a new method, the entire JVM crashes which I have never seen before:
A fatal error has been detected by the Java Runtime Environment:
Here is how I am grabbing the Snapshot:
But when I try to iterate the Snapshot like below in other classes, the JVM crashes:
What is the correct way to take a Snapshot of the database and use it elsewhere?
The text was updated successfully, but these errors were encountered: