Skip to content

Bug on getting thumb URL when media is null #4529

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
neslihanturan opened this issue Jul 29, 2021 · 0 comments · Fixed by #4530
Closed

Bug on getting thumb URL when media is null #4529

neslihanturan opened this issue Jul 29, 2021 · 0 comments · Fixed by #4530
Assignees
Labels

Comments

@neslihanturan
Copy link
Collaborator

Summary:

This issue is created depending on a bug reported by some users.

System logs:

APP_VERSION_CODE=1021
APP_VERSION_NAME=3.0.2
ANDROID_VERSION=7.0
PHONE_MODEL=TECNO K7
STACK_TRACE=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:912)
at android.view.ViewRootImpl.performTraversals(ViewRootImpl.java:2437)
at android.view.ViewRootImpl.doTraversal(ViewRootImpl.java:1463)
at android.view.ViewRootImpl$TraversalRunnable.run(ViewRootImpl.java:6966)
at android.view.Choreographer$CallbackRecord.run(Choreographer.java:917)
at android.view.Choreographer.doCallbacks(Choreographer.java:715)
at android.view.Choreographer.doFrame(Choreographer.java:650)
at android.view.Choreographer$FrameDisplayEventReceiver.run(Choreographer.java:903)
at android.os.Handler.handleCallback(Handler.java:836)
at android.os.Handler.dispatchMessage(Handler.java:103)
at android.os.Looper.loop(Looper.java:203)
at android.app.ActivityThread.main(ActivityThread.java:6251)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:1063)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:924)

IS_SILENT=false
REPORT_ID=8d35e852-002f-4596-942e-9d0b4196f0f9
USER_CRASH_DATE=2021-07-15T21:36:27.848+01:00
USER_EMAIL= 

Device and Android version:

What make and model device (e.g., Samsung J7) did you encounter this on?
What Android version (e.g., Android 4.0 Ice Cream Sandwich or Android 6.0 Marshmallow) are you running?
Is it the stock version from the manufacturer or a custom ROM ?

Commons app version:

You can find this information by going to the navigation drawer in the app and tapping 'About'. If you are building from our codebase instead of downloading the app, please also mention the branch and build variant (e.g. master and prodDebug).

Screen-shots:

Can be created by pressing the Volume Down and Power Button at the same time on Android 4.0 and higher.

Would you like to work on the issue?

yes

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant