HTTP exception
I got this once:
Fatal Exception: java.lang.NullPointerException: String cannot be null.
at com.mapbox.mapboxsdk.http.HTTPContext$HTTPRequest.nativeOnFailure(HTTPContext.java)
at com.mapbox.mapboxsdk.http.HTTPContext$HTTPRequest.onFailure(HTTPContext.java:92)
at com.mapbox.mapboxsdk.http.HTTPContext$HTTPRequest.onResponse(HTTPContext.java:103)
at com.squareup.okhttp.Call$AsyncCall.execute(Call.java:168)
at com.squareup.okhttp.internal.NamedRunnable.run(NamedRunnable.java:33)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1112)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:587)
at java.lang.Thread.run(Thread.java:818)
@ljbade, @zugaldia:
Is this something that will be resolved with the refactor for offline or needs to investigated further?
This definitely looks like something that will be addressed once https://github.com/mapbox/mapbox-gl-native/issues/2400 gets merged. Worth re-testing the code with those changes.
@zugaldia If I recall you found the same crash? We added a null check to JNI for that.
@ljbade That's correct.
I was not able to reproduce this error and seeing the discussion above between @zugaldia and @ljbade. I'm calling this resolved for now. Reopen if this occurs again.
Also, worth mentioning that we recently landed some better HTTP log messages to help debug these issues: https://github.com/mapbox/mapbox-gl-native/commit/d2b2336a9efc00978950cd3ee9d4d0af6ad7f1bf
@tobrun It occured after I upgrade to version 3.0.0. And it happened many time when network doesn't stable.
01-19 16:52:43.698 30050-30146/? D/com.mapbox.mapboxsdk.http.HTTPContext$HTTPRequest: onFailure: null
01-19 16:52:43.709 30050-30126/? E/mbgl: {Map}[Setup]: loading style failed:
01-19 16:52:43.732 30050-30146/? E/AndroidRuntime: FATAL EXCEPTION: OkHttp Dispatcher
Process: com.myapp, PID: 30050
java.lang.NullPointerException: String cannot be null.
at com.mapbox.mapboxsdk.http.HTTPContext$HTTPRequest.nativeOnFailure(Native Method)
at com.mapbox.mapboxsdk.http.HTTPContext$HTTPRequest.onFailure(HTTPContext.java:94)
at com.mapbox.mapboxsdk.http.HTTPContext$HTTPRequest.onResponse(HTTPContext.java:105)
at com.squareup.okhttp.Call$AsyncCall.execute(Call.java:168)
at com.squareup.okhttp.internal.NamedRunnable.run(NamedRunnable.java:33)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1113)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:588)
at java.lang.Thread.run(Thread.java:818)
@vfaSonnt thank you for reaching out and reporting your problem. This problem you are mentioning and the problem described here are a bit different. We are going to test/patch/fix your problem in https://github.com/mapbox/mapbox-gl-native/issues/3465.
@tobrun does this https://github.com/mapbox/mapbox-gl-native/issues/3692 is same with my problem?
@vfaSonnt: I believe it is the same
Thank you very much.