Crash on tapping Last Item in the Featured Fragment.
See original GitHub issueSummary:
Summarize your issue in one sentence (what goes wrong, what did you expect to happen) App crashes on clicking the last element in the featured fragment.
Steps to reproduce:
- Go to the Explore tab
- Scroll all the way down in the featured section.
- Tap on the last item.
What did you expect the app to do, and what did you see instead? No crash and the media detail fragment loaded as usual.
System logs:
java.lang.NullPointerException: Attempt to invoke virtual method 'java.lang.String fr.free.nrw.commons.Media.getThumbUrl()' on a null object reference at fr.free.nrw.commons.media.MediaDetailFragment.setupImageView(MediaDetailFragment.java:442) at fr.free.nrw.commons.media.MediaDetailFragment.setTextFields(MediaDetailFragment.java:526) at fr.free.nrw.commons.media.MediaDetailFragment.displayMediaDetails(MediaDetailFragment.java:345) at fr.free.nrw.commons.media.MediaDetailFragment.access$100(MediaDetailFragment.java:81) at fr.free.nrw.commons.media.MediaDetailFragment$1.onGlobalLayout(MediaDetailFragment.java:305) at android.view.ViewTreeObserver.dispatchOnGlobalLayout(ViewTreeObserver.java:1056) at android.view.ViewRootImpl.performTraversals(ViewRootImpl.java:2629) 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)
Device and Android version:
Nokia 6.1+ android 10.
Commons app version: Latest Master.
Would you like to work on the issue? Yes.
Issue Analytics
- State:
- Created 3 years ago
- Comments:6 (3 by maintainers)
Top GitHub Comments
@4D17Y4 Please feel free in that case. 😃
Thanks for your investigations, I will close it then. 😃