Skip to content

Multiple Uploads crashes if user try to upload without title #1734

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 22, 2018 · 9 comments
Closed

Multiple Uploads crashes if user try to upload without title #1734

neslihanturan opened this issue Jul 22, 2018 · 9 comments

Comments

@neslihanturan
Copy link
Collaborator

neslihanturan commented Jul 22, 2018

Summary:

Try to multiple upload and click upload button without title, it crashes.

Add System logs:

E/AndroidRuntime: FATAL EXCEPTION: UploadService
                                                                         Process: fr.free.nrw.commons.debug, PID: 9875
                                                                         java.lang.NullPointerException: Attempt to invoke interface method 'int java.lang.CharSequence.length()' on a null object reference
                                                                             at java.util.regex.Matcher.reset(Matcher.java:177)
                                                                             at java.util.regex.Matcher.<init>(Matcher.java:90)
                                                                             at java.util.regex.Pattern.matcher(Pattern.java:297)
                                                                             at fr.free.nrw.commons.Utils.fixExtension(Utils.java:120)
                                                                             at fr.free.nrw.commons.upload.UploadService.uploadContribution(UploadService.java:219)
                                                                             at fr.free.nrw.commons.upload.UploadService.handle(UploadService.java:130)
                                                                             at fr.free.nrw.commons.upload.UploadService.handle(UploadService.java:40)
                                                                             at fr.free.nrw.commons.HandlerService$ServiceHandler.handleMessage(HandlerService.java:26)
                                                                             at android.os.Handler.dispatchMessage(Handler.java:102)
                                                                             at android.os.Looper.loop(Looper.java:148)
                                                                             at android.os.HandlerThread.run(HandlerThread.java:61)
07-22 17:27:18.382 1266-1266/? E/EGL_emulation: tid 1266: eglCreateSyncKHR(1881): error 0x3004 (EGL_BAD_ATTRIBUTE)
07-22 17:27:18.594 9875-9926/fr.free.nrw.commons.debug E/Surface: getSlotFromBufferLocked: unknown buffer: 0xa0612140
07-22 17:27:21.864 9875-9926/fr.free.nrw.commons.debug E/Surface: getSlotFromBufferLocked: unknown buffer: 0xa0613220

Device and Android version:
It happens on almost all devices. One is emulator API 24

Commons app version:
current master

Would you like to work on the issue?

No, if possible:)

@albendz
Copy link
Contributor

albendz commented Jul 22, 2018

I will take a look at this

@neslihanturan
Copy link
Collaborator Author

I tagged as assigned @albendz , it is yours

@Aschroet
Copy link

Same one my phone. After such a crash i even cannot start the app again and need to re-install it.

@maskaravivek
Copy link
Member

@albendz Are you working on this? :)

We are very close to a release. It would be great to have this crash fix as part of this release itself.

@albendz
Copy link
Contributor

albendz commented Jul 30, 2018

I was on vacation last week when it was assigned to me and can get started next week. When is your release? I can let you know if I can get it done by the release.

@albendz
Copy link
Contributor

albendz commented Jul 30, 2018

Question: how do you want this to behave when a user inputs a blank title? Do you want this to save with an empty name (I would not recommend this) or fail with a message of invalid title?

@albendz
Copy link
Contributor

albendz commented Jul 30, 2018

I'll have a PR today with a toast that indicates a title for the set is missing.

@albendz
Copy link
Contributor

albendz commented Jul 30, 2018

PR is up! #1769

@maskaravivek
Copy link
Member

Closing this as it was fixed by @albendz's PR.

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

No branches or pull requests

4 participants