mapbox / mapbox-maps-android

Interactive, thoroughly customizable maps in native Android powered by vector tiles and OpenGL.
https://www.mapbox.com/mobile-maps-sdk
Other
476 stars 133 forks source link

Snapshot crash on Samsung devices running Android 14 #2280

Closed deRonbrown closed 6 months ago

deRonbrown commented 9 months ago

Environment

Observed behavior and steps to reproduce

When taking a snapshot of a MapView, the app crashes with a native crash with the following stacktrace:

02-16 18:54:28.161  3425  3425 F DEBUG   : *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** ***
02-16 18:54:28.161  3425  3425 F DEBUG   : Build fingerprint: 'samsung/e3qxeea/e3q:14/UP1A.231005.007/S928BXXU1AWM9:user/release-keys'
02-16 18:54:28.161  3425  3425 F DEBUG   : Revision: '9'
02-16 18:54:28.161  3425  3425 F DEBUG   : ABI: 'arm64'
02-16 18:54:28.161  3425  3425 F DEBUG   : Processor: '2'
02-16 18:54:28.161  3425  3425 F DEBUG   : Timestamp: 2024-02-16 18:54:28.010329930+0100
02-16 18:54:28.161  3425  3425 F DEBUG   : Process uptime: 20s
02-16 18:54:28.161  3425  3425 F DEBUG   : Cmdline: com.consumedbycode.slopes.dev
02-16 18:54:28.161  3425  3425 F DEBUG   : pid: 2821, tid: 3364, name: MapboxRenderThr  >>> com.consumedbycode.slopes.dev <<<
02-16 18:54:28.161  3425  3425 F DEBUG   : uid: 10335
02-16 18:54:28.161  3425  3425 F DEBUG   : tagged_addr_ctrl: 0000000000000001 (PR_TAGGED_ADDR_ENABLE)
02-16 18:54:28.161  3425  3425 F DEBUG   : pac_enabled_keys: 000000000000000f (PR_PAC_APIAKEY, PR_PAC_APIBKEY, PR_PAC_APDAKEY, PR_PAC_APDBKEY)
02-16 18:54:28.161  3425  3425 F DEBUG   : signal 11 (SIGSEGV), code 2 (SEGV_ACCERR), fault addr 0x0000006c2493e000
02-16 18:54:28.161  3425  3425 F DEBUG   :     x0  b400006c247d0600  x1  0000006c2493df80  x2  00000000000009f0  x3  b400006c2493d580
02-16 18:54:28.161  3425  3425 F DEBUG   :     x4  0000006c2493ea00  x5  b400006c2493e000  x6  7466696853657a69  x7  0000006d10ffebf9
02-16 18:54:28.161  3425  3425 F DEBUG   :     x8  0000000000000001  x9  0000000000000001  x10 000000000016da00  x11 0000000000000384
02-16 18:54:28.161  3425  3425 F DEBUG   :     x12 0000000000000e10  x13 0000000000000001  x14 0000000000000000  x15 00000000ebad6a89
02-16 18:54:28.161  3425  3425 F DEBUG   :     x16 000000701b944798  x17 0000007030c84280  x18 0000006c6a6da000  x19 0000006c247d1000
02-16 18:54:28.161  3425  3425 F DEBUG   :     x20 b400006ef82e6810  x21 b400006c247d0600  x22 0000006cfd8fa000  x23 0000006cfd8f4480
02-16 18:54:28.161  3425  3425 F DEBUG   :     x24 0000006d11d14780  x25 0000006cfd8f4648  x26 0000000050380001  x27 000000000000002c
02-16 18:54:28.161  3425  3425 F DEBUG   :     x28 0000006cfd8f4540  x29 0000006cfd8f44f0
02-16 18:54:28.161  3425  3425 F DEBUG   :     lr  000000701b1cda78  sp  0000006cfd8f4480  pc  0000007030c84394  pst 0000000020001000
02-16 18:54:28.161  3425  3425 F DEBUG   : 99 total frames
02-16 18:54:28.161  3425  3425 F DEBUG   : backtrace:
02-16 18:54:28.161  3425  3425 F DEBUG   :       #00 pc 0000000000054394  /apex/com.android.runtime/lib64/bionic/libc.so (__memcpy_aarch64_simd+276) (BuildId: 37f537c2ba9dcbb262a0a68f41a21da4)
02-16 18:54:28.161  3425  3425 F DEBUG   :       #01 pc 00000000004b4a74  /system/lib64/libhwui.so (Bitmap_copyPixelsFromBuffer(_JNIEnv*, _jobject*, long, _jobject*) (.__uniq.22137780384205925829283086506072032936)+164) (BuildId: eaace3d9a0b000544c09897781826eac)
02-16 18:54:28.161  3425  3425 F DEBUG   :       #02 pc 0000000000371e30  /apex/com.android.art/lib64/libart.so (art_quick_generic_jni_trampoline+144) (BuildId: 4427adefbdfb23059a45e82bebdaa2dc)
02-16 18:54:28.161  3425  3425 F DEBUG   :       #03 pc 000000000058a99c  /apex/com.android.art/lib64/libart.so (nterp_helper+1948) (BuildId: 4427adefbdfb23059a45e82bebdaa2dc)
02-16 18:54:28.161  3425  3425 F DEBUG   :       #04 pc 000000000044d7ea  /system/framework/framework.jar (android.graphics.Bitmap.copyPixelsFromBuffer+90)
02-16 18:54:28.161  3425  3425 F DEBUG   :       #05 pc 000000000035b3a4  /apex/com.android.art/lib64/libart.so (art_quick_invoke_stub+612) (BuildId: 4427adefbdfb23059a45e82bebdaa2dc)
02-16 18:54:28.161  3425  3425 F DEBUG   :       #06 pc 00000000004905a0  /apex/com.android.art/lib64/libart.so (bool art::interpreter::DoCall<false>(art::ArtMethod*, art::Thread*, art::ShadowFrame&, art::Instruction const*, unsigned short, bool, art::JValue*)+1248) (BuildId: 4427adefbdfb23059a45e82bebdaa2dc)
02-16 18:54:28.161  3425  3425 F DEBUG   :       #07 pc 000000000050a360  /apex/com.android.art/lib64/libart.so (void art::interpreter::ExecuteSwitchImplCpp<false>(art::interpreter::SwitchImplContext*)+780) (BuildId: 4427adefbdfb23059a45e82bebdaa2dc)
02-16 18:54:28.161  3425  3425 F DEBUG   :       #08 pc 00000000003745d8  /apex/com.android.art/lib64/libart.so (ExecuteSwitchImplAsm+8) (BuildId: 4427adefbdfb23059a45e82bebdaa2dc)
02-16 18:54:28.161  3425  3425 F DEBUG   :       #09 pc 00000000028f374c  /data/app/~~hny2tF_yhou7HYvOR3Dv7g==/com.consumedbycode.slopes.dev-WjjcJISy2kbX8hWgApwOiQ==/oat/arm64/base.vdex (com.mapbox.maps.renderer.MapboxRenderer.performSnapshot+0)
02-16 18:54:28.161  3425  3425 F DEBUG   :       #10 pc 0000000000377be0  /apex/com.android.art/lib64/libart.so (art::interpreter::Execute(art::Thread*, art::CodeItemDataAccessor const&, art::ShadowFrame&, art::JValue, bool, bool) (.__uniq.112435418011751916792819755956732575238.llvm.1227344148880936229)+356) (BuildId: 4427adefbdfb23059a45e82bebdaa2dc)
02-16 18:54:28.161  3425  3425 F DEBUG   :       #11 pc 00000000004910f8  /apex/com.android.art/lib64/libart.so (bool art::interpreter::DoCall<false>(art::ArtMethod*, art::Thread*, art::ShadowFrame&, art::Instruction const*, unsigned short, bool, art::JValue*)+4152) (BuildId: 4427adefbdfb23059a45e82bebdaa2dc)
02-16 18:54:28.161  3425  3425 F DEBUG   :       #12 pc 000000000050a9a0  /apex/com.android.art/lib64/libart.so (void art::interpreter::ExecuteSwitchImplCpp<false>(art::interpreter::SwitchImplContext*)+2380) (BuildId: 4427adefbdfb23059a45e82bebdaa2dc)
02-16 18:54:28.161  3425  3425 F DEBUG   :       #13 pc 00000000003745d8  /apex/com.android.art/lib64/libart.so (ExecuteSwitchImplAsm+8) (BuildId: 4427adefbdfb23059a45e82bebdaa2dc)
02-16 18:54:28.161  3425  3425 F DEBUG   :       #14 pc 00000000028f3edc  /data/app/~~hny2tF_yhou7HYvOR3Dv7g==/com.consumedbycode.slopes.dev-WjjcJISy2kbX8hWgApwOiQ==/oat/arm64/base.vdex (com.mapbox.maps.renderer.MapboxRenderer.snapshot$lambda$4+0)
02-16 18:54:28.161  3425  3425 F DEBUG   :       #15 pc 0000000000377be0  /apex/com.android.art/lib64/libart.so (art::interpreter::Execute(art::Thread*, art::CodeItemDataAccessor const&, art::ShadowFrame&, art::JValue, bool, bool) (.__uniq.112435418011751916792819755956732575238.llvm.1227344148880936229)+356) (BuildId: 4427adefbdfb23059a45e82bebdaa2dc)
02-16 18:54:28.161  3425  3425 F DEBUG   :       #16 pc 00000000004910f8  /apex/com.android.art/lib64/libart.so (bool art::interpreter::DoCall<false>(art::ArtMethod*, art::Thread*, art::ShadowFrame&, art::Instruction const*, unsigned short, bool, art::JValue*)+4152) (BuildId: 4427adefbdfb23059a45e82bebdaa2dc)
02-16 18:54:28.161  3425  3425 F DEBUG   :       #17 pc 000000000050a6c4  /apex/com.android.art/lib64/libart.so (void art::interpreter::ExecuteSwitchImplCpp<false>(art::interpreter::SwitchImplContext*)+1648) (BuildId: 4427adefbdfb23059a45e82bebdaa2dc)
02-16 18:54:28.161  3425  3425 F DEBUG   :       #18 pc 00000000003745d8  /apex/com.android.art/lib64/libart.so (ExecuteSwitchImplAsm+8) (BuildId: 4427adefbdfb23059a45e82bebdaa2dc)
02-16 18:54:28.161  3425  3425 F DEBUG   :       #19 pc 00000000028f39d8  /data/app/~~hny2tF_yhou7HYvOR3Dv7g==/com.consumedbycode.slopes.dev-WjjcJISy2kbX8hWgApwOiQ==/oat/arm64/base.vdex (com.mapbox.maps.renderer.MapboxRenderer.$r8$lambda$A2pWjQZ2-S8Yv976llpPGRb_mtU+0)
02-16 18:54:28.161  3425  3425 F DEBUG   :       #20 pc 0000000000377be0  /apex/com.android.art/lib64/libart.so (art::interpreter::Execute(art::Thread*, art::CodeItemDataAccessor const&, art::ShadowFrame&, art::JValue, bool, bool) (.__uniq.112435418011751916792819755956732575238.llvm.1227344148880936229)+356) (BuildId: 4427adefbdfb23059a45e82bebdaa2dc)
02-16 18:54:28.161  3425  3425 F DEBUG   :       #21 pc 00000000004910f8  /apex/com.android.art/lib64/libart.so (bool art::interpreter::DoCall<false>(art::ArtMethod*, art::Thread*, art::ShadowFrame&, art::Instruction const*, unsigned short, bool, art::JValue*)+4152) (BuildId: 4427adefbdfb23059a45e82bebdaa2dc)
02-16 18:54:28.161  3425  3425 F DEBUG   :       #22 pc 000000000050a6c4  /apex/com.android.art/lib64/libart.so (void art::interpreter::ExecuteSwitchImplCpp<false>(art::interpreter::SwitchImplContext*)+1648) (BuildId: 4427adefbdfb23059a45e82bebdaa2dc)
02-16 18:54:28.161  3425  3425 F DEBUG   :       #23 pc 00000000003745d8  /apex/com.android.art/lib64/libart.so (ExecuteSwitchImplAsm+8) (BuildId: 4427adefbdfb23059a45e82bebdaa2dc)
02-16 18:54:28.161  3425  3425 F DEBUG   :       #24 pc 00000000028f3694  /data/app/~~hny2tF_yhou7HYvOR3Dv7g==/com.consumedbycode.slopes.dev-WjjcJISy2kbX8hWgApwOiQ==/oat/arm64/base.vdex (com.mapbox.maps.renderer.MapboxRenderer$$ExternalSyntheticLambda1.run+0)
02-16 18:54:28.161  3425  3425 F DEBUG   :       #25 pc 0000000000377be0  /apex/com.android.art/lib64/libart.so (art::interpreter::Execute(art::Thread*, art::CodeItemDataAccessor const&, art::ShadowFrame&, art::JValue, bool, bool) (.__uniq.112435418011751916792819755956732575238.llvm.1227344148880936229)+356) (BuildId: 4427adefbdfb23059a45e82bebdaa2dc)
02-16 18:54:28.161  3425  3425 F DEBUG   :       #26 pc 00000000004910f8  /apex/com.android.art/lib64/libart.so (bool art::interpreter::DoCall<false>(art::ArtMethod*, art::Thread*, art::ShadowFrame&, art::Instruction const*, unsigned short, bool, art::JValue*)+4152) (BuildId: 4427adefbdfb23059a45e82bebdaa2dc)
02-16 18:54:28.161  3425  3425 F DEBUG   :       #27 pc 000000000050b070  /apex/com.android.art/lib64/libart.so (void art::interpreter::ExecuteSwitchImplCpp<false>(art::interpreter::SwitchImplContext*)+4124) (BuildId: 4427adefbdfb23059a45e82bebdaa2dc)
02-16 18:54:28.161  3425  3425 F DEBUG   :       #28 pc 00000000003745d8  /apex/com.android.art/lib64/libart.so (ExecuteSwitchImplAsm+8) (BuildId: 4427adefbdfb23059a45e82bebdaa2dc)
02-16 18:54:28.161  3425  3425 F DEBUG   :       #29 pc 00000000028f254c  /data/app/~~hny2tF_yhou7HYvOR3Dv7g==/com.consumedbycode.slopes.dev-WjjcJISy2kbX8hWgApwOiQ==/oat/arm64/base.vdex (com.mapbox.maps.renderer.MapboxRenderThread.drainQueue+0)
02-16 18:54:28.161  3425  3425 F DEBUG   :       #30 pc 0000000000377be0  /apex/com.android.art/lib64/libart.so (art::interpreter::Execute(art::Thread*, art::CodeItemDataAccessor const&, art::ShadowFrame&, art::JValue, bool, bool) (.__uniq.112435418011751916792819755956732575238.llvm.1227344148880936229)+356) (BuildId: 4427adefbdfb23059a45e82bebdaa2dc)
02-16 18:54:28.161  3425  3425 F DEBUG   :       #31 pc 00000000004910f8  /apex/com.android.art/lib64/libart.so (bool art::interpreter::DoCall<false>(art::ArtMethod*, art::Thread*, art::ShadowFrame&, art::Instruction const*, unsigned short, bool, art::JValue*)+4152) (BuildId: 4427adefbdfb23059a45e82bebdaa2dc)
02-16 18:54:28.161  3425  3425 F DEBUG   :       #32 pc 000000000050a9a0  /apex/com.android.art/lib64/libart.so (void art::interpreter::ExecuteSwitchImplCpp<false>(art::interpreter::SwitchImplContext*)+2380) (BuildId: 4427adefbdfb23059a45e82bebdaa2dc)
02-16 18:54:28.161  3425  3425 F DEBUG   :       #33 pc 00000000003745d8  /apex/com.android.art/lib64/libart.so (ExecuteSwitchImplAsm+8) (BuildId: 4427adefbdfb23059a45e82bebdaa2dc)
02-16 18:54:28.161  3425  3425 F DEBUG   :       #34 pc 00000000028f25b4  /data/app/~~hny2tF_yhou7HYvOR3Dv7g==/com.consumedbycode.slopes.dev-WjjcJISy2kbX8hWgApwOiQ==/oat/arm64/base.vdex (com.mapbox.maps.renderer.MapboxRenderThread.draw+0)
02-16 18:54:28.161  3425  3425 F DEBUG   :       #35 pc 0000000000377be0  /apex/com.android.art/lib64/libart.so (art::interpreter::Execute(art::Thread*, art::CodeItemDataAccessor const&, art::ShadowFrame&, art::JValue, bool, bool) (.__uniq.112435418011751916792819755956732575238.llvm.1227344148880936229)+356) (BuildId: 4427adefbdfb23059a45e82bebdaa2dc)
02-16 18:54:28.161  3425  3425 F DEBUG   :       #36 pc 0000000000393b30  /apex/com.android.art/lib64/libart.so (art::interpreter::ArtInterpreterToInterpreterBridge(art::Thread*, art::CodeItemDataAccessor const&, art::ShadowFrame*, art::JValue*)+100) (BuildId: 4427adefbdfb23059a45e82bebdaa2dc)
02-16 18:54:28.161  3425  3425 F DEBUG   :       #37 pc 00000000003932d8  /apex/com.android.art/lib64/libart.so (bool art::interpreter::DoCall<true>(art::ArtMethod*, art::Thread*, art::ShadowFrame&, art::Instruction const*, unsigned short, bool, art::JValue*)+1388) (BuildId: 4427adefbdfb23059a45e82bebdaa2dc)
02-16 18:54:28.161  3425  3425 F DEBUG   :       #38 pc 000000000050d2f8  /apex/com.android.art/lib64/libart.so (void art::interpreter::ExecuteSwitchImplCpp<false>(art::interpreter::SwitchImplContext*)+12964) (BuildId: 4427adefbdfb23059a45e82bebdaa2dc)
02-16 18:54:28.161  3425  3425 F DEBUG   :       #39 pc 00000000003745d8  /apex/com.android.art/lib64/libart.so (ExecuteSwitchImplAsm+8) (BuildId: 4427adefbdfb23059a45e82bebdaa2dc)
02-16 18:54:28.161  3425  3425 F DEBUG   :       #40 pc 00000000028f236c  /data/app/~~hny2tF_yhou7HYvOR3Dv7g==/com.consumedbycode.slopes.dev-WjjcJISy2kbX8hWgApwOiQ==/oat/arm64/base.vdex (com.mapbox.maps.renderer.MapboxRenderThread.doFrame+0)
02-16 18:54:28.161  3425  3425 F DEBUG   :       #41 pc 0000000000377be0  /apex/com.android.art/lib64/libart.so (art::interpreter::Execute(art::Thread*, art::CodeItemDataAccessor const&, art::ShadowFrame&, art::JValue, bool, bool) (.__uniq.112435418011751916792819755956732575238.llvm.1227344148880936229)+356) (BuildId: 4427adefbdfb23059a45e82bebdaa2dc)
02-16 18:54:28.161  3425  3425 F DEBUG   :       #42 pc 00000000004910f8  /apex/com.android.art/lib64/libart.so (bool art::interpreter::DoCall<false>(art::ArtMethod*, art::Thread*, art::ShadowFrame&, art::Instruction const*, unsigned short, bool, art::JValue*)+4152) (BuildId: 4427adefbdfb23059a45e82bebdaa2dc)
02-16 18:54:28.161  3425  3425 F DEBUG   :       #43 pc 000000000050b070  /apex/com.android.art/lib64/libart.so (void art::interpreter::ExecuteSwitchImplCpp<false>(art::interpreter::SwitchImplContext*)+4124) (BuildId: 4427adefbdfb23059a45e82bebdaa2dc)
02-16 18:54:28.161  3425  3425 F DEBUG   :       #44 pc 00000000003745d8  /apex/com.android.art/lib64/libart.so (ExecuteSwitchImplAsm+8) (BuildId: 4427adefbdfb23059a45e82bebdaa2dc)
02-16 18:54:28.161  3425  3425 F DEBUG   :       #45 pc 00000000001d2e74  /system/framework/framework.jar (android.view.Choreographer$CallbackRecord.run+0)
02-16 18:54:28.161  3425  3425 F DEBUG   :       #46 pc 0000000000377be0  /apex/com.android.art/lib64/libart.so (art::interpreter::Execute(art::Thread*, art::CodeItemDataAccessor const&, art::ShadowFrame&, art::JValue, bool, bool) (.__uniq.112435418011751916792819755956732575238.llvm.1227344148880936229)+356) (BuildId: 4427adefbdfb23059a45e82bebdaa2dc)
02-16 18:54:28.161  3425  3425 F DEBUG   :       #47 pc 00000000004910f8  /apex/com.android.art/lib64/libart.so (bool art::interpreter::DoCall<false>(art::ArtMethod*, art::Thread*, art::ShadowFrame&, art::Instruction const*, unsigned short, bool, art::JValue*)+4152) (BuildId: 4427adefbdfb23059a45e82bebdaa2dc)
02-16 18:54:28.161  3425  3425 F DEBUG   :       #48 pc 000000000050a360  /apex/com.android.art/lib64/libart.so (void art::interpreter::ExecuteSwitchImplCpp<false>(art::interpreter::SwitchImplContext*)+780) (BuildId: 4427adefbdfb23059a45e82bebdaa2dc)
02-16 18:54:28.161  3425  3425 F DEBUG   :       #49 pc 00000000003745d8  /apex/com.android.art/lib64/libart.so (ExecuteSwitchImplAsm+8) (BuildId: 4427adefbdfb23059a45e82bebdaa2dc)
02-16 18:54:28.161  3425  3425 F DEBUG   :       #50 pc 00000000001d2e24  /system/framework/framework.jar (android.view.Choreographer$CallbackRecord.run+0)
02-16 18:54:28.161  3425  3425 F DEBUG   :       #51 pc 0000000000377be0  /apex/com.android.art/lib64/libart.so (art::interpreter::Execute(art::Thread*, art::CodeItemDataAccessor const&, art::ShadowFrame&, art::JValue, bool, bool) (.__uniq.112435418011751916792819755956732575238.llvm.1227344148880936229)+356) (BuildId: 4427adefbdfb23059a45e82bebdaa2dc)
02-16 18:54:28.161  3425  3425 F DEBUG   :       #52 pc 00000000004910f8  /apex/com.android.art/lib64/libart.so (bool art::interpreter::DoCall<false>(art::ArtMethod*, art::Thread*, art::ShadowFrame&, art::Instruction const*, unsigned short, bool, art::JValue*)+4152) (BuildId: 4427adefbdfb23059a45e82bebdaa2dc)
02-16 18:54:28.161  3425  3425 F DEBUG   :       #53 pc 000000000050a360  /apex/com.android.art/lib64/libart.so (void art::interpreter::ExecuteSwitchImplCpp<false>(art::interpreter::SwitchImplContext*)+780) (BuildId: 4427adefbdfb23059a45e82bebdaa2dc)
02-16 18:54:28.161  3425  3425 F DEBUG   :       #54 pc 00000000003745d8  /apex/com.android.art/lib64/libart.so (ExecuteSwitchImplAsm+8) (BuildId: 4427adefbdfb23059a45e82bebdaa2dc)
02-16 18:54:28.161  3425  3425 F DEBUG   :       #55 pc 00000000001d3e88  /system/framework/framework.jar (android.view.Choreographer.doCallbacks+0)
02-16 18:54:28.161  3425  3425 F DEBUG   :       #56 pc 0000000000377be0  /apex/com.android.art/lib64/libart.so (art::interpreter::Execute(art::Thread*, art::CodeItemDataAccessor const&, art::ShadowFrame&, art::JValue, bool, bool) (.__uniq.112435418011751916792819755956732575238.llvm.1227344148880936229)+356) (BuildId: 4427adefbdfb23059a45e82bebdaa2dc)
02-16 18:54:28.161  3425  3425 F DEBUG   :       #57 pc 00000000004910f8  /apex/com.android.art/lib64/libart.so (bool art::interpreter::DoCall<false>(art::ArtMethod*, art::Thread*, art::ShadowFrame&, art::Instruction const*, unsigned short, bool, art::JValue*)+4152) (BuildId: 4427adefbdfb23059a45e82bebdaa2dc)
02-16 18:54:28.161  3425  3425 F DEBUG   :       #58 pc 000000000050a360  /apex/com.android.art/lib64/libart.so (void art::interpreter::ExecuteSwitchImplCpp<false>(art::interpreter::SwitchImplContext*)+780) (BuildId: 4427adefbdfb23059a45e82bebdaa2dc)
02-16 18:54:28.161  3425  3425 F DEBUG   :       #59 pc 00000000003745d8  /apex/com.android.art/lib64/libart.so (ExecuteSwitchImplAsm+8) (BuildId: 4427adefbdfb23059a45e82bebdaa2dc)
02-16 18:54:28.161  3425  3425 F DEBUG   :       #60 pc 00000000001d4110  /system/framework/framework.jar (android.view.Choreographer.doFrame+0)
02-16 18:54:28.161  3425  3425 F DEBUG   :       #61 pc 0000000000377be0  /apex/com.android.art/lib64/libart.so (art::interpreter::Execute(art::Thread*, art::CodeItemDataAccessor const&, art::ShadowFrame&, art::JValue, bool, bool) (.__uniq.112435418011751916792819755956732575238.llvm.1227344148880936229)+356) (BuildId: 4427adefbdfb23059a45e82bebdaa2dc)
02-16 18:54:28.161  3425  3425 F DEBUG   :       #62 pc 00000000004910f8  /apex/com.android.art/lib64/libart.so (bool art::interpreter::DoCall<false>(art::ArtMethod*, art::Thread*, art::ShadowFrame&, art::Instruction const*, unsigned short, bool, art::JValue*)+4152) (BuildId: 4427adefbdfb23059a45e82bebdaa2dc)
02-16 18:54:28.161  3425  3425 F DEBUG   :       #63 pc 000000000050a360  /apex/com.android.art/lib64/libart.so (void art::interpreter::ExecuteSwitchImplCpp<false>(art::interpreter::SwitchImplContext*)+780) (BuildId: 4427adefbdfb23059a45e82bebdaa2dc)
02-16 18:54:28.161  3425  3425 F DEBUG   :       #64 pc 00000000003745d8  /apex/com.android.art/lib64/libart.so (ExecuteSwitchImplAsm+8) (BuildId: 4427adefbdfb23059a45e82bebdaa2dc)
02-16 18:54:28.161  3425  3425 F DEBUG   :       #65 pc 00000000001d33fc  /system/framework/framework.jar (android.view.Choreographer$FrameDisplayEventReceiver.run+0)
02-16 18:54:28.161  3425  3425 F DEBUG   :       #66 pc 0000000000377be0  /apex/com.android.art/lib64/libart.so (art::interpreter::Execute(art::Thread*, art::CodeItemDataAccessor const&, art::ShadowFrame&, art::JValue, bool, bool) (.__uniq.112435418011751916792819755956732575238.llvm.1227344148880936229)+356) (BuildId: 4427adefbdfb23059a45e82bebdaa2dc)
02-16 18:54:28.161  3425  3425 F DEBUG   :       #67 pc 00000000004910f8  /apex/com.android.art/lib64/libart.so (bool art::interpreter::DoCall<false>(art::ArtMethod*, art::Thread*, art::ShadowFrame&, art::Instruction const*, unsigned short, bool, art::JValue*)+4152) (BuildId: 4427adefbdfb23059a45e82bebdaa2dc)
02-16 18:54:28.161  3425  3425 F DEBUG   :       #68 pc 000000000050b070  /apex/com.android.art/lib64/libart.so (void art::interpreter::ExecuteSwitchImplCpp<false>(art::interpreter::SwitchImplContext*)+4124) (BuildId: 4427adefbdfb23059a45e82bebdaa2dc)
02-16 18:54:28.161  3425  3425 F DEBUG   :       #69 pc 00000000003745d8  /apex/com.android.art/lib64/libart.so (ExecuteSwitchImplAsm+8) (BuildId: 4427adefbdfb23059a45e82bebdaa2dc)
02-16 18:54:28.161  3425  3425 F DEBUG   :       #70 pc 000000000020493c  /system/framework/framework.jar (android.os.Handler.handleCallback+0)
02-16 18:54:28.161  3425  3425 F DEBUG   :       #71 pc 0000000000377be0  /apex/com.android.art/lib64/libart.so (art::interpreter::Execute(art::Thread*, art::CodeItemDataAccessor const&, art::ShadowFrame&, art::JValue, bool, bool) (.__uniq.112435418011751916792819755956732575238.llvm.1227344148880936229)+356) (BuildId: 4427adefbdfb23059a45e82bebdaa2dc)
02-16 18:54:28.161  3425  3425 F DEBUG   :       #72 pc 00000000004910f8  /apex/com.android.art/lib64/libart.so (bool art::interpreter::DoCall<false>(art::ArtMethod*, art::Thread*, art::ShadowFrame&, art::Instruction const*, unsigned short, bool, art::JValue*)+4152) (BuildId: 4427adefbdfb23059a45e82bebdaa2dc)
02-16 18:54:28.161  3425  3425 F DEBUG   :       #73 pc 000000000050a6c4  /apex/com.android.art/lib64/libart.so (void art::interpreter::ExecuteSwitchImplCpp<false>(art::interpreter::SwitchImplContext*)+1648) (BuildId: 4427adefbdfb23059a45e82bebdaa2dc)
02-16 18:54:28.161  3425  3425 F DEBUG   :       #74 pc 00000000003745d8  /apex/com.android.art/lib64/libart.so (ExecuteSwitchImplAsm+8) (BuildId: 4427adefbdfb23059a45e82bebdaa2dc)
02-16 18:54:28.162  3425  3425 F DEBUG   :       #75 pc 0000000000204784  /system/framework/framework.jar (android.os.Handler.dispatchMessage+0)
02-16 18:54:28.162  3425  3425 F DEBUG   :       #76 pc 0000000000377be0  /apex/com.android.art/lib64/libart.so (art::interpreter::Execute(art::Thread*, art::CodeItemDataAccessor const&, art::ShadowFrame&, art::JValue, bool, bool) (.__uniq.112435418011751916792819755956732575238.llvm.1227344148880936229)+356) (BuildId: 4427adefbdfb23059a45e82bebdaa2dc)
02-16 18:54:28.162  3425  3425 F DEBUG   :       #77 pc 00000000004910f8  /apex/com.android.art/lib64/libart.so (bool art::interpreter::DoCall<false>(art::ArtMethod*, art::Thread*, art::ShadowFrame&, art::Instruction const*, unsigned short, bool, art::JValue*)+4152) (BuildId: 4427adefbdfb23059a45e82bebdaa2dc)
02-16 18:54:28.162  3425  3425 F DEBUG   :       #78 pc 000000000050a360  /apex/com.android.art/lib64/libart.so (void art::interpreter::ExecuteSwitchImplCpp<false>(art::interpreter::SwitchImplContext*)+780) (BuildId: 4427adefbdfb23059a45e82bebdaa2dc)
02-16 18:54:28.162  3425  3425 F DEBUG   :       #79 pc 00000000003745d8  /apex/com.android.art/lib64/libart.so (ExecuteSwitchImplAsm+8) (BuildId: 4427adefbdfb23059a45e82bebdaa2dc)
02-16 18:54:28.162  3425  3425 F DEBUG   :       #80 pc 0000000000238c50  /system/framework/framework.jar (android.os.Looper.loopOnce+0)
02-16 18:54:28.162  3425  3425 F DEBUG   :       #81 pc 0000000000377be0  /apex/com.android.art/lib64/libart.so (art::interpreter::Execute(art::Thread*, art::CodeItemDataAccessor const&, art::ShadowFrame&, art::JValue, bool, bool) (.__uniq.112435418011751916792819755956732575238.llvm.1227344148880936229)+356) (BuildId: 4427adefbdfb23059a45e82bebdaa2dc)
02-16 18:54:28.162  3425  3425 F DEBUG   :       #82 pc 00000000004910f8  /apex/com.android.art/lib64/libart.so (bool art::interpreter::DoCall<false>(art::ArtMethod*, art::Thread*, art::ShadowFrame&, art::Instruction const*, unsigned short, bool, art::JValue*)+4152) (BuildId: 4427adefbdfb23059a45e82bebdaa2dc)
02-16 18:54:28.162  3425  3425 F DEBUG   :       #83 pc 000000000050a6c4  /apex/com.android.art/lib64/libart.so (void art::interpreter::ExecuteSwitchImplCpp<false>(art::interpreter::SwitchImplContext*)+1648) (BuildId: 4427adefbdfb23059a45e82bebdaa2dc)
02-16 18:54:28.162  3425  3425 F DEBUG   :       #84 pc 00000000003745d8  /apex/com.android.art/lib64/libart.so (ExecuteSwitchImplAsm+8) (BuildId: 4427adefbdfb23059a45e82bebdaa2dc)
02-16 18:54:28.162  3425  3425 F DEBUG   :       #85 pc 000000000023948c  /system/framework/framework.jar (android.os.Looper.loop+0)
02-16 18:54:28.162  3425  3425 F DEBUG   :       #86 pc 0000000000377be0  /apex/com.android.art/lib64/libart.so (art::interpreter::Execute(art::Thread*, art::CodeItemDataAccessor const&, art::ShadowFrame&, art::JValue, bool, bool) (.__uniq.112435418011751916792819755956732575238.llvm.1227344148880936229)+356) (BuildId: 4427adefbdfb23059a45e82bebdaa2dc)
02-16 18:54:28.162  3425  3425 F DEBUG   :       #87 pc 00000000004910f8  /apex/com.android.art/lib64/libart.so (bool art::interpreter::DoCall<false>(art::ArtMethod*, art::Thread*, art::ShadowFrame&, art::Instruction const*, unsigned short, bool, art::JValue*)+4152) (BuildId: 4427adefbdfb23059a45e82bebdaa2dc)
02-16 18:54:28.162  3425  3425 F DEBUG   :       #88 pc 000000000050a6c4  /apex/com.android.art/lib64/libart.so (void art::interpreter::ExecuteSwitchImplCpp<false>(art::interpreter::SwitchImplContext*)+1648) (BuildId: 4427adefbdfb23059a45e82bebdaa2dc)
02-16 18:54:28.162  3425  3425 F DEBUG   :       #89 pc 00000000003745d8  /apex/com.android.art/lib64/libart.so (ExecuteSwitchImplAsm+8) (BuildId: 4427adefbdfb23059a45e82bebdaa2dc)
02-16 18:54:28.162  3425  3425 F DEBUG   :       #90 pc 0000000000203dc4  /system/framework/framework.jar (android.os.HandlerThread.run+0)
02-16 18:54:28.162  3425  3425 F DEBUG   :       #91 pc 0000000000377be0  /apex/com.android.art/lib64/libart.so (art::interpreter::Execute(art::Thread*, art::CodeItemDataAccessor const&, art::ShadowFrame&, art::JValue, bool, bool) (.__uniq.112435418011751916792819755956732575238.llvm.1227344148880936229)+356) (BuildId: 4427adefbdfb23059a45e82bebdaa2dc)
02-16 18:54:28.162  3425  3425 F DEBUG   :       #92 pc 0000000000377360  /apex/com.android.art/lib64/libart.so (artQuickToInterpreterBridge+672) (BuildId: 4427adefbdfb23059a45e82bebdaa2dc)
02-16 18:54:28.162  3425  3425 F DEBUG   :       #93 pc 0000000000371f68  /apex/com.android.art/lib64/libart.so (art_quick_to_interpreter_bridge+88) (BuildId: 4427adefbdfb23059a45e82bebdaa2dc)
02-16 18:54:28.162  3425  3425 F DEBUG   :       #94 pc 000000000035b3a4  /apex/com.android.art/lib64/libart.so (art_quick_invoke_stub+612) (BuildId: 4427adefbdfb23059a45e82bebdaa2dc)
02-16 18:54:28.162  3425  3425 F DEBUG   :       #95 pc 000000000034be08  /apex/com.android.art/lib64/libart.so (art::ArtMethod::Invoke(art::Thread*, unsigned int*, unsigned int, art::JValue*, char const*)+144) (BuildId: 4427adefbdfb23059a45e82bebdaa2dc)
02-16 18:54:28.162  3425  3425 F DEBUG   :       #96 pc 00000000004f41a4  /apex/com.android.art/lib64/libart.so (art::Thread::CreateCallback(void*)+1888) (BuildId: 4427adefbdfb23059a45e82bebdaa2dc)
02-16 18:54:28.162  3425  3425 F DEBUG   :       #97 pc 00000000000c37b4  /apex/com.android.runtime/lib64/bionic/libc.so (__pthread_start(void*)+208) (BuildId: 37f537c2ba9dcbb262a0a68f41a21da4)
02-16 18:54:28.162  3425  3425 F DEBUG   :       #98 pc 000000000005d084  /apex/com.android.runtime/lib64/bionic/libc.so (__start_thread+68) (BuildId: 37f537c2ba9dcbb262a0a68f41a21da4)

