Skip to content
This repository has been archived by the owner on Sep 4, 2020. It is now read-only.

java.util.concurrent.TimeoutException: com.snappydb.internal.KeyIteratorImpl.finalize() timed out after 10 seconds #85

Open
RoyeA opened this issue Jul 1, 2016 · 1 comment

Comments

@RoyeA
Copy link

RoyeA commented Jul 1, 2016

Wrote a small app to test the SnappyDB.
It has only a textView that place the results to it.
When running the application once, all is fine.
When running the application for 10 time ( click on the back button, and re-starting the app ), I'm getting the following exception:
07-01 14:37:38.015 1570-1586/com.example.dev.test2 E/AndroidRuntime: FATAL EXCEPTION: FinalizerWatchdogDaemon
Process: com.example.dev.test2, PID: 1570
java.util.concurrent.TimeoutException: com.snappydb.internal.KeyIteratorImpl.finalize() timed out after 10 seconds
at com.snappydb.internal.DBImpl.__iteratorClose(Native Method)
at com.snappydb.internal.KeyIteratorImpl.close(KeyIteratorImpl.java:32)
at com.snappydb.internal.KeyIteratorImpl.finalize(KeyIteratorImpl.java:42)
at java.lang.Daemons$FinalizerDaemon.doFinalize(Daemons.java:194)
at java.lang.Daemons$FinalizerDaemon.run(Daemons.java:177)
at java.lang.Thread.run(Thread.java:818)

Any idea for the issue ?

Click to view the code : http://paste.ofcode.org/cjTYEEhQHWwTbNPuHsBnsp

@andrzejchm
Copy link

Make sure that whenever you use KeyIterator, you close() it after you are done with it.
For example:

KeyIterator keyIterator = db.allKeysIterator();

//iterate stuff here

keyIterator.close();

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants