Skip to content

Crash: NullPointerException at UploadCategoriesFragment.setCategories #6240

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
nicolas-raoul opened this issue Mar 6, 2025 · 4 comments · Fixed by #6246
Closed

Crash: NullPointerException at UploadCategoriesFragment.setCategories #6240

nicolas-raoul opened this issue Mar 6, 2025 · 4 comments · Fixed by #6246
Labels

Comments

@nicolas-raoul
Copy link
Member

When uploading a set of pictures with a single depiction and catgeory (selected from history-based suggestions), crash happened just after tapping the final button of the Upload Wizard:

java.lang.NullPointerException
at fr.free.nrw.commons.upload.categories.UploadCategoriesFragment.setCategories$lambda$7$lambda$6(UploadCategoriesFragment.kt:215)
at fr.free.nrw.commons.upload.categories.UploadCategoriesFragment.$r8$lambda$owLK7FoF_b1xCizSC5b-dKgyZek(Unknown Source:0)
at fr.free.nrw.commons.upload.categories.UploadCategoriesFragment$$ExternalSyntheticLambda10.run(D8$$SyntheticClass:0)
at android.os.Handler.handleCallback(Handler.java:995)
at android.os.Handler.dispatchMessage(Handler.java:103)
at android.os.Looper.loopOnce(Looper.java:248)
at android.os.Looper.loop(Looper.java:338)
at android.app.ActivityThread.main(ActivityThread.java:8982)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:593)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:932)
@sonalyadav1
Copy link
Contributor

@nicolas-raoul I tried reproducing this issue but couldn't trigger the crash. Could you share a screen recording or any specific steps ?

@nicolas-raoul
Copy link
Member Author

It usually does not happen, I have not found steps that always trigger the crash.

@sonalyadav1
Copy link
Contributor

I made some fixes in the code to address the crash. Since the issue is not consistently reproducible, how can we verify if the fix works? Should I go ahead and create a PR?

@nicolas-raoul
Copy link
Member Author

Yes, feel free to create the pull request, thanks! 🙂

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.

2 participants