2

I don't see FATAL_EXCEPTION or anything like that anywhere. I thought these kind of exceptions were warnings, not errors. Should it crash my app?

Note: the query was running on a worker thread.

05-18 10:33:05.446 E/StrictMode( 4102): Finalizing a Cursor that has not been deactivated or closed. database = /data/data/com.my.stuff/databases/SomeDatabase.db query = SELECT foo FROM bar

05-18 10:33:05.446 E/StrictMode( 4102): android.database.sqlite.DatabaseObjectNotClosedException: Application did not close the cursor or database object that was opened here

Thanks in advance...

Marcin Orlowski
  • 72,056
  • 11
  • 123
  • 141
Barry Fruitman
  • 12,316
  • 13
  • 72
  • 135
  • That depends on how you configured `StrictMode`. – CommonsWare May 24 '15 at 20:15
  • I didn't configure StrictMode. Can you please elaborate? – Barry Fruitman May 24 '15 at 20:17
  • 1
    As is covered in [the `StrictMode` documentation](http://developer.android.com/reference/android/os/StrictMode.html), crashing your app is due to `penaltyDeath()`. On Android 4.0+, `detectNetwork()` is configured for `penaltyDeath()` "out of the box", leading to [the ever-popular `NetworkOnMainThreadException`](http://stackoverflow.com/questions/6343166/android-os-networkonmainthreadexception). I am not aware that any of the VM policies (e.g., `detectLeakedSqlLiteObjects()`, `detectLeakedClosableObjects()`) are configured for `penaltyDeath()` out of the box. – CommonsWare May 24 '15 at 20:20

0 Answers0