question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

App crashes on trying to upload a media from gallery.

See original GitHub issue

Summary: On selecting an item from the gallery for upload the app crashes unexpectedly.

Steps to reproduce: Try selecting a media from the gallery for upload from the floating action button.

What did you expect the app to do, and what did you see instead? The app should not crash.

System logs:

2021-02-16 02:25:03.775 20600-20600/fr.free.nrw.commons.beta E/ACRA: ACRA caught a NullPointerException for fr.free.nrw.commons.beta
    java.lang.NullPointerException: Attempt to invoke virtual method 'long java.lang.Long.longValue()' on a null object reference
        at fr.free.nrw.commons.filepicker.UploadableFile.getDateTimeFromExif(UploadableFile.java:127)
        at fr.free.nrw.commons.filepicker.UploadableFile.getFileCreatedDate(UploadableFile.java:83)
        at fr.free.nrw.commons.upload.UploadModel.createAndAddUploadItem(UploadModel.java:95)
        at fr.free.nrw.commons.upload.UploadModel.preProcessImage(UploadModel.java:84)
        at fr.free.nrw.commons.repository.UploadRepository.preProcessImage(UploadRepository.java:184)
        at fr.free.nrw.commons.upload.mediaDetails.UploadMediaPresenter.receiveImage(UploadMediaPresenter.java:83)
        at fr.free.nrw.commons.upload.mediaDetails.UploadMediaDetailFragment.init(UploadMediaDetailFragment.java:128)
        at fr.free.nrw.commons.upload.mediaDetails.UploadMediaDetailFragment.onViewCreated(UploadMediaDetailFragment.java:114)

Device and Android version:

Nokia 6.1+ android 10 stock

Commons app version: betaDebug master

Would you like to work on the issue? Yes.

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Reactions:1
  • Comments:13 (10 by maintainers)

github_iconTop GitHub Comments

3reactions
ashishkumar468commented, Feb 16, 2021

Hi @jidanni , Thanks for sharing the logs. The app usually does not crashes while performing these basic operations. The issue is related with fetching EXIF information, I will look into this and make sure the fix is rolled out asap.

2reactions
misaochancommented, Feb 17, 2021

Thanks a lot @4D17Y4 ! 😃

Read more comments on GitHub >

github_iconTop Results From Across the Web

Photos app runs slowly, crashes when I try to upload
**Reset the Photos app. 1. Press Windows key +I to open Settings. 2. Select Apps. 3. Click Microsoft Photos. 4. Click Advanced options....
Read more >
Why do apps on my phone freeze when I try to browse for an ...
Go to settings> apps> photos> storage> clear storage and cache. Then reset the phone and test this out... Report back.
Read more >
An Ultimate Guide to Fix Photos App Crashing Issue on ...
You can go to its Settings > Apps > Photos > Advanced Options and choose to Reset the app. Furthermore, you can first...
Read more >
App is crashing when we upload the image from gallery?
try this: java code: public class MainActivity extends AppCompatActivity implements View.OnClickListener { private static final int ...
Read more >
uploadBytes to storage with expo Image picker causing app to ...
I am using Expo Image picker to select an image, convert to blob, then the Firebase 9.0 SDK function uploadBytes to add the...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found