-
Notifications
You must be signed in to change notification settings - Fork 1.3k
(Android) Crash when try to close map when it is displayed in black and no tiles #4181
Conversation
@ThinkingMonkey |
Stacktrace:
|
|
This issue seems to be |
Their is |
@tmpsantos great stuff, as promised -> 🙇 |
@tmpsantos Can you rebase this on master post-#4193, using jni.hpp stuff? Thanks! |
@tmpsantos requested extra 👀 on this. Going to test on a real device (he only tested with emulator) |
I did a test with master and that produced: 3-07 17:59:40.367 2770-3163/? A/libc: Fatal signal 6 (SIGABRT), code -6 in tid 3163 (Thread-7546)
03-07 17:59:40.469 201-201/? A/DEBUG: *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** ***
03-07 17:59:40.469 201-201/? A/DEBUG: Build fingerprint: 'google/hammerhead/hammerhead:6.0/MPA44I/2172151:user/release-keys'
03-07 17:59:40.469 201-201/? A/DEBUG: Revision: '0'
03-07 17:59:40.469 201-201/? A/DEBUG: ABI: 'arm'
03-07 17:59:40.469 201-201/? A/DEBUG: pid: 2770, tid: 3163, name: Thread-7546 >>> com.mapbox.mapboxsdk.testapp <<<
03-07 17:59:40.469 201-201/? A/DEBUG: signal 6 (SIGABRT), code -6 (SI_TKILL), fault addr --------
03-07 17:59:40.504 201-201/? A/DEBUG: r0 00000000 r1 00000c5b r2 00000006 r3 9becd978
03-07 17:59:40.504 201-201/? A/DEBUG: r4 9becd980 r5 9becd930 r6 00000000 r7 0000010c
03-07 17:59:40.504 201-201/? A/DEBUG: r8 9a82b668 r9 914261c0 sl fffff484 fp 9becd3c0
03-07 17:59:40.504 201-201/? A/DEBUG: ip 00000006 sp 9becd360 lr b6cbbaf1 pc b6cbde54 cpsr 400d0010
03-07 17:59:40.519 201-201/? A/DEBUG: backtrace:
03-07 17:59:40.519 201-201/? A/DEBUG: #00 pc 00041e54 /system/lib/libc.so (tgkill+12)
03-07 17:59:40.519 201-201/? A/DEBUG: #01 pc 0003faed /system/lib/libc.so (pthread_kill+32)
03-07 17:59:40.520 201-201/? A/DEBUG: #02 pc 0001c30f /system/lib/libc.so (raise+10)
03-07 17:59:40.520 201-201/? A/DEBUG: #03 pc 000194c1 /system/lib/libc.so (__libc_android_abort+34)
03-07 17:59:40.520 201-201/? A/DEBUG: #04 pc 000174ac /system/lib/libc.so (abort+4)
03-07 17:59:40.520 201-201/? A/DEBUG: #05 pc 003f8970 /data/app/com.mapbox.mapboxsdk.testapp-2/lib/arm/libmapbox-gl.so
03-07 17:59:40.520 201-201/? A/DEBUG: #06 pc 003f8aa0 /data/app/com.mapbox.mapboxsdk.testapp-2/lib/arm/libmapbox-gl.so
03-07 17:59:40.520 201-201/? A/DEBUG: #07 pc 003e90f8 /data/app/com.mapbox.mapboxsdk.testapp-2/lib/arm/libmapbox-gl.so
03-07 17:59:40.520 201-201/? A/DEBUG: #08 pc 003e91e4 /data/app/com.mapbox.mapboxsdk.testapp-2/lib/arm/libmapbox-gl.so (std::terminate()+136)
03-07 17:59:40.520 201-201/? A/DEBUG: #09 pc 000e48e8 /data/app/com.mapbox.mapboxsdk.testapp-2/lib/arm/libmapbox-gl.so
03-07 17:59:40.620 3197-3197/? E/STIB mobile - UALib: In-App Purchase is enabled, but missing com.android.vending.billing.IMarketBillingService. Disabling...
03-07 17:59:40.620 3197-3197/? E/STIB mobile - UALib: If using Proguard, add the following lines to your proguard.cfg:
03-07 17:59:40.620 3197-3197/? E/STIB mobile - UALib: -keep class com.android.vending.billing.** I did a test with this branch and was able to produce: 03-07 18:06:14.406 4569-4611/? D/com.mapbox.mapboxsdk.http.HTTPRequest: [HTTP] Request with response code = 304: Not Modified
03-07 18:06:14.506 201-201/? A/DEBUG: *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** ***
03-07 18:06:14.506 201-201/? A/DEBUG: Build fingerprint: 'google/hammerhead/hammerhead:6.0/MPA44I/2172151:user/release-keys'
03-07 18:06:14.506 201-201/? A/DEBUG: Revision: '0'
03-07 18:06:14.506 201-201/? A/DEBUG: ABI: 'arm'
03-07 18:06:14.507 201-201/? A/DEBUG: pid: 4569, tid: 4676, name: Thread-7572 >>> com.mapbox.mapboxsdk.testapp <<<
03-07 18:06:14.507 201-201/? A/DEBUG: signal 6 (SIGABRT), code -6 (SI_TKILL), fault addr --------
03-07 18:06:14.521 201-201/? A/DEBUG: r0 00000000 r1 00001244 r2 00000006 r3 99ac3978
03-07 18:06:14.521 201-201/? A/DEBUG: r4 99ac3980 r5 99ac3930 r6 00000000 r7 0000010c
03-07 18:06:14.521 201-201/? A/DEBUG: r8 980def28 r9 9a9e5aa0 sl fffff484 fp 99ac33c8
03-07 18:06:14.521 201-201/? A/DEBUG: ip 00000006 sp 99ac3368 lr b6cbbaf1 pc b6cbde54 cpsr 400b0010
03-07 18:06:14.532 201-201/? A/DEBUG: backtrace:
03-07 18:06:14.532 201-201/? A/DEBUG: #00 pc 00041e54 /system/lib/libc.so (tgkill+12)
03-07 18:06:14.532 201-201/? A/DEBUG: #01 pc 0003faed /system/lib/libc.so (pthread_kill+32)
03-07 18:06:14.532 201-201/? A/DEBUG: #02 pc 0001c30f /system/lib/libc.so (raise+10)
03-07 18:06:14.533 201-201/? A/DEBUG: #03 pc 000194c1 /system/lib/libc.so (__libc_android_abort+34)
03-07 18:06:14.533 201-201/? A/DEBUG: #04 pc 000174ac /system/lib/libc.so (abort+4)
03-07 18:06:14.533 201-201/? A/DEBUG: #05 pc 003f1740 /data/app/com.mapbox.mapboxsdk.testapp-1/lib/arm/libmapbox-gl.so
03-07 18:06:14.533 201-201/? A/DEBUG: #06 pc 003f1870 /data/app/com.mapbox.mapboxsdk.testapp-1/lib/arm/libmapbox-gl.so
03-07 18:06:14.533 201-201/? A/DEBUG: #07 pc 003e1ec8 /data/app/com.mapbox.mapboxsdk.testapp-1/lib/arm/libmapbox-gl.so
03-07 18:06:14.533 201-201/? A/DEBUG: #08 pc 003e1fb4 /data/app/com.mapbox.mapboxsdk.testapp-1/lib/arm/libmapbox-gl.so (std::terminate()+136)
03-07 18:06:14.533 201-201/? A/DEBUG: #09 pc 000e448c /data/app/com.mapbox.mapboxsdk.testapp-1/lib/arm/libmapbox-gl.so
03-07 18:06:15.326 201-201/? A/DEBUG: Tombstone written to: /data/tombstones/tombstone_09
03-07 18:06:15.326 201-201/? E/DEBUG: AM write failed: Broken pipe Looking a the crash itself, it seems it's different than before.. for example it doesn't contain HttpContext. |
7953dcd
to
5f6cd2f
Compare
Thanks for testing, found a race condition. Patch updated. |
Until now unable to produce a crash with the typical open activity and quickly closing it 👍 |
Native will get destroyed before the Java HTTPRequest and asynchronous requests might still get answered. If the request gets canceled, we now clear the reference to the native code and it will never reach it. Lock is needed because OkHTTP replies on its own thread, so we need to guard the access to the variable we use for checking if the Request was canceled. In the future we could remove the lock and use Runnable when we move Android main loop to Looper instead of libuv. Like the other implementations of HTTPRequest on Mapbox GL Native, the request is destroyed synchronously on ::cancel().
5f6cd2f
to
fe811bd
Compare
Map is being displayed in a dialog. MapBox crashes when map is displayed in black and no tiles.
Another variation of error message displayed.
This does not get displayed that often: