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.

Crash when trying to get Image

See original GitHub issue

I am trying to run this code

ImagePicker.pickImage(RegisterActivity.this);

But the app crashes with this error

Attempt to invoke virtual method 'android.content.res.XmlResourceParser android.content.pm.ProviderInfo.loadXmlMetaData(android.content.pm.PackageManager, java.lang.String)' on a null object reference

Here is the full log if you need it

java.lang.NullPointerException: Attempt to invoke virtual method 'android.content.res.XmlResourceParser android.content.pm.ProviderInfo.loadXmlMetaData(android.content.pm.PackageManager, java.lang.String)' on a null object reference
        at android.support.v4.content.FileProvider.parsePathStrategy(FileProvider.java:604)
        at android.support.v4.content.FileProvider.getPathStrategy(FileProvider.java:578)
        at android.support.v4.content.FileProvider.getUriForFile(FileProvider.java:416)
        at com.mvc.imagepicker.ImagePicker.getPickImageIntent(ImagePicker.java:219)
        at com.mvc.imagepicker.ImagePicker.startChooser(ImagePicker.java:189)
        at com.mvc.imagepicker.ImagePicker.pickImage(ImagePicker.java:180)
        at com.mvc.imagepicker.ImagePicker.pickImage(ImagePicker.java:88)
        at com.altorumleren.food4u.modules.signin_signup.signup.RegisterActivity.showImagePicker(RegisterActivity.java:312)
        at com.altorumleren.food4u.modules.signin_signup.signup.EnterDetailsFragment.getImage(EnterDetailsFragment.java:123)
        at com.altorumleren.food4u.modules.signin_signup.signup.EnterDetailsFragment.onClick(EnterDetailsFragment.java:117)
        at android.view.View.performClick(View.java:6256)
        at android.view.View$PerformClick.run(View.java:24701)
        at android.os.Handler.handleCallback(Handler.java:789)
        at android.os.Handler.dispatchMessage(Handler.java:98)
        at android.os.Looper.loop(Looper.java:172)

Issue Analytics

  • State:open
  • Created 5 years ago
  • Reactions:3
  • Comments:7 (1 by maintainers)

github_iconTop GitHub Comments

1reaction
axpercommented, Jun 19, 2018

@git1998 Hey you are right, I was never really able to fix this issue and moved to much stabler and easier EasyImage library: https://github.com/jkwiecien/EasyImage

0reactions
songprcommented, Nov 7, 2018

@git1998 @axper try this why waiting for official fix implementation 'com.github.songpr:ImagePicker:e2b4383' I’ve been using this instead for 9 months already

Read more comments on GitHub >

github_iconTop Results From Across the Web

An Ultimate Guide to Fix Photos App Crashing Issue on ...
Is the Photos app on Windows 10/11 stuck or not working properly? Learn how to fix the Photos app crashing issue on Windows...
Read more >
Apps crash when saving images - Microsoft Community
Crashes when trying to save images in Google Chrome, Microsoft Edge and with the snipping tool. It also crashes if you open a...
Read more >
Fix Photos App Crashing Issue on Windows 10 | Stellar
If an image is not opening in the Photos app, try an alternative photo viewer. If it still doesn?t open, the image file...
Read more >
The Android app crashes when trying to upload a picture from ...
Initially I was able to get a screenshot, however the message disappeared before I could select Report, then the app crashed. However, on...
Read more >
Android app crashes as soon as i download image
you have to use AsyncTask to download image from server because your main thread can't handle it.And you are trying to download image...
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