Expected behavior

A snapshot is successful without crashing.

Notes / preliminary analysis

So far, this only appears to be an issue on Samsung Galaxy S24+ and Galaxy S24 Ultra devices running Android 14. We haven't yet gotten this crash reported on other devices running Android 14. I've been using Samsung's Remote Test Lab to test our app and the linked sample project below.

Additional links and references

Sample project: https://github.com/deRonbrown/MapboxSnapshotCrash

WolfgangK commented 9 months ago

I observe exactly the same crash in my app. Also on Samsung Galaxy S24 Ultra only at the moment.

Edit: currently my app uses Mapbox SDK version: 10.14.0

kiryldz commented 9 months ago

@deRonbrown @WolfgangK can you also share your build version? Could it be that you're using some sort of beta build (e.g. https://developer.samsung.com/one-ui-beta)?

kiryldz commented 9 months ago

I tested on Samsung Z Fold 4 with Android 14 (build number UP1A.231005.007.F936BXXS5EXAB) - I see no crashes.

WolfgangK commented 9 months ago

Unfortunately don't know the exact build version, I see the crashes on the Google Play Console from my users. Only Galaxy S24 devices are affected. I guess they don't have a beta build.

After further searching for a solution I saw that other apps (especially games, like Pokemon Go for example) also have similar problems on the Galaxy S24. I guess, the crashes are related.

