Skip to content
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

IllegalStateException: attempt to acquire a reference on a close SQLiteClosable #39

Closed
johannilsson opened this issue Oct 7, 2010 · 1 comment

Comments

@johannilsson
Copy link
Owner

Stack :

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.(SQLiteProgram.java:56)
at android.database.sqlite.SQLiteQuery.(SQLiteQuery.java:49)
at android.database.sqlite.SQLiteDirectCursorDriver.query(SQLiteDirectCursorDriver.java:49)
at android.database.sqlite.SQLiteDatabase.rawQueryWithFactory(SQLiteDatabase.java:1317)
at android.database.sqlite.SQLiteDatabase.queryWithFactory(SQLiteDatabase.java:1204)
at android.database.sqlite.SQLiteDatabase.query(SQLiteDatabase.java:1162)
at com.markupartist.sthlmtraveling.provider.FavoritesDbAdapter.fetch(FavoritesDbAdapter.java:196)
at com.markupartist.sthlmtraveling.FavoriteButtonHelper.isFavorite(FavoriteButtonHelper.java:69)
at com.markupartist.sthlmtraveling.FavoriteButtonHelper.getImageResource(FavoriteButtonHelper.java:76)
at com.markupartist.sthlmtraveling.FavoriteButtonHelper.onClick(FavoriteButtonHelper.java:91)
at android.view.View.performClick(View.java:2417)
at android.view.View.onTouchEvent(View.java:4232)
at android.view.View.dispatchTouchEvent(View.java:3762)
at android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:884)
at android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:884)
at android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:884)
at android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:884)
at android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:884)
at com.android.internal.policy.impl.PhoneWindow$DecorView.superDispatchTouchEvent(PhoneWindow.java:1713)
at com.android.internal.policy.impl.PhoneWindow.superDispatchTouchEvent(PhoneWindow.java:1131)
at android.app.Activity.dispatchTouchEvent(Activity.java:2070)
at com.android.internal.policy.impl.PhoneWindow$DecorView.dispatchTouchEvent(PhoneWindow.java:1697)
at android.view.ViewRoot.handleMessage(ViewRoot.java:1691)
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(Native Method)
at java.lang.reflect.Method.invoke(Method.java:521)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:862)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:620)
at dalvik.system.NativeStart.main(Native Method)

Cause :

**** End of current Report ***

@lk95jofr
Copy link
Contributor

Det verkar som om vi tappat kopplingen innan vi använder den.
Vi måste nog göra en db.open för varje användning för att garantera att DB är öppen.

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

No branches or pull requests

2 participants