Apps-android-commons: Attempting to open Bookmarks crashes app

Created on 30 Dec 2020  路  10Comments  路  Source: commons-app/apps-android-commons

Summary:

Attempting to open Bookmarks crashes app

Steps to reproduce:

-Open sidebar menu
-Click "Bookmarks"
-Crash

This may or may not be relevant, but I do not believe that I have any bookmarks.

System logs:
Log txt

Device and Android version:
API level: 30
Android version: 11
Device manufacturer: Google
Device model: Pixel 4a
Device: sunfish
Network type: wifi

I am running the stock OS from the manufacturer.

Commons app version:

2.13.2~757c7b008

Would you like to work on the issue?

No.

bug

Most helpful comment

Hey @mrudultora,
I've examined this bug on the master and someone in recent commits fixed the issue.
Furthermore, I see that your fork is some commits behind the latest master.
U can update your fork and then if the bug still persists you can open a new issue 馃槃.

And if this was tested on an updated clone then never mind, open a new issue and start working as soon as you're assigned.

Thanks.

All 10 comments

I think its a device specific issue. I am using Realme 3 pro (Android 10) its working perfectly fine.
Try pulling the repo and ensure your app is up to date. If still the problem persists just screen record it and post it here. : )

Bookmarks are not in the sidebar menu anymore.
I don't have any bookmark either, and it does not crash, maybe it was fixed already?
In any case would you mind switching to the alpha version, to see whether it happens with it too? Thanks a lot for your feedback!

And thanks @Saral-code for helping others :-)

Hey,
I had this issue today while working on other bug, although as @Saral-code and @nicolas-raoul said we can't reproduce it as it happens only at certain times.

As far as I can remember it was regarding some SQL error and said the entry doesn't exist, similar to the one in #4141
Thanks.

Thanks for the feedback!
If anyone could find steps to reliably reproduce the crash, that would be wonderful :-)

2021-01-21 18:13:03.161 9495-9495/fr.free.nrw.commons.beta E/SQLiteLog: (1) no such table: bookmarksLocations
2021-01-21 18:13:03.164 9495-9495/fr.free.nrw.commons.beta E/AndroidRuntime: FATAL EXCEPTION: main
Process: fr.free.nrw.commons.beta, PID: 9495
android.database.sqlite.SQLiteException: no such table: bookmarksLocations (code 1 SQLITE_ERROR): , while compiling: SELECT location_name, location_description, location_category, location_label_text, location_label_icon, location_lat, location_long, location_image_url, location_wikipedia_link, location_wikidata_link, location_commons_link, location_pic, location_destroyed FROM bookmarksLocations
at android.database.sqlite.SQLiteConnection.nativePrepareStatement(Native Method)
at android.database.sqlite.SQLiteConnection.acquirePreparedStatement(SQLiteConnection.java:986)
at android.database.sqlite.SQLiteConnection.prepare(SQLiteConnection.java:593)
at android.database.sqlite.SQLiteSession.prepare(SQLiteSession.java:590)
at android.database.sqlite.SQLiteProgram.(SQLiteProgram.java:61)
at android.database.sqlite.SQLiteQuery.(SQLiteQuery.java:37)
at android.database.sqlite.SQLiteDirectCursorDriver.query(SQLiteDirectCursorDriver.java:46)
at android.database.sqlite.SQLiteDatabase.rawQueryWithFactory(SQLiteDatabase.java:1443)
at android.database.sqlite.SQLiteQueryBuilder.query(SQLiteQueryBuilder.java:604)
at android.database.sqlite.SQLiteQueryBuilder.query(SQLiteQueryBuilder.java:475)
at fr.free.nrw.commons.bookmarks.locations.BookmarkLocationsContentProvider.query(BookmarkLocationsContentProvider.java:61)
at android.content.ContentProvider.query(ContentProvider.java:1227)
at android.content.ContentProvider.query(ContentProvider.java:1320)
at android.content.ContentProvider$Transport.query(ContentProvider.java:280)
at android.content.ContentProviderClient.query(ContentProviderClient.java:195)
at android.content.ContentProviderClient.query(ContentProviderClient.java:177)
at android.content.ContentProviderClient.query(ContentProviderClient.java:167)
at fr.free.nrw.commons.bookmarks.locations.BookmarkLocationsDao.getAllBookmarksLocations(BookmarkLocationsDao.java:48)
at fr.free.nrw.commons.bookmarks.locations.BookmarkLocationsController.loadFavoritesLocations(BookmarkLocationsController.java:24)
at fr.free.nrw.commons.bookmarks.locations.BookmarkLocationsFragment.initList(BookmarkLocationsFragment.java:85)
at fr.free.nrw.commons.bookmarks.locations.BookmarkLocationsFragment.onResume(BookmarkLocationsFragment.java:78)
at androidx.fragment.app.Fragment.performResume(Fragment.java:2747)
at androidx.fragment.app.FragmentStateManager.resume(FragmentStateManager.java:363)
at androidx.fragment.app.FragmentManager.moveToState(FragmentManager.java:1197)
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.dispatchResume(FragmentManager.java:2581)
at androidx.fragment.app.Fragment.performResume(Fragment.java:2756)
at androidx.fragment.app.FragmentStateManager.resume(FragmentStateManager.java:363)
at androidx.fragment.app.FragmentManager.moveToState(FragmentManager.java:1197)
at androidx.fragment.app.FragmentManager.performPendingDeferredStart(FragmentManager.java:1109)
at androidx.fragment.app.FragmentManager.startPendingDeferredFragments(FragmentManager.java:1517)
at androidx.fragment.app.FragmentManager.doPendingDeferredStart(FragmentManager.java:2285)
at androidx.fragment.app.FragmentManager.execSingleAction(FragmentManager.java:1823)
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.populate(ViewPager.java:1092)
2021-01-21 18:13:03.165 9495-9495/fr.free.nrw.commons.beta E/AndroidRuntime: at androidx.viewpager.widget.ViewPager.onMeasure(ViewPager.java:1622)
at android.view.View.measure(View.java:24534)
at android.widget.RelativeLayout.measureChildHorizontal(RelativeLayout.java:735)
at android.widget.RelativeLayout.onMeasure(RelativeLayout.java:481)
at android.view.View.measure(View.java:24534)
at android.view.ViewGroup.measureChildWithMargins(ViewGroup.java:6828)
at android.widget.FrameLayout.onMeasure(FrameLayout.java:194)
at android.view.View.measure(View.java:24534)
at android.widget.RelativeLayout.measureChildHorizontal(RelativeLayout.java:735)
at android.widget.RelativeLayout.onMeasure(RelativeLayout.java:481)
at android.view.View.measure(View.java:24534)
at android.view.ViewGroup.measureChildWithMargins(ViewGroup.java:6828)
at android.widget.LinearLayout.measureChildBeforeLayout(LinearLayout.java:1552)
at android.widget.LinearLayout.measureVertical(LinearLayout.java:842)
at android.widget.LinearLayout.onMeasure(LinearLayout.java:721)
at android.view.View.measure(View.java:24534)
at android.view.ViewGroup.measureChildWithMargins(ViewGroup.java:6828)
at android.widget.FrameLayout.onMeasure(FrameLayout.java:194)
at androidx.appcompat.widget.ContentFrameLayout.onMeasure(ContentFrameLayout.java:143)
at android.view.View.measure(View.java:24534)
at android.view.ViewGroup.measureChildWithMargins(ViewGroup.java:6828)
at android.widget.LinearLayout.measureChildBeforeLayout(LinearLayout.java:1552)
at android.widget.LinearLayout.measureVertical(LinearLayout.java:842)
at android.widget.LinearLayout.onMeasure(LinearLayout.java:721)
at android.view.View.measure(View.java:24534)
at android.view.ViewGroup.measureChildWithMargins(ViewGroup.java:6828)
at android.widget.FrameLayout.onMeasure(FrameLayout.java:194)
at android.view.View.measure(View.java:24534)
at android.view.ViewGroup.measureChildWithMargins(ViewGroup.java:6828)
at android.widget.LinearLayout.measureChildBeforeLayout(LinearLayout.java:1552)
at android.widget.LinearLayout.measureVertical(LinearLayout.java:842)
at android.widget.LinearLayout.onMeasure(LinearLayout.java:721)
at android.view.View.measure(View.java:24534)
at android.view.ViewGroup.measureChildWithMargins(ViewGroup.java:6828)
at android.widget.FrameLayout.onMeasure(FrameLayout.java:194)
at com.android.internal.policy.DecorView.onMeasure(DecorView.java:742)
at android.view.View.measure(View.java:24534)
at android.view.ViewRootImpl.performMeasure(ViewRootImpl.java:3007)
at android.view.ViewRootImpl.measureHierarchy(ViewRootImpl.java:1834)
at android.view.ViewRootImpl.performTraversals(ViewRootImpl.java:2123)
at android.view.ViewRootImpl.doTraversal(ViewRootImpl.java:1722)
at android.view.ViewRootImpl$TraversalRunnable.run(ViewRootImpl.java:7605)
at android.view.Choreographer$CallbackRecord.run(Choreographer.java:1041)
at android.view.Choreographer.doCallbacks(Choreographer.java:864)
at android.view.Choreographer.doFrame(Choreographer.java:799)
at android.view.Choreographer$FrameDisplayEventReceiver.run(Choreographer.java:1026)
at android.os.Handler.handleCallback(Handler.java:883)
at android.os.Handler.dispatchMessage(Handler.java:100)
at android.os.Looper.loop(Looper.java:214)
at android.app.ActivityThread.main(ActivityThread.java:7397)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:492)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:935)

Crash log.

I was logging in and out multiple times to test a bug and the bookmarks crashed.
Nearby is unusable too.

Thanks.

@nicolas-raoul I am able to produce this. My logs are different from @4D17Y4 . I am attaching only the relevant logs.

2021-02-13 12:22:53.623 32617-32617/fr.free.nrw.commons.beta E/AndroidRuntime: FATAL EXCEPTION: main
Process: fr.free.nrw.commons.beta, PID: 32617
java.lang.NullPointerException: Attempt to invoke virtual method 'boolean fr.free.nrw.commons.media.MediaDetailPagerFragment.isVisible()' on a null object reference
at fr.free.nrw.commons.bookmarks.BookmarkListRootFragment.backPressed(BookmarkListRootFragment.java:175)
at fr.free.nrw.commons.bookmarks.BookmarkFragment.onBackPressed(BookmarkFragment.java:77)
at fr.free.nrw.commons.contributions.MainActivity.onBackPressed(MainActivity.java:250)

Yes, @mrudultora
They seem totally different.
It's just that I'm currently working on a bug in the Bookmark fragment and I can't seem to reproduce this issue on the latest master.
Can u check if you are testing this on the current master?

Thx.

@4D17Y4 I am on the current master. I think the problem faced by me can be opened as a new issue.

Hey @mrudultora,
I've examined this bug on the master and someone in recent commits fixed the issue.
Furthermore, I see that your fork is some commits behind the latest master.
U can update your fork and then if the bug still persists you can open a new issue 馃槃.

And if this was tested on an updated clone then never mind, open a new issue and start working as soon as you're assigned.

Thanks.

Closing this as the initial issue seems solved.
Anyone please create a new issue if you experience any such problem on the latest master or with Play Store's alpha version.
Thanks all! :-)

Was this page helpful?
0 / 5 - 0 ratings

Related issues

jidanni picture jidanni  路  3Comments

nicolas-raoul picture nicolas-raoul  路  4Comments

misaochan picture misaochan  路  4Comments

neslihanturan picture neslihanturan  路  3Comments

domdomegg picture domdomegg  路  3Comments