lantah-1 commented 8 months ago

me too, my magic 6 pro with Android 14 also crash, Mapbox SDK version is 11.2.0

maonanyue commented 8 months ago

Disable supportsPbo in PixelReader can fix this issue.


              try {
                    map?.javaClass?.classLoader?.loadClass("com.mapbox.maps.renderer.gl.PixelReader")?.let {clz->
                        val field = clz.getDeclaredField("supportsPbo")
                        field.isAccessible = true
                        field.set(null, false)
                    }
                }catch (t:Throwable){
                    MyLog.logE(TAG, "screenshot error", t)
                }     
```  
kiryldz commented 8 months ago

Disable supportsPbo in PixelReader can fix this issue.

              try {
                    map?.javaClass?.classLoader?.loadClass("com.mapbox.maps.renderer.gl.PixelReader")?.let {clz->
                        val field = clz.getDeclaredField("supportsPbo")
                        field.isAccessible = true
                        field.set(null, false)
                    }
                }catch (t:Throwable){
                    MyLog.logE(TAG, "screenshot error", t)
                }     
```  

@maonanyue thanks for sharing this. I do not have the device that reproduces this crash but if you say that supportsPbo = false fixes the issue - we could provide this fallback on SDK level if reading pixels with PBO fails with an exception. Noting that this still looks like a vendor specific issue and hopefully should be fixed by Samsung in upcoming updates.

figureai commented 8 months ago

I got the same problem. And I don't know how to fix it. Mapbox Version:10.10.0

figureai commented 8 months ago

Thank you very much. Your approach solved my problem. @kiryldz

kiryldz commented 7 months ago

Just in case noting that the fix was included in https://github.com/mapbox/mapbox-maps-android/releases/tag/v11.3.0-rc.1 and will be included in v10.17.0 coming out next week so workaround from https://github.com/mapbox/mapbox-maps-android/issues/2280#issuecomment-1982758900 will be no longer needed.

WolfgangK commented 7 months ago

Great, thank you! Special thanks to @maonanyue !

SamYStudiO commented 7 months ago

@kiryldz Hello, this is still an issue with 10.17 or 11.3, app still crashing on galaxy s24 ultra when calling snapshot

kiryldz commented 7 months ago

@kiryldz Hello, this is still an issue with 10.17 or 11.3, app still crashing on galaxy s24 ultra when calling snapshot

😞 Sorry, I did not have the device to verify and catching the native exception in Java out-of-the-box did not work. Well, then for now https://github.com/mapbox/mapbox-maps-android/issues/2280#issuecomment-1982758900 remains the easy workaround... It will be much more tricky to make this part of SDK then.

SamYStudiO commented 7 months ago

Ok, workaround won't work starting with 11.3.x though as supportsPbo is not static anymore

juqiu commented 7 months ago

@kiryldz Hello, this is still an issue with 10.17 or 11.3, app still crashing on galaxy s24 ultra when calling snapshot

😞 Sorry, I did not have the device to verify and catching the native exception in Java out-of-the-box did not work. Well, then for now #2280 (comment) remains the easy workaround... It will be much more tricky to make this part of SDK then.

you can verify in Samsung's Remote Test Lab using SM-S928 (galaxy s24 ultra )

SamYStudiO commented 7 months ago

Shouldn't this issue be reopened? Or do we need to create another?

spencergriffin commented 6 months ago

This is still crashing a lot for us, and the workaround isn't working for me.

SamYStudiO commented 6 months ago

This is still crashing a lot for us, and the workaround isn't working for me.

Workaround work until 10.16

kiryldz commented 6 months ago

Hey all, next week in v11.4.0-rc.1 we will expose experimental MapView.setSnapshotLegacyMode(true|false) API allowing to fallback to legacy / worse way of making a MapView snapshot but as proved in https://github.com/mapbox/mapbox-maps-android/issues/2280#issuecomment-1982758900 and comments below - helping with those specific Samsung devices.

Porting this to v10.17.1 is also planned, perhaps slightly later.

Edit: this is actually available in https://github.com/mapbox/mapbox-maps-android/releases/tag/v11.4.0-beta.3 already.

Edit: available in https://github.com/mapbox/mapbox-maps-android/releases/tag/v10.17.1 as well.

withoutwind commented 1 month ago

@kiryldz 在有些机型上还是有崩溃,在firebase中有显示, WeChatd6bf35a00ee01e3fec8590c0a50cbd7e