Skip to content

IllegalStateException when closing? #833

@csabbey

Description

@csabbey

I'm getting this stack trace for a crash through Crashlytics (and in the Play Store). Very naively, it looks like this plugin is trying to close a database that isn't open when the plugin is getting destroyed.

Caused by java.lang.IllegalStateException: Cannot perform this operation because there is no current transaction.
       at android.database.sqlite.SQLiteSession.throwIfNoTransaction(SQLiteSession.java:1053)
       at android.database.sqlite.SQLiteSession.endTransaction(SQLiteSession.java:398)
       at android.database.sqlite.SQLiteDatabase.endTransaction(SQLiteDatabase.java:528)
       at io.sqlc.SQLiteAndroidDatabase.closeDatabaseNow(SourceFile:83)
       at io.sqlc.SQLitePlugin.closeDatabaseNow(SourceFile:263)
       at io.sqlc.SQLitePlugin.onDestroy(SourceFile:167)
       at org.apache.cordova.PluginManager.onDestroy(SourceFile:297)
       at org.apache.cordova.CordovaWebViewImpl.handleDestroy(SourceFile:480)
       at org.apache.cordova.CordovaActivity.onDestroy(SourceFile:315)
       at android.app.Activity.performDestroy(Activity.java:6959)
       at android.app.Instrumentation.callActivityOnDestroy(Instrumentation.java:1154)
       at android.app.ActivityThread.performDestroyActivity(ActivityThread.java:4292)
       at android.app.ActivityThread.handleDestroyActivity(ActivityThread.java:4323)
       at android.app.ActivityThread.-wrap6(ActivityThread.java)
       at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1589)
       at android.os.Handler.dispatchMessage(Handler.java:102)
       at android.os.Looper.loop(Looper.java:154)
       at android.app.ActivityThread.main(ActivityThread.java:6316)
       at java.lang.reflect.Method.invoke(Method.java)
       at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:872)
       at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:762) 

Is there something I might be doing that could cause this crash? It might just be noise, because it happens while the app is closing anyway, but I was worried this crash might block some other cleanup-on-destroy code from running.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions