Skip to content
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

java.lang.NullPointerException: Attempt to invoke virtual method 'android.graphics.Bitmap$Config android.graphics.Bitmap.getConfig()' on a null object reference #628

Closed
vchernetsky opened this issue Sep 8, 2021 · 1 comment
Labels
bug 🪲 Something isn't working

Comments

@vchernetsky
Copy link

vchernetsky commented Sep 8, 2021

Hello,

We have this crash on Android that uses MapBox SDK. The crash seems to be happening for one of the clients that is located in Chile. They are browsing the maps around Chile region. None of our code seems to be involved. Do you have any idea what may be causing it?

Environment

  • Android OS version: Android 10, 11
  • Devices affected: all the android phones we tried
  • Maps SDK Version: com.mapbox.mapboxsdk:mapbox-android-sdk:9.6.2

Observed behavior and steps to reproduce

2021-09-08 11:05:46.659 14769-16937/com.amigocloud.amigomobile E/AndroidRuntime: FATAL EXCEPTION: AsyncTask #2
Process: com.amigocloud.amigomobile, PID: 14769
java.lang.RuntimeException: An error occurred while executing doInBackground()
at android.os.AsyncTask$4.done(AsyncTask.java:399)
at java.util.concurrent.FutureTask.finishCompletion(FutureTask.java:383)
at java.util.concurrent.FutureTask.setException(FutureTask.java:252)
at java.util.concurrent.FutureTask.run(FutureTask.java:271)
at android.os.AsyncTask$SerialExecutor$1.run(AsyncTask.java:289)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1167)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:641)
at java.lang.Thread.run(Thread.java:919)
Caused by: java.lang.NullPointerException: Attempt to invoke virtual method 'android.graphics.Bitmap$Config android.graphics.Bitmap.getConfig()' on a null object reference
at com.mapbox.mapboxsdk.maps.Style.toImage(Style.java:1357)
at com.mapbox.mapboxsdk.maps.Style$BitmapImageConversionTask.doInBackground(Style.java:1401)
at com.mapbox.mapboxsdk.maps.Style$BitmapImageConversionTask.doInBackground(Style.java:1388)
at android.os.AsyncTask$3.call(AsyncTask.java:378)
at java.util.concurrent.FutureTask.run(FutureTask.java:266)
at android.os.AsyncTask$SerialExecutor$1.run(AsyncTask.java:289) 
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1167) 
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:641) 
at java.lang.Thread.run(Thread.java:919) 

Expected behavior

not to crash

Notes / preliminary analysis

Additional links and references

@vchernetsky vchernetsky added the bug 🪲 Something isn't working label Sep 8, 2021
@vchernetsky
Copy link
Author

Nevermind, found the problem.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug 🪲 Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant