question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

NPE on bookmark while pic from explore still loading (slow internet)

See original GitHub issue

Summary: From crash report of @nicolas-raoul , seems like an easy one.

USER_COMMENT=bookmark while pic from explore still loading (slow internet)
ANDROID_VERSION=7.1.2
APP_VERSION_NAME=2.10.1.306
BRAND=google
PHONE_MODEL=Nexus 5
CUSTOM_DATA=
STACK_TRACE=java.lang.NullPointerException: Attempt to invoke virtual method 'java.lang.String fr.free.nrw.commons.bookmarks.Bookmark.getMediaName()' on a null object reference
at fr.free.nrw.commons.bookmarks.pictures.BookmarkPicturesDao.findBookmark(BookmarkPicturesDao.java:131)
at fr.free.nrw.commons.bookmarks.pictures.BookmarkPicturesDao.updateBookmark(BookmarkPicturesDao.java:72)
at fr.free.nrw.commons.media.MediaDetailPagerFragment.onOptionsItemSelected(MediaDetailPagerFragment.java:157)
at androidx.fragment.app.Fragment.performOptionsItemSelected(Fragment.java:2588)
at androidx.fragment.app.FragmentManagerImpl.dispatchOptionsItemSelected(FragmentManagerImpl.java:2704)
at androidx.fragment.app.FragmentController.dispatchOptionsItemSelected(FragmentController.java:400)
at androidx.fragment.app.FragmentActivity.onMenuItemSelected(FragmentActivity.java:377)
at androidx.appcompat.app.AppCompatActivity.onMenuItemSelected(AppCompatActivity.java:197)
at androidx.appcompat.view.WindowCallbackWrapper.onMenuItemSelected(WindowCallbackWrapper.java:109)
at androidx.appcompat.view.WindowCallbackWrapper.onMenuItemSelected(WindowCallbackWrapper.java:109)
at androidx.appcompat.app.ToolbarActionBar$2.onMenuItemClick(ToolbarActionBar.java:64)
at androidx.appcompat.widget.Toolbar$1.onMenuItemClick(Toolbar.java:204)
at androidx.appcompat.widget.ActionMenuView$MenuBuilderCallback.onMenuItemSelected(ActionMenuView.java:781)
at androidx.appcompat.view.menu.MenuBuilder.dispatchMenuItemSelected(MenuBuilder.java:840)
at androidx.appcompat.view.menu.MenuItemImpl.invoke(MenuItemImpl.java:158)
at androidx.appcompat.view.menu.MenuBuilder.performItemAction(MenuBuilder.java:991)
at androidx.appcompat.view.menu.MenuBuilder.performItemAction(MenuBuilder.java:981)
at androidx.appcompat.widget.ActionMenuView.invokeItem(ActionMenuView.java:625)
at androidx.appcompat.view.menu.ActionMenuItemView.onClick(ActionMenuItemView.java:151)
at android.view.View.performClick(View.java:5637)
at android.view.View$PerformClick.run(View.java:22433)
at android.os.Handler.handleCallback(Handler.java:751)
at android.os.Handler.dispatchMessage(Handler.java:95)
at android.os.Looper.loop(Looper.java:154)
at android.app.ActivityThread.main(ActivityThread.java:6186)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:889)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:779)

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Comments:9 (5 by maintainers)

github_iconTop GitHub Comments

1reaction
ashishkumar468commented, Mar 20, 2019

@oluwadara-abijo The issue might not reproduce on your device, but is a simple case of NPE, ie. if the bookmark object itself is null, for example in MediaDetailPagerFragment where it is initialised separately and say the method findBookmark() is called before it is initialised. IMO having a look in the function could help you fix the bug

0reactions
oluwadara-abijocommented, Mar 22, 2019

As @oluwadara-abijo was away and the fix was really small, I have raised a PR for the same (so that it could go in 2.10 hotfix release).

Okay then.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Images are showing blurred on webpages whil using slow ...
The problem is, when I am opening any webpages with a slow internet connection, the images are coming blurred. Also when I am...
Read more >
5 Best Sites to Bookmark for a Slow Internet Day - MakeUseOf
5 Best Sites to Bookmark for a Slow Internet Day · Use Gmail's HTML View · Use Facebook's Basic Mobile View · Use...
Read more >
11 Hidden Reasons Your Internet Is So Slow - Reader's Digest
If your video is lagging and downloads are taking forever, don't bang your head on your keyboard. Try these fixes to put your...
Read more >
HP PCs - Slow Internet Troubleshooting (Windows 10, 8)
This document contains instructions to restart your computer. Bookmark this page for easy reference. Testing your Internet connection speed. Use one of the ......
Read more >
Why is my internet so slow? 11 ways to speed up ... - ZDNET
Below, we explore common reasons why your internet might be slow and offer ... While many areas are only served with cable connections, ......
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found