runnerup icon indicating copy to clipboard operation
runnerup copied to clipboard

Crash with IllegalStateException

Open gerhardol opened this issue 5 years ago • 3 comments

Play console has a few crashes when accessing the internal SQLite database. A few commits recently to try to get around the crashes (if they occur when shutting down for instance). A few newer is probably not occurring in such situations. 8e489d48de3c1f1517f3f79aef8009faa41cc874 ee59e805ebaea50d32291e546cacdd055fb6f30d

The crash rate is lower than before and according to Google similar to other fitness trackers (there are some activity killers that cause some of the crashes, see https://dontkillmyapp.com/), but still nice to know more.

More information needed, anyone that has deeper knowledge about SQLite here? Any way to reproduce or logcats?

illegal.txt

gerhardol avatar Aug 05 '20 10:08 gerhardol

This does not occur after ignoring the exceptions, instead #959 occurs, likely the same core problem (with a better description now, Play Console only have two levels of exceptions).

gerhardol avatar Aug 29 '20 11:08 gerhardol

A few exceptions, again, to be try-catch handled

Infinix HOT 8 Android 9 (SDK 28) 15000272

java.lang.RuntimeException: at android.app.ActivityThread.performLaunchActivity (ActivityThread.java:3013) at android.app.ActivityThread.startActivityNow (ActivityThread.java:2818) at android.app.LocalActivityManager.moveToState (LocalActivityManager.java:139) at android.app.LocalActivityManager.startActivity (LocalActivityManager.java:366) at android.widget.TabHost$IntentContentStrategy.getContentView (TabHost.java:774) at android.widget.TabHost.setCurrentTab (TabHost.java:428) at android.widget.TabHost$2.onTabSelectionChanged (TabHost.java:172) at android.widget.TabWidget$TabClickListener.onClick (TabWidget.java:562) at android.view.View.performClick (View.java:7044) at android.view.View.performClickInternal (View.java:7017) at android.view.View.access$3200 (View.java:784) at android.view.View$PerformClick.run (View.java:26596) at android.os.Handler.handleCallback (Handler.java:873) at android.os.Handler.dispatchMessage (Handler.java:99) at android.os.Looper.loop (Looper.java:193) at android.app.ActivityThread.main (ActivityThread.java:6819) at java.lang.reflect.Method.invoke (Method.java) at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run (RuntimeInit.java:497) at com.android.internal.os.ZygoteInit.main (ZygoteInit.java:912) Caused by: java.lang.IllegalStateException: at android.database.sqlite.SQLiteClosable.acquireReference (SQLiteClosable.java:55) at android.database.sqlite.SQLiteDatabase.compileStatement (SQLiteDatabase.java:1084) at org.runnerup.db.ActivityCleaner.conditionalRecompute (ActivityCleaner.java:168) at org.runnerup.view.HistoryActivity.onCreate (HistoryActivity.java:92) at android.app.Activity.performCreate (Activity.java:7136) at android.app.Activity.performCreate (Activity.java:7127) at android.app.Instrumentation.callActivityOnCreate (Instrumentation.java:1271) at android.app.ActivityThread.performLaunchActivity (ActivityThread.java:2990) at android.app.ActivityThread.startActivityNow (ActivityThread.java:2818) at android.app.LocalActivityManager.moveToState (LocalActivityManager.java:139) at android.app.LocalActivityManager.startActivity (LocalActivityManager.java:366) at android.widget.TabHost$IntentContentStrategy.getContentView (TabHost.java:774) at android.widget.TabHost.setCurrentTab (TabHost.java:428) at android.widget.TabHost$2.onTabSelectionChanged (TabHost.java:172) at android.widget.TabWidget$TabClickListener.onClick (TabWidget.java:562) at android.view.View.performClick (View.java:7044) at android.view.View.performClickInternal (View.java:7017) at android.view.View.access$3200 (View.java:784) at android.view.View$PerformClick.run (View.java:26596) at android.os.Handler.handleCallback (Handler.java:873) at android.os.Handler.dispatchMessage (Handler.java:99) at android.os.Looper.loop (Looper.java:193) at android.app.ActivityThread.main (ActivityThread.java:6819) at java.lang.reflect.Method.invoke (Method.java) at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run (RuntimeInit.java:497) at com.android.internal.os.ZygoteInit.main (ZygoteInit.java:912)

Infinix HOT 8 Android 9 (SDK 28) 15000272

java.lang.RuntimeException: at android.app.ActivityThread.performLaunchActivity (ActivityThread.java:3013) at android.app.ActivityThread.handleLaunchActivity (ActivityThread.java:3148) at android.app.servertransaction.LaunchActivityItem.execute (LaunchActivityItem.java:78) at android.app.servertransaction.TransactionExecutor.executeCallbacks (TransactionExecutor.java:108) at android.app.servertransaction.TransactionExecutor.execute (TransactionExecutor.java:68) at android.app.ActivityThread$H.handleMessage (ActivityThread.java:1861) at android.os.Handler.dispatchMessage (Handler.java:106) at android.os.Looper.loop (Looper.java:193) at android.app.ActivityThread.main (ActivityThread.java:6819) at java.lang.reflect.Method.invoke (Method.java) at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run (RuntimeInit.java:497) at com.android.internal.os.ZygoteInit.main (ZygoteInit.java:912) Caused by: java.lang.IllegalStateException: at android.database.sqlite.SQLiteClosable.acquireReference (SQLiteClosable.java:55) at android.database.sqlite.SQLiteDatabase.rawQueryWithFactory (SQLiteDatabase.java:1404) at android.database.sqlite.SQLiteDatabase.rawQuery (SQLiteDatabase.java:1347) at org.runnerup.view.ManageWorkoutsActivity.requery (ManageWorkoutsActivity.java:337) at org.runnerup.view.ManageWorkoutsActivity.onCreate (ManageWorkoutsActivity.java:129) at android.app.Activity.performCreate (Activity.java:7136) at android.app.Activity.performCreate (Activity.java:7127) at android.app.Instrumentation.callActivityOnCreate (Instrumentation.java:1271) at android.app.ActivityThread.performLaunchActivity (ActivityThread.java:2990) at android.app.ActivityThread.handleLaunchActivity (ActivityThread.java:3148) at android.app.servertransaction.LaunchActivityItem.execute (LaunchActivityItem.java:78) at android.app.servertransaction.TransactionExecutor.executeCallbacks (TransactionExecutor.java:108) at android.app.servertransaction.TransactionExecutor.execute (TransactionExecutor.java:68) at android.app.ActivityThread$H.handleMessage (ActivityThread.java:1861) at android.os.Handler.dispatchMessage (Handler.java:106) at android.os.Looper.loop (Looper.java:193) at android.app.ActivityThread.main (ActivityThread.java:6819) at java.lang.reflect.Method.invoke (Method.java) at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run (RuntimeInit.java:497) at com.android.internal.os.ZygoteInit.main (ZygoteInit.java:912)

gerhardol avatar Sep 03 '20 19:09 gerhardol

ee59e80 modified to only handle IllegalStateException in a6d243fd318cc9b12c87bf4d500ec6c4d82db469 Exceptions above handled in 6f56e14cd0291c3331ea193c498aa4331b65ce09 In 2.2.4.1

gerhardol avatar Sep 06 '20 18:09 gerhardol