While using the Wikipedia app, a fatal crash occurred unexpectedly when I long-pressed on an image in the gallery view.
This happened during normal browsing, without any special conditions. After the crash, I tried multiple times to reproduce the issue by long-pressing different images, but I could not reproduce it.
Steps to replicate the issue (include links if applicable):
Exact steps are unknown due to the issue occurring unexpectedly, but the approximate scenario was:
- Opened an article in the Wikipedia app.
- Opened an image in gallery view.
- Long-pressed on the image.
*The app crashed immediately.
Repeated attempts to follow these steps did not reproduce the crash.
What happens?:
The app crashed and closed immediately(cannot reproduce it).
What should have happened instead?:
Long-pressing an image in gallery view should open a contextual menu or trigger the intended action without crashing.
Software version (on Special:Version page; skip for WMF-hosted wikis like Wikipedia):
Wikipedia2.7.50532
Other information (browser name/version, screenshots, etc.):
Device: Pixel 4
Android version: 14
This is a long-pressed image from back then. It seems to be an image without an indicated uploader?
Stacktrace:
FATAL EXCEPTION: main
Process: org.wikipedia.alpha, PID: 25880
java.lang.NullPointerException: null cannot be cast to non-null type kotlin.String
at org.wikipedia.gallery.GalleryActivity.onLicenseLongClick(GalleryActivity.kt:319)
at org.wikipedia.gallery.GalleryActivity.onCreate$lambda$11(GalleryActivity.kt:173)
at org.wikipedia.gallery.GalleryActivity.$r8$lambda$Wz3JuoRKNtQ72nypgU-9n5U51zc(Unknown Source:0)
at org.wikipedia.gallery.GalleryActivity$$ExternalSyntheticLambda4.onLongClick(D8$$SyntheticClass:0)
at android.view.View.performLongClickInternal(View.java:7741)
at android.view.View.performLongClick(View.java:7697)
at android.view.View.performLongClick(View.java:7715)
at android.view.View$CheckForLongPress.run(View.java:30114)
at android.os.Handler.handleCallback(Handler.java:958)
at android.os.Handler.dispatchMessage(Handler.java:99)
at android.os.Looper.loopOnce(Looper.java:205)
at android.os.Looper.loop(Looper.java:294)
at android.app.ActivityThread.main(ActivityThread.java:8177)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:552)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:971)
Please let me know if you need any additional details or specific logs to help investigate this issue.
