tags:

views:

122

answers:

1

This error is driving me partially insane, it only surfaces on motorola droid / milestone devices, it works flawlessly on the hero and g1. Not got a droid to test it on so have to go on the crash reports in the android market. If you can shed any light onto this matter, I have gone through every db open and made sure it was closed.

java.lang.IllegalStateException: attempt to acquire a reference on a close SQLiteClosable
  at android.app.ActivityThread.performResumeActivity(ActivityThread.java:2950)
  at android.app.ActivityThread.handleResumeActivity(ActivityThread.java:2965)
  at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2516)
  at android.app.ActivityThread.access$2200(ActivityThread.java:119)
  at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1863)
  at android.os.Handler.dispatchMessage(Handler.java:99)
  at android.os.Looper.loop(Looper.java:123)
  at android.app.ActivityThread.main(ActivityThread.java:4363)
  at java.lang.reflect.Method.invokeNative(Method.java:-2)
  at java.lang.reflect.Method.invoke(Method.java:521)
  at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:860)
  at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:618)
  at dalvik.system.NativeStart.main(NativeStart.java:-2)
Caused by: java.lang.IllegalStateException: attempt to acquire a reference on a close SQLiteClosable
  at android.database.sqlite.SQLiteClosable.acquireReference(SQLiteClosable.java:31)
  at android.database.sqlite.SQLiteProgram.<init>(SQLiteProgram.java:56)
  at android.database.sqlite.SQLiteQuery.<init>(SQLiteQuery.java:49)
  at android.database.sqlite.SQLiteDirectCursorDriver.query(SQLiteDirectCursorDriver.java:49)
  at android.database.sqlite.SQLiteDatabase.rawQueryWithFactory(SQLiteDatabase.java:1221)
  at android.database.sqlite.SQLiteDatabase.rawQuery(SQLiteDatabase.java:1194)
  at piedogmedia.com.tweetschedular.DBAdapter.getResult(DBAdapter.java:137)
  at piedogmedia.com.tweetschedular.main.numberUpdater(main.java:357)
  at piedogmedia.com.tweetschedular.main.updater(main.java:406)
  at piedogmedia.com.tweetschedular.main.onResume(main.java:442)
  at android.app.Instrumentation.callActivityOnResume(Instrumentation.java:1149)
  at android.app.Activity.performResume(Activity.java:3763)
  at android.app.ActivityThread.performResumeActivity(ActivityThread.java:2937)
  at android.app.ActivityThread.handleResumeActivity(ActivityThread.java:2965)
  at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2516)
  at android.app.ActivityThread.access$2200(ActivityThread.java:119)
  at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1863)
  at android.os.Handler.dispatchMessage(Handler.java:99)
  at android.os.Looper.loop(Looper.java:123)
  at android.app.ActivityThread.main(ActivityThread.java:4363)
  at java.lang.reflect.Method.invokeNative(Method.java:-2)
  at java.lang.reflect.Method.invoke(Method.java:521)
  at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:860)
  at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:618)
  at dalvik.system.NativeStart.main(NativeStart.java:-2)
A: 

look here for a similar issue

KevinDTimm
Yup, sounds like you're not closing/releasing a cursor properly...Droid runs a newer version than G1 or Hero, so it may've just gotten "better" about handling resources and that's why it only surfaces there.
Ricardo Villamil
mmm have tried it on a htc desire, but have implemented the fix and shall wait to see if there are any further crash reports from the droid.
Thomas Millin