[Bug]: Crash on Bookmarks > Items and Bookmarks > Location tabs
See original GitHub issueSummary
App crashes in the Items and Location tabs of Bookmarks.
Steps to reproduce
- Go to Bookmarks
- Go to Items or Locations tab
Expected behaviour
The relevant fragment should load
Actual behaviour
App crashes
Device name
Samsung Galaxy S20 FE
Android version
Android 11
Commons app version
4.0-release and master, prodRelease build variant
Device logs
android.database.sqlite.SQLiteException: no such table: bookmarksItems (code 1 SQLITE_ERROR[1]): , while compiling: SELECT item_name, item_description, item_image_url, item_instance_of, item_name_categories, item_description_categories, item_thumbnail_categories, item_is_selected, item_id FROM bookmarksItems
at android.database.sqlite.SQLiteConnection.nativePrepareStatement(Native Method)
at android.database.sqlite.SQLiteConnection.acquirePreparedStatement(SQLiteConnection.java:1463)
at android.database.sqlite.SQLiteConnection.prepare(SQLiteConnection.java:901)
at android.database.sqlite.SQLiteSession.prepare(SQLiteSession.java:590)
at android.database.sqlite.SQLiteProgram.<init>(SQLiteProgram.java:62)
at android.database.sqlite.SQLiteQuery.<init>(SQLiteQuery.java:37)
at android.database.sqlite.SQLiteDirectCursorDriver.query(SQLiteDirectCursorDriver.java:46)
at android.database.sqlite.SQLiteDatabase.rawQueryWithFactory(SQLiteDatabase.java:2063)
at android.database.sqlite.SQLiteQueryBuilder.query(SQLiteQueryBuilder.java:592)
at android.database.sqlite.SQLiteQueryBuilder.query(SQLiteQueryBuilder.java:463)
at fr.free.nrw.commons.bookmarks.items.BookmarkItemsContentProvider.query(BookmarkItemsContentProvider.java:59)
at android.content.ContentProvider.query(ContentProvider.java:1420)
at android.content.ContentProvider.query(ContentProvider.java:1516)
at android.content.ContentProvider$Transport.query(ContentProvider.java:278)
at android.content.ContentProviderClient.query(ContentProviderClient.java:197)
at android.content.ContentProviderClient.query(ContentProviderClient.java:179)
at android.content.ContentProviderClient.query(ContentProviderClient.java:169)
at fr.free.nrw.commons.bookmarks.items.BookmarkItemsDao.getAllBookmarksItems(BookmarkItemsDao.java:41)
at fr.free.nrw.commons.bookmarks.items.BookmarkItemsController.loadFavoritesItems(BookmarkItemsController.java:25)
at fr.free.nrw.commons.bookmarks.items.BookmarkItemsFragment.initList(BookmarkItemsFragment.java:78)
at fr.free.nrw.commons.bookmarks.items.BookmarkItemsFragment.onViewCreated(BookmarkItemsFragment.java:64)
at androidx.fragment.app.FragmentStateManager.createView(FragmentStateManager.java:322)
at androidx.fragment.app.FragmentManager.moveToState(FragmentManager.java:1185)
at androidx.fragment.app.FragmentManager.moveToState(FragmentManager.java:1354)
at androidx.fragment.app.FragmentManager.moveFragmentToExpectedState(FragmentManager.java:1432)
at androidx.fragment.app.FragmentManager.moveToState(FragmentManager.java:1495)
at androidx.fragment.app.FragmentManager.dispatchStateChange(FragmentManager.java:2617)
at androidx.fragment.app.FragmentManager.dispatchActivityCreated(FragmentManager.java:2569)
at androidx.fragment.app.Fragment.performActivityCreated(Fragment.java:2722)
at androidx.fragment.app.FragmentStateManager.activityCreated(FragmentStateManager.java:336)
at androidx.fragment.app.FragmentManager.moveToState(FragmentManager.java:1186)
at androidx.fragment.app.FragmentManager.moveToState(FragmentManager.java:1354)
at androidx.fragment.app.FragmentManager.moveFragmentToExpectedState(FragmentManager.java:1432)
at androidx.fragment.app.FragmentManager.moveToState(FragmentManager.java:1495)
at androidx.fragment.app.BackStackRecord.executeOps(BackStackRecord.java:447)
at androidx.fragment.app.FragmentManager.executeOps(FragmentManager.java:2167)
at androidx.fragment.app.FragmentManager.executeOpsTogether(FragmentManager.java:1990)
at androidx.fragment.app.FragmentManager.removeRedundantOperationsAndExecute(FragmentManager.java:1945)
at androidx.fragment.app.FragmentManager.execSingleAction(FragmentManager.java:1816)
at androidx.fragment.app.BackStackRecord.commitNowAllowingStateLoss(BackStackRecord.java:303)
at androidx.fragment.app.FragmentPagerAdapter.finishUpdate(FragmentPagerAdapter.java:238)
at androidx.viewpager.widget.ViewPager.populate(ViewPager.java:1244)
at androidx.viewpager.widget.ViewPager.setCurrentItemInternal(ViewPager.java:669)
at androidx.viewpager.widget.ViewPager.setCurrentItemInternal(ViewPager.java:631)
at androidx.viewpager.widget.ViewPager.setCurrentItem(ViewPager.java:612)
at com.google.android.material.tabs.TabLayout$ViewPagerOnTabSelectedListener.onTabSelected(TabLayout.java:3016)
at com.google.android.material.tabs.TabLayout.dispatchTabSelected(TabLayout.java:1756)
at com.google.android.material.tabs.TabLayout.selectTab(TabLayout.java:1749)
at com.google.android.material.tabs.TabLayout.selectTab(TabLayout.java:1709)
at com.google.android.material.tabs.TabLayout$Tab.select(TabLayout.java:2054)
at com.google.android.material.tabs.TabLayout$TabView.performClick(TabLayout.java:2239)
at android.view.View.performClickInternal(View.java:8137)
at android.view.View.access$3700(View.java:888)
at android.view.View$PerformClick.run(View.java:30236)
at android.os.Handler.handleCallback(Handler.java:938)
at android.os.Handler.dispatchMessage(Handler.java:99)
at android.os.Looper.loop(Looper.java:246)
at android.app.ActivityThread.main(ActivityThread.java:8512)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:602)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1130)
Screen-shots
No response
Would you like to work on the issue?
No response
Issue Analytics
- State:
- Created a year ago
- Comments:7 (6 by maintainers)
Top Results From Across the Web
Why do former tab bar folders crash Chrome? - Google Support
Have my bookmark bar set with several folders with links inside them. Left click to drop a menu of links down. Doing this...
Read more >334868 - Crash/freeze after scrolling in bookmarks list - Monorail
Chrome froze when I started to scroll through a bookmark folder. I force-closed Chrome and restarted it tried scrolling again and the same...
Read more >Safari crashes unless I delete bookmarks - Apple Developer
Since yesterday Safari has been crashing after it opens. I went to the Library folder and deleted everything in the Safari folder and...
Read more >Google Chrome 95 crashing while opening Bookmark folder ...
It seems that Google Chrome is crashing while opening a Bookmark folder using left click after the latest v95 update. But, is a...
Read more >Fix "The bookmarks and history system will not be functional ...
This error happens when a database file that stores bookmarks and browsing history (places.sqlite) and related site icons (favicons.sqlite) can't be ...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
@misaochan I think this is happening because a new table was created in the codebase. When users update the app with the new version of the codebase, they don’t have the table created inside the local database. Now when the code wants values from the table as per the new code app can’t find any table named such and shows the error. As
onCreate()
fromSQLiteOpenHelper
is called only when the app is installed the first time, restarting the app callsonCreate()
and the new table was created as per the new code. I hope incrementing the database version will work in this case.Fixed in #4956