You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Aug 8, 2023. It is now read-only.
If I add a source and layer to a map style, switch to a different style, adding the same source and layer there, and then finally, switch back to the original style I started out with, I get a pending java exception and the application crashes.
03-10 11:09:59.666 29188-29193/com.mapbox.mapboxsdk.testapp I/art: Do partial code cache collection, code=24KB, data=30KB
03-10 11:09:59.666 29188-29193/com.mapbox.mapboxsdk.testapp I/art: After code cache collection, code=21KB, data=28KB
03-10 11:09:59.666 29188-29193/com.mapbox.mapboxsdk.testapp I/art: Increasing code cache capacity to 128KB
03-10 11:09:59.675 29188-29188/com.mapbox.mapboxsdk.testapp W/art: Attempt to remove non-JNI local reference, dumping thread
03-10 11:09:59.676 29188-29188/com.mapbox.mapboxsdk.testapp A/libc: /Volumes/Android/buildbot/src/android/ndk-r13-release/external/libcxx/../../external/libcxxabi/src/abort_message.cpp:74: void abort_message(const char *, ...): assertion "terminating with uncaught exception of type jni::PendingJavaException" failed
03-10 11:09:59.677 29188-29188/com.mapbox.mapboxsdk.testapp A/libc: Fatal signal 6 (SIGABRT), code -6 in tid 29188 (pboxsdk.testapp)
[ 03-10 11:09:59.677 559: 559 W/ ]
debuggerd: handling request: pid=29188 uid=10261 gid=10261 tid=29188
03-10 11:09:59.757 29412-29412/? A/DEBUG: *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** ***
03-10 11:09:59.758 29412-29412/? A/DEBUG: Build fingerprint: 'google/sailfish/sailfish:7.1.1/NOF26V/3636322:user/release-keys'
03-10 11:09:59.758 29412-29412/? A/DEBUG: Revision: '0'
03-10 11:09:59.758 29412-29412/? A/DEBUG: ABI: 'arm'
03-10 11:09:59.758 29412-29412/? A/DEBUG: pid: 29188, tid: 29188, name: pboxsdk.testapp >>> com.mapbox.mapboxsdk.testapp <<<
03-10 11:09:59.758 29412-29412/? A/DEBUG: signal 6 (SIGABRT), code -6 (SI_TKILL), fault addr --------
03-10 11:09:59.760 29412-29412/? A/DEBUG: Abort message: '/Volumes/Android/buildbot/src/android/ndk-r13-release/external/libcxx/../../external/libcxxabi/src/abort_message.cpp:74: void abort_message(const char *, ...): assertion "terminating with uncaught exception of type jni::PendingJavaException" failed'
03-10 11:09:59.760 29412-29412/? A/DEBUG: r0 00000000 r1 00007204 r2 00000006 r3 00000008
03-10 11:09:59.760 29412-29412/? A/DEBUG: r4 f3c9458c r5 00000006 r6 f3c94534 r7 0000010c
03-10 11:09:59.760 29412-29412/? A/DEBUG: r8 00000000 r9 e4983acc sl 00000026 fp e4983a80
03-10 11:09:59.760 29412-29412/? A/DEBUG: ip 0000000b sp ffae6de8 lr f31cf5c7 pc f31d1e30 cpsr 600d0010
03-10 11:10:00.097 29412-29412/? A/DEBUG: backtrace:
03-10 11:10:00.097 29412-29412/? A/DEBUG: #00 pc 00049e30 /system/lib/libc.so (tgkill+12)
03-10 11:10:00.097 29412-29412/? A/DEBUG: #01 pc 000475c3 /system/lib/libc.so (pthread_kill+34)
03-10 11:10:00.097 29412-29412/? A/DEBUG: #02 pc 0001d635 /system/lib/libc.so (raise+10)
03-10 11:10:00.097 29412-29412/? A/DEBUG: #03 pc 00019181 /system/lib/libc.so (__libc_android_abort+34)
03-10 11:10:00.097 29412-29412/? A/DEBUG: #04 pc 00017048 /system/lib/libc.so (abort+4)
03-10 11:10:00.097 29412-29412/? A/DEBUG: #05 pc 0001b633 /system/lib/libc.so (__libc_fatal+22)
03-10 11:10:00.097 29412-29412/? A/DEBUG: #06 pc 0001937b /system/lib/libc.so (__assert2+18)
03-10 11:10:00.097 29412-29412/? A/DEBUG: #07 pc 005efc31 /data/app/com.mapbox.mapboxsdk.testapp-2/lib/arm/libmapbox-gl.so
03-10 11:10:00.097 29412-29412/? A/DEBUG: #08 pc 005efd13 /data/app/com.mapbox.mapboxsdk.testapp-2/lib/arm/libmapbox-gl.so
03-10 11:10:00.097 29412-29412/? A/DEBUG: #09 pc 005ee481 /data/app/com.mapbox.mapboxsdk.testapp-2/lib/arm/libmapbox-gl.so
03-10 11:10:00.097 29412-29412/? A/DEBUG: #10 pc 005edf45 /data/app/com.mapbox.mapboxsdk.testapp-2/lib/arm/libmapbox-gl.so (__cxa_throw+96)
03-10 11:10:00.097 29412-29412/? A/DEBUG: #11 pc 0005477f /data/app/com.mapbox.mapboxsdk.testapp-2/lib/arm/libmapbox-gl.so
03-10 11:10:00.097 29412-29412/? A/DEBUG: #12 pc 000cd439 /data/app/com.mapbox.mapboxsdk.testapp-2/lib/arm/libmapbox-gl.so
03-10 11:10:00.097 29412-29412/? A/DEBUG: #13 pc 000b3805 /data/app/com.mapbox.mapboxsdk.testapp-2/lib/arm/libmapbox-gl.so
03-10 11:10:00.097 29412-29412/? A/DEBUG: #14 pc 000b365f /data/app/com.mapbox.mapboxsdk.testapp-2/lib/arm/libmapbox-gl.so
03-10 11:10:00.097 29412-29412/? A/DEBUG: #15 pc 0012c86b /data/app/com.mapbox.mapboxsdk.testapp-2/lib/arm/libmapbox-gl.so
03-10 11:10:00.097 29412-29412/? A/DEBUG: #16 pc 00174841 /data/app/com.mapbox.mapboxsdk.testapp-2/lib/arm/libmapbox-gl.so
03-10 11:10:00.097 29412-29412/? A/DEBUG: #17 pc 00128207 /data/app/com.mapbox.mapboxsdk.testapp-2/lib/arm/libmapbox-gl.so
03-10 11:10:00.097 29412-29412/? A/DEBUG: #18 pc 0012e0a9 /data/app/com.mapbox.mapboxsdk.testapp-2/lib/arm/libmapbox-gl.so
03-10 11:10:00.097 29412-29412/? A/DEBUG: #19 pc 0012ddf1 /data/app/com.mapbox.mapboxsdk.testapp-2/lib/arm/libmapbox-gl.so
03-10 11:10:00.097 29412-29412/? A/DEBUG: #20 pc 0012dd3f /data/app/com.mapbox.mapboxsdk.testapp-2/lib/arm/libmapbox-gl.so
03-10 11:10:00.097 29412-29412/? A/DEBUG: #21 pc 00054dc1 /data/app/com.mapbox.mapboxsdk.testapp-2/lib/arm/libmapbox-gl.so
03-10 11:10:00.097 29412-29412/? A/DEBUG: #22 pc 002270e1 /data/app/com.mapbox.mapboxsdk.testapp-2/lib/arm/libmapbox-gl.so
03-10 11:10:00.097 29412-29412/? A/DEBUG: #23 pc 0022703b /data/app/com.mapbox.mapboxsdk.testapp-2/lib/arm/libmapbox-gl.so
03-10 11:10:00.097 29412-29412/? A/DEBUG: #24 pc 00226fcf /data/app/com.mapbox.mapboxsdk.testapp-2/lib/arm/libmapbox-gl.so
03-10 11:10:00.097 29412-29412/? A/DEBUG: #25 pc 00049b55 /data/app/com.mapbox.mapboxsdk.testapp-2/lib/arm/libmapbox-gl.so
03-10 11:10:00.097 29412-29412/? A/DEBUG: #26 pc 00049c31 /data/app/com.mapbox.mapboxsdk.testapp-2/lib/arm/libmapbox-gl.so
03-10 11:10:00.097 29412-29412/? A/DEBUG: #27 pc 000481c7 /data/app/com.mapbox.mapboxsdk.testapp-2/lib/arm/libmapbox-gl.so
03-10 11:10:00.097 29412-29412/? A/DEBUG: #28 pc 00011e73 /system/lib/libutils.so (_ZN7android6Looper9pollInnerEi+614)
03-10 11:10:00.097 29412-29412/? A/DEBUG: #29 pc 00011b7f /system/lib/libutils.so (_ZN7android6Looper8pollOnceEiPiS1_PPv+26)
03-10 11:10:00.097 29412-29412/? A/DEBUG: #30 pc 00093779 /system/lib/libandroid_runtime.so (_ZN7android18NativeMessageQueue8pollOnceEP7_JNIEnvP8_jobjecti+22)
03-10 11:10:00.097 29412-29412/? A/DEBUG: #31 pc 01bb091d /system/framework/arm/boot-framework.oat (offset 0x158b000) (android.os.MessageQueue.nativePollOnce+96)
03-10 11:10:00.097 29412-29412/? A/DEBUG: #32 pc 01bb1e31 /system/framework/arm/boot-framework.oat (offset 0x158b000) (android.os.MessageQueue.next+188)
03-10 11:10:00.097 29412-29412/? A/DEBUG: #33 pc 01bad6a3 /system/framework/arm/boot-framework.oat (offset 0x158b000) (android.os.Looper.loop+366)
03-10 11:10:00.097 29412-29412/? A/DEBUG: #34 pc 016113a7 /system/framework/arm/boot-framework.oat (offset 0x158b000) (android.app.ActivityThread.main+426)
03-10 11:10:00.097 29412-29412/? A/DEBUG: #35 pc 000a9941 /system/lib/libart.so (art_quick_invoke_stub_internal+64)
03-10 11:10:00.097 29412-29412/? A/DEBUG: #36 pc 00405d91 /system/lib/libart.so (art_quick_invoke_static_stub+228)
03-10 11:10:00.097 29412-29412/? A/DEBUG: #37 pc 000b0c1b /system/lib/libart.so (_ZN3art9ArtMethod6InvokeEPNS_6ThreadEPjjPNS_6JValueEPKc+178)
03-10 11:10:00.097 29412-29412/? A/DEBUG: #38 pc 00316333 /system/lib/libart.so (_ZN3artL18InvokeWithArgArrayERKNS_33ScopedObjectAccessAlreadyRunnableEPNS_9ArtMethodEPNS_8ArgArrayEPNS_6JValueEPKc+58)
03-10 11:10:00.097 29412-29412/? A/DEBUG: #39 pc 003176a7 /system/lib/libart.so (_ZN3art12InvokeMethodERKNS_33ScopedObjectAccessAlreadyRunnableEP8_jobjectS4_S4_j+766)
03-10 11:10:00.098 29412-29412/? A/DEBUG: #40 pc 002be5f1 /system/lib/libart.so (_ZN3artL13Method_invokeEP7_JNIEnvP8_jobjectS3_S3_+40)
03-10 11:10:00.098 29412-29412/? A/DEBUG: #41 pc 005adbc9 /system/framework/arm/boot.oat (offset 0x51a000) (java.lang.reflect.Method.invoke+116)
03-10 11:10:00.098 29412-29412/? A/DEBUG: #42 pc 020a0229 /system/framework/arm/boot-framework.oat (offset 0x158b000) (com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run+100)
03-10 11:10:00.098 29412-29412/? A/DEBUG: #43 pc 020a10af /system/framework/arm/boot-framework.oat (offset 0x158b000) (com.android.internal.os.ZygoteInit.main+1218)
03-10 11:10:00.098 29412-29412/? A/DEBUG: #44 pc 000a9941 /system/lib/libart.so (art_quick_invoke_stub_internal+64)
03-10 11:10:00.098 29412-29412/? A/DEBUG: #45 pc 00405d91 /system/lib/libart.so (art_quick_invoke_static_stub+228)
03-10 11:10:00.098 29412-29412/? A/DEBUG: #46 pc 000b0c1b /system/lib/libart.so (_ZN3art9ArtMethod6InvokeEPNS_6ThreadEPjjPNS_6JValueEPKc+178)
03-10 11:10:00.098 29412-29412/? A/DEBUG: #47 pc 00316333 /system/lib/libart.so (_ZN3artL18InvokeWithArgArrayERKNS_33ScopedObjectAccessAlreadyRunnableEPNS_9ArtMethodEPNS_8ArgArrayEPNS_6JValueEPKc+58)
03-10 11:10:00.098 29412-29412/? A/DEBUG: #48 pc 00316143 /system/lib/libart.so (_ZN3art17InvokeWithVarArgsERKNS_33ScopedObjectAccessAlreadyRunnableEP8_jobjectP10_jmethodIDSt9__va_list+266)
03-10 11:10:00.098 29412-29412/? A/DEBUG: #49 pc 00278b37 /system/lib/libart.so (_ZN3art3JNI21CallStaticVoidMethodVEP7_JNIEnvP7_jclassP10_jmethodIDSt9__va_list+426)
03-10 11:10:00.098 29412-29412/? A/DEBUG: #50 pc 00067d91 /system/lib/libandroid_runtime.so
03-10 11:10:00.098 29412-29412/? A/DEBUG: #51 pc 0006965f /system/lib/libandroid_runtime.so (_ZN7android14AndroidRuntime5startEPKcRKNS_6VectorINS_7String8EEEb+498)
03-10 11:10:00.098 29412-29412/? A/DEBUG: #52 pc 00001945 /system/bin/app_process32
03-10 11:10:00.098 29412-29412/? A/DEBUG: #53 pc 00016c61 /system/lib/libc.so (__libc_init+48)
03-10 11:10:00.098 29412-29412/? A/DEBUG: #54 pc 00001564 /system/bin/app_process32
and lastly, the code I am using to produce this issue:
@Override
public void onMapClick(@NonNull LatLng point) {
...
mapView.addOnMapChangedListener(new MapView.OnMapChangedListener() {
@Override
public void onMapChanged(@MapView.MapChange int change) {
if (change == MapView.DID_FINISH_LOADING_STYLE) {
addLayer();
}
}
});
}
This adds a new listener on every map click and adds the layer multiple times. You should either add it once or remove it after execution.
The reason it crashes is that the onMapChangeListener throws a RuntimeException which cannot be handled in the onMapChanged callback. Adding a pr to fix this.
If I add a source and layer to a map style, switch to a different style, adding the same source and layer there, and then finally, switch back to the original style I started out with, I get a pending java exception and the application crashes.
and lastly, the code I am using to produce this issue:
Note that to reproduce the crash, remove
if (mapboxMap.getLayer("layer") == null) {
or the source null check in the code snippet above.cc: @ivovandongen
The text was updated successfully, but these errors were encountered: