mcruncher / worshipsongs-android

Android app for Worship Songs
GNU General Public License v3.0
8 stars 8 forks source link

App crash: SQLiteReadOnlyDatabaseException #579

Open sskjames opened 2 years ago

sskjames commented 2 years ago

Android version: Multiple versions (8.1, 7.1, 6.0 etc) Exception: Exception android.database.sqlite.SQLiteReadOnlyDatabaseException: attempt to write a readonly database (code 776) ################################################################# Error Code : 776 (SQLITE_READONLY_ROLLBACK) Caused By : Failed to execute ROLLBACK due to Database file was Read-Only (attempt to write a readonly database (code 776)) ################################################################# at android.database.sqlite.SQLiteConnection.nativeExecuteForCursorWindow at android.database.sqlite.SQLiteConnection.executeForCursorWindow (SQLiteConnection.java:1052) at android.database.sqlite.SQLiteSession.executeForCursorWindow (SQLiteSession.java:836) at android.database.sqlite.SQLiteQuery.fillWindow (SQLiteQuery.java:62) at android.database.sqlite.SQLiteCursor.fillWindow (SQLiteCursor.java:152) at android.database.sqlite.SQLiteCursor.getCount (SQLiteCursor.java:141) at android.database.AbstractCursor.moveToPosition (AbstractCursor.java:220) at android.database.AbstractCursor.moveToFirst (AbstractCursor.java:259) at org.worshipsongs.service.SongBookService.findSongBookNames (SongBookService.kt:62) at org.worshipsongs.service.SongBookService.findFormattedSongBookNames (SongBookService.kt:45) at org.worshipsongs.fragment.SongsFragment.showSongBook (SongsFragment.kt:335) at org.worshipsongs.fragment.SongsFragment.setViews (SongsFragment.kt:330) at org.worshipsongs.fragment.SongsFragment.setViews (SongsFragment.kt:43) at org.worshipsongs.adapter.TitleAdapter.setViews (TitleAdapter.kt:48) at org.worshipsongs.adapter.TitleAdapter.getView (TitleAdapter.kt:34) at android.widget.AbsListView.obtainView (AbsListView.java:3180) at android.widget.ListView.measureHeightOfChildren (ListView.java:1448) at android.widget.ListView.onMeasure (ListView.java:1355) at android.view.View.measure (View.java:23410) at android.widget.RelativeLayout.measureChildHorizontal (RelativeLayout.java:715) at android.widget.RelativeLayout.onMeasure (RelativeLayout.java:461) at android.view.View.measure (View.java:23410) at androidx.viewpager.widget.ViewPager.onMeasure (ViewPager.java:1638) at android.view.View.measure (View.java:23410) at android.widget.LinearLayout.measureVertical (LinearLayout.java:958) at android.widget.LinearLayout.onMeasure (LinearLayout.java:685) at android.view.View.measure (View.java:23410) at android.view.ViewGroup.measureChildWithMargins (ViewGroup.java:6967) at android.widget.FrameLayout.onMeasure (FrameLayout.java:185) at android.view.View.measure (View.java:23410) at android.widget.RelativeLayout.measureChild (RelativeLayout.java:676) at android.widget.RelativeLayout.onMeasure (RelativeLayout.java:479) at android.view.View.measure (View.java:23410) at android.view.ViewGroup.measureChildWithMargins (ViewGroup.java:6967) at android.widget.FrameLayout.onMeasure (FrameLayout.java:185) at android.view.View.measure (View.java:23410) at androidx.constraintlayout.widget.ConstraintLayout$Measurer.measure (ConstraintLayout.java:811) at androidx.constraintlayout.core.widgets.analyzer.BasicMeasure.measure (BasicMeasure.java:466) at androidx.constraintlayout.core.widgets.analyzer.BasicMeasure.measureChildren (BasicMeasure.java:134) at androidx.constraintlayout.core.widgets.analyzer.BasicMeasure.solverMeasure (BasicMeasure.java:278) at androidx.constraintlayout.core.widgets.ConstraintWidgetContainer.measure (ConstraintWidgetContainer.java:120) at androidx.constraintlayout.widget.ConstraintLayout.resolveSystem (ConstraintLayout.java:1594) at androidx.constraintlayout.widget.ConstraintLayout.onMeasure (ConstraintLayout.java:1708) at android.view.View.measure (View.java:23410) at android.view.ViewGroup.measureChildWithMargins (ViewGroup.java:6967) at androidx.coordinatorlayout.widget.CoordinatorLayout.onMeasureChild (CoordinatorLayout.java:760) at com.google.android.material.appbar.HeaderScrollingViewBehavior.onMeasureChild (HeaderScrollingViewBehavior.java:99) at com.google.android.material.appbar.AppBarLayout$ScrollingViewBehavior.onMeasureChild (AppBarLayout.java:2003) at androidx.coordinatorlayout.widget.CoordinatorLayout.onMeasure (CoordinatorLayout.java:831) at android.view.View.measure (View.java:23410) at androidx.drawerlayout.widget.DrawerLayout.onMeasure (DrawerLayout.java:1119) at android.view.View.measure (View.java:23410) at android.view.ViewGroup.measureChildWithMargins (ViewGroup.java:6967) at android.widget.FrameLayout.onMeasure (FrameLayout.java:185) at androidx.appcompat.widget.ContentFrameLayout.onMeasure (ContentFrameLayout.java:145) at android.view.View.measure (View.java:23410) at android.view.ViewGroup.measureChildWithMargins (ViewGroup.java:6967) at android.widget.LinearLayout.measureChildBeforeLayout (LinearLayout.java:1514) at android.widget.LinearLayout.measureVertical (LinearLayout.java:806) at android.widget.LinearLayout.onMeasure (LinearLayout.java:685) at android.view.View.measure (View.java:23410) at android.view.ViewGroup.measureChildWithMargins (ViewGroup.java:6967) at android.widget.FrameLayout.onMeasure (FrameLayout.java:185) at android.view.View.measure (View.java:23410) at android.view.ViewGroup.measureChildWithMargins (ViewGroup.java:6967) at android.widget.LinearLayout.measureChildBeforeLayout (LinearLayout.java:1514) at android.widget.LinearLayout.measureVertical (LinearLayout.java:806) at android.widget.LinearLayout.onMeasure (LinearLayout.java:685) at android.view.View.measure (View.java:23410) at android.view.ViewGroup.measureChildWithMargins (ViewGroup.java:6967) at android.widget.FrameLayout.onMeasure (FrameLayout.java:185) at com.android.internal.policy.DecorView.onMeasure (DecorView.java:909) at android.view.View.measure (View.java:23410) at android.view.ViewRootImpl.performMeasure (ViewRootImpl.java:3017) at android.view.ViewRootImpl.performTraversals (ViewRootImpl.java:2734) at android.view.ViewRootImpl.doTraversal (ViewRootImpl.java:1863) at android.view.ViewRootImpl$TraversalRunnable.run (ViewRootImpl.java:8072) at android.view.Choreographer$CallbackRecord.run (Choreographer.java:911) at android.view.Choreographer.doCallbacks (Choreographer.java:723) at android.view.Choreographer.doFrame (Choreographer.java:658) at android.view.Choreographer$FrameDisplayEventReceiver.run (Choreographer.java:897) at android.os.Handler.handleCallback (Handler.java:790) at android.os.Handler.dispatchMessage (Handler.java:99) at android.os.Looper.loop (Looper.java:164) at android.app.ActivityThread.main (ActivityThread.java:7000) at java.lang.reflect.Method.invoke at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run (RuntimeInit.java:441) at com.android.internal.os.ZygoteInit.main (ZygoteInit.java:1408)

sskjames commented 1 year ago

Configured the app to display the song book names below song titles and tried to see the list of songs. It works as expected. If a song is not part of any song book, the song book is not displayed, it is displayed otherwise. Couldn't recreate the problem.

sskjames commented 1 year ago

Hopefully the changes made in #595 might help resolve this issue.