Skip to content
This repository has been archived by the owner on Aug 8, 2023. It is now read-only.

Mapbox Android - Crash when rotating screen #12614

Closed
AlexanderEggers opened this issue Aug 13, 2018 · 12 comments
Closed

Mapbox Android - Crash when rotating screen #12614

AlexanderEggers opened this issue Aug 13, 2018 · 12 comments
Labels
Android Mapbox Maps SDK for Android needs information

Comments

@AlexanderEggers
Copy link
Contributor

I have implemented a feature detail screen (seperate activity) that I can access when I click a marker on the mapview. The activity which holds mapbox has the following config to ignore orientation changes: android:configChanges="orientation". The feature detail screen can process and react to any orientation change.

The app crashes when I enter the feature detail screen in any orientation, change the orientation to a new one, go back to the mapview and try to move/zoom using the map.

I get the following crash report:

08-13 18:34:14.407 21134-21134/org.mordag.myapp A/libc: Fatal signal 11 (SIGSEGV), code 2, fault addr 0x2d6461af in tid 21134 (v.myApp)
08-13 18:34:14.567 21443-21443/? A/DEBUG: *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** ***
    Build fingerprint: 'motorola/cedric/cedric:7.0/NPPS25.137-93-14/21:user/release-keys'
    Revision: 'p500'
    ABI: 'arm'
08-13 18:34:14.568 21443-21443/? A/DEBUG: pid: 21134, tid: 21134, name: v.myApp >>> org.mordag.myapp <<<
    signal 11 (SIGSEGV), code 2 (SEGV_ACCERR), fault addr 0x2d6461af
        r0 2d64616f  r1 30640d7f  r2 00430000  r3 a8eb1082
        r4 a8f19230  r5 8fe30b88  r6 6f9a2e18  r7 beec9d30
        r8 13417330  r9 a8f04400  sl beec9d90  fp a8f04400
        ip a8f19230  sp beec9d08  lr 8f8e8439  pc 8f9f6f0e  cpsr 600b0030
08-13 18:34:14.579 21443-21443/? A/DEBUG: backtrace:
        #00 pc 001a3f0e  /data/app/org.mordag.myapp-1/lib/arm/libmapbox-gl.so
        #01 pc 00095435  /data/app/org.mordag.myapp-1/lib/arm/libmapbox-gl.so
        #02 pc 0009751d  /data/app/org.mordag.myapp-1/lib/arm/libmapbox-gl.so
        #03 pc 0009755f  /data/app/org.mordag.myapp-1/lib/arm/libmapbox-gl.so
        #04 pc 000adb99  /system/lib/libart.so (art_quick_generic_jni_trampoline+40)
        #05 pc 0001db1d  /dev/ashmem/dalvik-jit-code-cache (deleted)

Configuration

Android versions: 7.0.0
Device models: Moto G5
Mapbox SDK versions: 6.3.0

@tobrun tobrun added the Android Mapbox Maps SDK for Android label Aug 13, 2018
@tobrun
Copy link
Member

tobrun commented Aug 13, 2018

Hey @Mordag, thanks for reaching out and reporting your issue.
Sadly, I'm not able to reproduce your issue with the provided information:

ezgif com-video-to-gif 23

Some follow up questions:

  • are you implementing all required map - activity lifecycles?
  • would you be able to provide a minimal reproducible example?

@AlexanderEggers
Copy link
Contributor Author

Hi @tobrun,
Thanks for your reply. I will try to create a demo project in the next days. I have implemented all required methods (I am using a fragment that holds the mapview).

Do you have any ideas about my provided crash log?

@tobrun
Copy link
Member

tobrun commented Aug 13, 2018

@Mordag are you calling MapView#onDestroy from Fragment#onDestroyView? If not, this should resolve your issue. re. crash log, without symbolicating this crash, this log isn't actionable. We are aiming to resolve that with #12485.

@AlexanderEggers
Copy link
Contributor Author

AlexanderEggers commented Aug 13, 2018

@tobrun yes I am calling the onDestroy from the Fragment#onDestroy.

protected var mapView: MapView? = null

override fun onResume() {
    super.onResume()
    mapView?.onResume()
}

override fun onStart() {
    super.onStart()
    mapView?.onStart()
}

override fun onCreateView(inflater: LayoutInflater, container: ViewGroup?, savedInstanceState: Bundle?): View? {
      val fragmentView = super.onCreateView(inflater, container, savedInstanceState)
      mapView = fragmentView?.findViewById(R.id.mapView)
      return fragmentView
}

override fun onViewCreated(view: View, savedInstanceState: Bundle?) {
      super.onViewCreated(view, savedInstanceState)
      mapView?.onCreate(savedInstanceState)
}

override fun onPause() {
     super.onPause()
     mapView?.onPause()
}

override fun onSaveInstanceState(outState: Bundle) {
     super.onSaveInstanceState(outState)
     mapView?.onSaveInstanceState(outState)
}

override fun onLowMemory() {
     super.onLowMemory()
     mapView?.onLowMemory()
}

override fun onStop() {
     super.onStop()
     mapView?.onStop()
}

override fun onDestroyView() {
     super.onDestroyView()
     mapView?.onDestroy()
}

@tobrun
Copy link
Member

tobrun commented Aug 13, 2018

@Mordag thank you for the additional information, though not able to reproduce with fragments 🤔

ezgif com-video-to-gif 75

@AlexanderEggers
Copy link
Contributor Author

AlexanderEggers commented Aug 14, 2018

@tobrun I did some more testing and I only get the crash on my Moto G5. I have tried some Pixel phones as well but had no problems on those phones. It also seems like that the crash always happens as soon as you rotate the mapview.

I will do some more testing to give you some more information if that is only the Moto G5 or has something to do with a specific hardware component.

Update: I have tested the MapBox Demo app with the Moto G5 and I got no problems there.

@AlexanderEggers
Copy link
Contributor Author

AlexanderEggers commented Aug 16, 2018

@tobrun I've tested the issue with the latest mapbox release (6.4.0) which includes a better reporting:

08-16 11:21:27.697 21289-21289/? A/libc: Fatal signal 11 (SIGSEGV), code 2, fault addr 0x2d79727c in tid 21289 (v.myapp)
08-16 11:21:27.906 21576-21576/? A/DEBUG: *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** ***
    Build fingerprint: 'motorola/cedric/cedric:7.0/NPPS25.137-93-14/21:user/release-keys'
    Revision: 'p500'
    ABI: 'arm'
    pid: 21289, tid: 21289, name: v.myapp  >>> mordag.myapp <<<
    signal 11 (SIGSEGV), code 2 (SEGV_ACCERR), fault addr 0x2d79727c
        r0 00000000  r1 2d79727c  r2 00430000  r3 a8eb1082
        r4 beec8360  r5 beec86f0  r6 beec8490  r7 beec8350
        r8 beec86f0  r9 a8f04400  sl beec83a0  fp a8f04400
        ip a8f19230  sp beec8338  lr 8ed3fd09  pc 8efbf3ea  cpsr 600f0030
08-16 11:21:27.963 21576-21576/? A/DEBUG: backtrace:
        #00 pc 002f93ea  /data/app/mordag.myapp-1/lib/arm/libmapbox-gl.so
        #01 pc 00079d05  /data/app/mordag.myapp-1/lib/arm/libmapbox-gl.so
        #02 pc 000adb99  /system/lib/libart.so (art_quick_generic_jni_trampoline+40)
        #03 pc 000a91c1  /system/lib/libart.so (art_quick_invoke_stub_internal+64)
08-16 11:21:27.964 21576-21576/? A/DEBUG:     #04 pc 00403249  /system/lib/libart.so (art_quick_invoke_stub+232)
        #05 pc 000b0455  /system/lib/libart.so (_ZN3art9ArtMethod6InvokeEPNS_6ThreadEPjjPNS_6JValueEPKc+136)
        #06 pc 001ec3e9  /system/lib/libart.so (_ZN3art11interpreter34ArtInterpreterToCompiledCodeBridgeEPNS_6ThreadEPNS_9ArtMethodEPKNS_7DexFile8CodeItemEPNS_11ShadowFrameEPNS_6JValueE+200)
        #07 pc 001e6999  /system/lib/libart.so (_ZN3art11interpreter6DoCallILb0ELb0EEEbPNS_9ArtMethodEPNS_6ThreadERNS_11ShadowFrameEPKNS_11InstructionEtPNS_6JValueE+492)
        #08 pc 003fac8f  /system/lib/libart.so (MterpInvokeVirtual+430)
        #09 pc 0009c014  /system/lib/libart.so (ExecuteMterpImpl+14228)
        #10 pc 001ca7e3  /system/lib/libart.so (_ZN3art11interpreterL7ExecuteEPNS_6ThreadEPKNS_7DexFile8CodeItemERNS_11ShadowFrameENS_6JValueEb+290)
        #11 pc 001cf34b  /system/lib/libart.so (_ZN3art11interpreter33ArtInterpreterToInterpreterBridgeEPNS_6ThreadEPKNS_7DexFile8CodeItemEPNS_11ShadowFrameEPNS_6JValueE+114)
        #12 pc 001e697f  /system/lib/libart.so (_ZN3art11interpreter6DoCallILb0ELb0EEEbPNS_9ArtMethodEPNS_6ThreadERNS_11ShadowFrameEPKNS_11InstructionEtPNS_6JValueE+466)
        #13 pc 003fac8f  /system/lib/libart.so (MterpInvokeVirtual+430)
        #14 pc 0009c014  /system/lib/libart.so (ExecuteMterpImpl+14228)
        #15 pc 001ca7e3  /system/lib/libart.so (_ZN3art11interpreterL7ExecuteEPNS_6ThreadEPKNS_7DexFile8CodeItemERNS_11ShadowFrameENS_6JValueEb+290)
        #16 pc 001cf34b  /system/lib/libart.so (_ZN3art11interpreter33ArtInterpreterToInterpreterBridgeEPNS_6ThreadEPKNS_7DexFile8CodeItemEPNS_11ShadowFrameEPNS_6JValueE+114)
        #17 pc 001e697f  /system/lib/libart.so (_ZN3art11interpreter6DoCallILb0ELb0EEEbPNS_9ArtMethodEPNS_6ThreadERNS_11ShadowFrameEPKNS_11InstructionEtPNS_6JValueE+466)
        #18 pc 003fb98b  /system/lib/libart.so (MterpInvokeInterface+826)
        #19 pc 0009c214  /system/lib/libart.so (ExecuteMterpImpl+14740)
        #20 pc 001ca7e3  /system/lib/libart.so (_ZN3art11interpreterL7ExecuteEPNS_6ThreadEPKNS_7DexFile8CodeItemERNS_11ShadowFrameENS_6JValueEb+290)
08-16 11:21:27.965 21576-21576/? A/DEBUG:     #21 pc 001cf34b  /system/lib/libart.so (_ZN3art11interpreter33ArtInterpreterToInterpreterBridgeEPNS_6ThreadEPKNS_7DexFile8CodeItemEPNS_11ShadowFrameEPNS_6JValueE+114)
        #22 pc 001e697f  /system/lib/libart.so (_ZN3art11interpreter6DoCallILb0ELb0EEEbPNS_9ArtMethodEPNS_6ThreadERNS_11ShadowFrameEPKNS_11InstructionEtPNS_6JValueE+466)
        #23 pc 003fac8f  /system/lib/libart.so (MterpInvokeVirtual+430)
        #24 pc 0009c014  /system/lib/libart.so (ExecuteMterpImpl+14228)
        #25 pc 001ca7e3  /system/lib/libart.so (_ZN3art11interpreterL7ExecuteEPNS_6ThreadEPKNS_7DexFile8CodeItemERNS_11ShadowFrameENS_6JValueEb+290)
        #26 pc 001cf34b  /system/lib/libart.so (_ZN3art11interpreter33ArtInterpreterToInterpreterBridgeEPNS_6ThreadEPKNS_7DexFile8CodeItemEPNS_11ShadowFrameEPNS_6JValueE+114)
        #27 pc 001e697f  /system/lib/libart.so (_ZN3art11interpreter6DoCallILb0ELb0EEEbPNS_9ArtMethodEPNS_6ThreadERNS_11ShadowFrameEPKNS_11InstructionEtPNS_6JValueE+466)
        #28 pc 003fac8f  /system/lib/libart.so (MterpInvokeVirtual+430)
        #29 pc 0009c014  /system/lib/libart.so (ExecuteMterpImpl+14228)
        #30 pc 001ca7e3  /system/lib/libart.so (_ZN3art11interpreterL7ExecuteEPNS_6ThreadEPKNS_7DexFile8CodeItemERNS_11ShadowFrameENS_6JValueEb+290)
        #31 pc 001cf34b  /system/lib/libart.so (_ZN3art11interpreter33ArtInterpreterToInterpreterBridgeEPNS_6ThreadEPKNS_7DexFile8CodeItemEPNS_11ShadowFrameEPNS_6JValueE+114)
        #32 pc 001e697f  /system/lib/libart.so (_ZN3art11interpreter6DoCallILb0ELb0EEEbPNS_9ArtMethodEPNS_6ThreadERNS_11ShadowFrameEPKNS_11InstructionEtPNS_6JValueE+466)
        #33 pc 003fb98b  /system/lib/libart.so (MterpInvokeInterface+826)
        #34 pc 0009c214  /system/lib/libart.so (ExecuteMterpImpl+14740)
        #35 pc 001ca7e3  /system/lib/libart.so (_ZN3art11interpreterL7ExecuteEPNS_6ThreadEPKNS_7DexFile8CodeItemERNS_11ShadowFrameENS_6JValueEb+290)
        #36 pc 001cf2b5  /system/lib/libart.so (_ZN3art11interpreter30EnterInterpreterFromEntryPointEPNS_6ThreadEPKNS_7DexFile8CodeItemEPNS_11ShadowFrameE+92)
        #37 pc 003f26ff  /system/lib/libart.so (artQuickToInterpreterBridge+706)
        #38 pc 000adc13  /system/lib/libart.so (art_quick_to_interpreter_bridge+34)
08-16 11:21:27.966 21576-21576/? A/DEBUG:     #39 pc 000044bd  /dev/ashmem/dalvik-jit-code-cache (deleted)

@tobrun
Copy link
Member

tobrun commented Aug 16, 2018

I symbolicated this trace to:

********** Crash dump: **********
Build fingerprint: 'motorola/cedric/cedric:7.0/NPPS25.137-93-14/21:user/release-keys'
pid: 21289, tid: 21289, name: v.myapp  >>> mordag.myapp <<<
signal 11 (SIGSEGV), code 2 (SEGV_ACCERR), fault addr 0x2d79727c
Stack frame #00 pc 002f93ea  /data/app/mordag.myapp-1/lib/arm/libmapbox-gl.so: Routine std::__ndk1::basic_string<char, std::__ndk1::char_traits<char>, std::__ndk1::allocator<char> >::__is_long() const at /buildbot/src/android/ndk-release-r17/external/libcxx/include/string:1219
Stack frame #01 pc 00079d05  /data/app/mordag.myapp-1/lib/arm/libmapbox-gl.so: Routine BFD: 
mbgl::style::Layer::getID() const at /src/src/mbgl/style/layer.cpp:22
Stack frame #02 pc 000adb99  /system/lib/libart.so (art_quick_generic_jni_trampoline+40)
Stack frame #03 pc 000a91c1  /system/lib/libart.so (art_quick_invoke_stub_internal+64)
Stack frame #04 pc 00403249  /system/lib/libart.so (art_quick_invoke_stub+232)
Stack frame #05 pc 000b0455  /system/lib/libart.so (_ZN3art9ArtMethod6InvokeEPNS_6ThreadEPjjPNS_6JValueEPKc+136)
Stack frame #06 pc 001ec3e9  /system/lib/libart.so (_ZN3art11interpreter34ArtInterpreterToCompiledCodeBridgeEPNS_6ThreadEPNS_9ArtMethodEPKNS_7DexFile8CodeItemEPNS_11ShadowFrameEPNS_6JValueE+200)
Stack frame #07 pc 001e6999  /system/lib/libart.so (_ZN3art11interpreter6DoCallILb0ELb0EEEbPNS_9ArtMethodEPNS_6ThreadERNS_11ShadowFrameEPKNS_11InstructionEtPNS_6JValueE+492)
Stack frame #08 pc 003fac8f  /system/lib/libart.so (MterpInvokeVirtual+430)
Stack frame #09 pc 0009c014  /system/lib/libart.so (ExecuteMterpImpl+14228)
Stack frame #10 pc 001ca7e3  /system/lib/libart.so (_ZN3art11interpreterL7ExecuteEPNS_6ThreadEPKNS_7DexFile8CodeItemERNS_11ShadowFrameENS_6JValueEb+290)
Stack frame #11 pc 001cf34b  /system/lib/libart.so (_ZN3art11interpreter33ArtInterpreterToInterpreterBridgeEPNS_6ThreadEPKNS_7DexFile8CodeItemEPNS_11ShadowFrameEPNS_6JValueE+114)
Stack frame #12 pc 001e697f  /system/lib/libart.so (_ZN3art11interpreter6DoCallILb0ELb0EEEbPNS_9ArtMethodEPNS_6ThreadERNS_11ShadowFrameEPKNS_11InstructionEtPNS_6JValueE+466)
Stack frame #13 pc 003fac8f  /system/lib/libart.so (MterpInvokeVirtual+430)
Stack frame #14 pc 0009c014  /system/lib/libart.so (ExecuteMterpImpl+14228)
Stack frame #15 pc 001ca7e3  /system/lib/libart.so (_ZN3art11interpreterL7ExecuteEPNS_6ThreadEPKNS_7DexFile8CodeItemERNS_11ShadowFrameENS_6JValueEb+290)
Stack frame #16 pc 001cf34b  /system/lib/libart.so (_ZN3art11interpreter33ArtInterpreterToInterpreterBridgeEPNS_6ThreadEPKNS_7DexFile8CodeItemEPNS_11ShadowFrameEPNS_6JValueE+114)
Stack frame #17 pc 001e697f  /system/lib/libart.so (_ZN3art11interpreter6DoCallILb0ELb0EEEbPNS_9ArtMethodEPNS_6ThreadERNS_11ShadowFrameEPKNS_11InstructionEtPNS_6JValueE+466)
Stack frame #18 pc 003fb98b  /system/lib/libart.so (MterpInvokeInterface+826)
Stack frame #19 pc 0009c214  /system/lib/libart.so (ExecuteMterpImpl+14740)
Stack frame #20 pc 001ca7e3  /system/lib/libart.so (_ZN3art11interpreterL7ExecuteEPNS_6ThreadEPKNS_7DexFile8CodeItemERNS_11ShadowFrameENS_6JValueEb+290)
Stack frame #21 pc 001cf34b  /system/lib/libart.so (_ZN3art11interpreter33ArtInterpreterToInterpreterBridgeEPNS_6ThreadEPKNS_7DexFile8CodeItemEPNS_11ShadowFrameEPNS_6JValueE+114)
Stack frame #22 pc 001e697f  /system/lib/libart.so (_ZN3art11interpreter6DoCallILb0ELb0EEEbPNS_9ArtMethodEPNS_6ThreadERNS_11ShadowFrameEPKNS_11InstructionEtPNS_6JValueE+466)
Stack frame #23 pc 003fac8f  /system/lib/libart.so (MterpInvokeVirtual+430)
Stack frame #24 pc 0009c014  /system/lib/libart.so (ExecuteMterpImpl+14228)
Stack frame #25 pc 001ca7e3  /system/lib/libart.so (_ZN3art11interpreterL7ExecuteEPNS_6ThreadEPKNS_7DexFile8CodeItemERNS_11ShadowFrameENS_6JValueEb+290)
Stack frame #26 pc 001cf34b  /system/lib/libart.so (_ZN3art11interpreter33ArtInterpreterToInterpreterBridgeEPNS_6ThreadEPKNS_7DexFile8CodeItemEPNS_11ShadowFrameEPNS_6JValueE+114)
Stack frame #27 pc 001e697f  /system/lib/libart.so (_ZN3art11interpreter6DoCallILb0ELb0EEEbPNS_9ArtMethodEPNS_6ThreadERNS_11ShadowFrameEPKNS_11InstructionEtPNS_6JValueE+466)
Stack frame #28 pc 003fac8f  /system/lib/libart.so (MterpInvokeVirtual+430)
Stack frame #29 pc 0009c014  /system/lib/libart.so (ExecuteMterpImpl+14228)
Stack frame #30 pc 001ca7e3  /system/lib/libart.so (_ZN3art11interpreterL7ExecuteEPNS_6ThreadEPKNS_7DexFile8CodeItemERNS_11ShadowFrameENS_6JValueEb+290)
Stack frame #31 pc 001cf34b  /system/lib/libart.so (_ZN3art11interpreter33ArtInterpreterToInterpreterBridgeEPNS_6ThreadEPKNS_7DexFile8CodeItemEPNS_11ShadowFrameEPNS_6JValueE+114)
Stack frame #32 pc 001e697f  /system/lib/libart.so (_ZN3art11interpreter6DoCallILb0ELb0EEEbPNS_9ArtMethodEPNS_6ThreadERNS_11ShadowFrameEPKNS_11InstructionEtPNS_6JValueE+466)
Stack frame #33 pc 003fb98b  /system/lib/libart.so (MterpInvokeInterface+826)
Stack frame #34 pc 0009c214  /system/lib/libart.so (ExecuteMterpImpl+14740)
Stack frame #35 pc 001ca7e3  /system/lib/libart.so (_ZN3art11interpreterL7ExecuteEPNS_6ThreadEPKNS_7DexFile8CodeItemERNS_11ShadowFrameENS_6JValueEb+290)
Stack frame #36 pc 001cf2b5  /system/lib/libart.so (_ZN3art11interpreter30EnterInterpreterFromEntryPointEPNS_6ThreadEPKNS_7DexFile8CodeItemEPNS_11ShadowFrameE+92)
Stack frame #37 pc 003f26ff  /system/lib/libart.so (artQuickToInterpreterBridge+706)
Stack frame #38 pc 000adc13  /system/lib/libart.so (art_quick_to_interpreter_bridge+34)
Stack frame #39 pc 000044bd  /dev/ashmem/dalvik-jit-code-cache (deleted)

There is not much to go off except for the layer code but this code potentially be any layer. Would you be able to share more details about your setup? used components? or a minimal reproducible example? Thank you.

@AlexanderEggers
Copy link
Contributor Author

What components do you mean? Layers? App dependencies? Or something else?

I will try to start removing stuff from my current implementation to see if that changes anything. After that, I might create a minimal example.

@AlexanderEggers
Copy link
Contributor Author

I did some more testing before I start creating an example.

If I remove android:configChanges="orientation" from the activity that holds the fragment that holds the mapview then I get a different crash log. Maybe that helps you to get a better idea?

08-17 10:16:00.730 22369-22369/? A/DEBUG: backtrace:
        #00 pc 0000000000401c2c  /data/app/mordag.myapp-8g5v-mtf48ajqLEugQ6OsA==/lib/arm64/libmapbox-gl.so
        #01 pc 00000000000ac15c  /data/app/mordag.myapp-8g5v-mtf48ajqLEugQ6OsA==/lib/arm64/libmapbox-gl.so
        #02 pc 00000000005693e0  /system/lib64/libart.so (art_quick_generic_jni_trampoline+144)
        #03 pc 0000000000560388  /system/lib64/libart.so (art_quick_invoke_stub+584)
        #04 pc 00000000000cf6b8  /system/lib64/libart.so (art::ArtMethod::Invoke(art::Thread*, unsigned int*, unsigned int, art::JValue*, char const*)+200)
        #05 pc 0000000000282afc  /system/lib64/libart.so (art::interpreter::ArtInterpreterToCompiledCodeBridge(art::Thread*, art::ArtMethod*, art::ShadowFrame*, unsigned short, art::JValue*)+344)
        #06 pc 000000000027cbac  /system/lib64/libart.so (bool art::interpreter::DoCall<false, false>(art::ArtMethod*, art::Thread*, art::ShadowFrame&, art::Instruction const*, unsigned short, art::JValue*)+960)
        #07 pc 000000000052fabc  /system/lib64/libart.so (MterpInvokeVirtual+576)
        #08 pc 0000000000552994  /system/lib64/libart.so (ExecuteMterpImpl+14228)
        #09 pc 00000000002ac94e  /dev/ashmem/dalvik-classes.dex extracted in memory from /data/app/au.gov.vic.dewlp.ffmv.moretoexplore-8g5v-mtf48ajqLEugQ6OsA==/split_lib_dependencies_apk.apk (deleted) (com.mapbox.mapboxsdk.style.layers.Layer.getId+6)
        #10 pc 0000000000256d0c  /system/lib64/libart.so (_ZN3art11interpreterL7ExecuteEPNS_6ThreadERKNS_20CodeItemDataAccessorERNS_11ShadowFrameENS_6JValueEb.llvm.3442999494+488)
        #11 pc 000000000025c8bc  /system/lib64/libart.so (art::interpreter::ArtInterpreterToInterpreterBridge(art::Thread*, art::CodeItemDataAccessor const&, art::ShadowFrame*, art::JValue*)+216)
        #12 pc 000000000027cb90  /system/lib64/libart.so (bool art::interpreter::DoCall<false, false>(art::ArtMethod*, art::Thread*, art::ShadowFrame&, art::Instruction const*, unsigned short, art::JValue*)+932)
        #13 pc 000000000052fabc  /system/lib64/libart.so (MterpInvokeVirtual+576)
        #14 pc 0000000000552994  /system/lib64/libart.so (ExecuteMterpImpl+14228)
        #15 pc 000000000000546e  /dev/ashmem/dalvik-classes.dex extracted in memory from /data/app/au.gov.vic.dewlp.ffmv.moretoexplore-8g5v-mtf48ajqLEugQ6OsA==/split_lib_slice_2_apk.apk (deleted) (au.gov.vic.dewlp.ffmv.moretoexplore.mapbox.view.CustomMapView$addLayers$1.onMapReady+90)
        #16 pc 0000000000256d0c  /system/lib64/libart.so (_ZN3art11interpreterL7ExecuteEPNS_6ThreadERKNS_20CodeItemDataAccessorERNS_11ShadowFrameENS_6JValueEb.llvm.3442999494+488)
        #17 pc 000000000025c8bc  /system/lib64/libart.so (art::interpreter::ArtInterpreterToInterpreterBridge(art::Thread*, art::CodeItemDataAccessor const&, art::ShadowFrame*, art::JValue*)+216)
        #18 pc 000000000027cb90  /system/lib64/libart.so (bool art::interpreter::DoCall<false, false>(art::ArtMethod*, art::Thread*, art::ShadowFrame&, art::Instruction const*, unsigned short, art::JValue*)+932)
        #19 pc 0000000000530a10  /system/lib64/libart.so (MterpInvokeInterface+1376)
        #20 pc 0000000000552b94  /system/lib64/libart.so (ExecuteMterpImpl+14740)
        #21 pc 000000000029ce30  /dev/ashmem/dalvik-classes.dex extracted in memory from /data/app/au.gov.vic.dewlp.ffmv.moretoexplore-8g5v-mtf48ajqLEugQ6OsA==/split_lib_dependencies_apk.apk (deleted) (com.mapbox.mapboxsdk.maps.MapView.getMapAsync+20)
        #22 pc 0000000000256d0c  /system/lib64/libart.so (_ZN3art11interpreterL7ExecuteEPNS_6ThreadERKNS_20CodeItemDataAccessorERNS_11ShadowFrameENS_6JValueEb.llvm.3442999494+488)
08-17 10:16:00.731 22369-22369/? A/DEBUG:     #23 pc 000000000025c8bc  /system/lib64/libart.so (art::interpreter::ArtInterpreterToInterpreterBridge(art::Thread*, art::CodeItemDataAccessor const&, art::ShadowFrame*, art::JValue*)+216)
        #24 pc 000000000027cb90  /system/lib64/libart.so (bool art::interpreter::DoCall<false, false>(art::ArtMethod*, art::Thread*, art::ShadowFrame&, art::Instruction const*, unsigned short, art::JValue*)+932)
        #25 pc 000000000052fabc  /system/lib64/libart.so (MterpInvokeVirtual+576)
        #26 pc 0000000000552994  /system/lib64/libart.so (ExecuteMterpImpl+14228)
        #27 pc 000000000000bf96  /dev/ashmem/dalvik-classes.dex extracted in memory from /data/app/au.gov.vic.dewlp.ffmv.moretoexplore-8g5v-mtf48ajqLEugQ6OsA==/split_lib_slice_2_apk.apk (deleted) (au.gov.vic.dewlp.ffmv.moretoexplore.mapbox.view.CustomMapView.addLayers+86)
        #28 pc 0000000000256d0c  /system/lib64/libart.so (_ZN3art11interpreterL7ExecuteEPNS_6ThreadERKNS_20CodeItemDataAccessorERNS_11ShadowFrameENS_6JValueEb.llvm.3442999494+488)
        #29 pc 000000000025c8bc  /system/lib64/libart.so (art::interpreter::ArtInterpreterToInterpreterBridge(art::Thread*, art::CodeItemDataAccessor const&, art::ShadowFrame*, art::JValue*)+216)
        #30 pc 000000000027cb90  /system/lib64/libart.so (bool art::interpreter::DoCall<false, false>(art::ArtMethod*, art::Thread*, art::ShadowFrame&, art::Instruction const*, unsigned short, art::JValue*)+932)
        #31 pc 000000000052fabc  /system/lib64/libart.so (MterpInvokeVirtual+576)
        #32 pc 0000000000552994  /system/lib64/libart.so (ExecuteMterpImpl+14228)
        #33 pc 00000000000059f6  /dev/ashmem/dalvik-classes.dex extracted in memory from /data/app/mordag.myapp-mtf48ajqLEugQ6OsA==/split_lib_slice_2_apk.apk (deleted) (mordag.myapp.mapbox.view.CustomMapView$addSources$1.onMapReady+182)
        #34 pc 0000000000256d0c  /system/lib64/libart.so (_ZN3art11interpreterL7ExecuteEPNS_6ThreadERKNS_20CodeItemDataAccessorERNS_11ShadowFrameENS_6JValueEb.llvm.3442999494+488)
        #35 pc 000000000025c8bc  /system/lib64/libart.so (art::interpreter::ArtInterpreterToInterpreterBridge(art::Thread*, art::CodeItemDataAccessor const&, art::ShadowFrame*, art::JValue*)+216)
        #36 pc 000000000027cb90  /system/lib64/libart.so (bool art::interpreter::DoCall<false, false>(art::ArtMethod*, art::Thread*, art::ShadowFrame&, art::Instruction const*, unsigned short, art::JValue*)+932)
        #37 pc 0000000000530a10  /system/lib64/libart.so (MterpInvokeInterface+1376)
        #38 pc 0000000000552b94  /system/lib64/libart.so (ExecuteMterpImpl+14740)
        #39 pc 000000000029c760  /dev/ashmem/dalvik-classes.dex extracted in memory from /data/app/au.gov.vic.dewlp.ffmv.moretoexplore-8g5v-mtf48ajqLEugQ6OsA==/split_lib_dependencies_apk.apk (deleted) (com.mapbox.mapboxsdk.maps.MapView$MapCallback.onMapReady+56)
        #40 pc 0000000000256d0c  /system/lib64/libart.so (_ZN3art11interpreterL7ExecuteEPNS_6ThreadERKNS_20CodeItemDataAccessorERNS_11ShadowFrameENS_6JValueEb.llvm.3442999494+488)
        #41 pc 000000000025c8bc  /system/lib64/libart.so (art::interpreter::ArtInterpreterToInterpreterBridge(art::Thread*, art::CodeItemDataAccessor const&, art::ShadowFrame*, art::JValue*)+216)
        #42 pc 000000000027cb90  /system/lib64/libart.so (bool art::interpreter::DoCall<false, false>(art::ArtMethod*, art::Thread*, art::ShadowFrame&, art::Instruction const*, unsigned short, art::JValue*)+932)
        #43 pc 0000000000530dc4  /system/lib64/libart.so (MterpInvokeDirect+284)
        #44 pc 0000000000552a94  /system/lib64/libart.so (ExecuteMterpImpl+14484)
        #45 pc 000000000029c6c8  /dev/ashmem/dalvik-classes.dex extracted in memory from /data/app/au.gov.vic.dewlp.ffmv.moretoexplore-8g5v-mtf48ajqLEugQ6OsA==/split_lib_dependencies_apk.apk (deleted) (com.mapbox.mapboxsdk.maps.MapView$MapCallback.onMapChanged+32)
        #46 pc 0000000000256d0c  /system/lib64/libart.so (_ZN3art11interpreterL7ExecuteEPNS_6ThreadERKNS_20CodeItemDataAccessorERNS_11ShadowFrameENS_6JValueEb.llvm.3442999494+488)
        #47 pc 0000000000520284  /system/lib64/libart.so (artQuickToInterpreterBridge+944)
        #48 pc 00000000005694fc  /system/lib64/libart.so (art_quick_to_interpreter_bridge+92)
        #49 pc 00000000000514dc  /dev/ashmem/dalvik-jit-code-cache (deleted) (com.mapbox.mapboxsdk.maps.NativeMapView.onMapChanged+268)
        #50 pc 0000000000560388  /system/lib64/libart.so (art_quick_invoke_stub+584)
        #51 pc 00000000000cf6b8  /system/lib64/libart.so (art::ArtMethod::Invoke(art::Thread*, unsigned int*, unsigned int, art::JValue*, char const*)+200)
        #52 pc 00000000004661e4  /system/lib64/libart.so (art::(anonymous namespace)::InvokeWithArgArray(art::ScopedObjectAccessAlreadyRunnable const&, art::ArtMethod*, art::(anonymous namespace)::ArgArray*, art::JValue*, char const*)+104)
        #53 pc 000000000046761c  /system/lib64/libart.so (art::InvokeVirtualOrInterfaceWithVarArgs(art::ScopedObjectAccessAlreadyRunnable const&, _jobject*, _jmethodID*, std::__va_list)+440)
        #54 pc 00000000003450b4  /system/lib64/libart.so (art::JNI::CallVoidMethodV(_JNIEnv*, _jobject*, _jmethodID*, std::__va_list)+656)
        #55 pc 0000000000100620  /system/lib64/libart.so (art::(anonymous namespace)::CheckJNI::CallMethodV(char const*, _JNIEnv*, _jobject*, _jclass*, _jmethodID*, std::__va_list, art::Primitive::Type, art::InvokeType)+2572)
        #56 pc 00000000000ed7c0  /system/lib64/libart.so (art::(anonymous namespace)::CheckJNI::CallVoidMethodV(_JNIEnv*, _jobject*, _jmethodID*, std::__va_list)+92)
        #57 pc 0000000000068098  /data/app/mordag.myapp-8g5v-mtf48ajqLEugQ6OsA==/lib/arm64/libmapbox-gl.so
        #58 pc 00000000000705c4  /data/app/mordag.myapp-8g5v-mtf48ajqLEugQ6OsA==/lib/arm64/libmapbox-gl.so
        #59 pc 00000000000704b4  /data/app/mordag.myapp-8g5v-mtf48ajqLEugQ6OsA==/lib/arm64/libmapbox-gl.so
        #60 pc 00000000000d2904  /data/app/mordag.myapp-8g5v-mtf48ajqLEugQ6OsA==/lib/arm64/libmapbox-gl.so
        #61 pc 0000000000106aec  /data/app/mordag.myapp-8g5v-mtf48ajqLEugQ6OsA==/lib/arm64/libmapbox-gl.so
        #62 pc 0000000000108504  /data/app/mordag.myapp-8g5v-mtf48ajqLEugQ6OsA==/lib/arm64/libmapbox-gl.so
08-17 10:16:00.732 22369-22369/? A/DEBUG:     #63 pc 00000000000b7398  /data/app/mordag.myapp-8g5v-mtf48ajqLEugQ6OsA==/lib/arm64/libmapbox-gl.so
        #64 pc 00000000000d213c  /data/app/mordag.myapp-8g5v-mtf48ajqLEugQ6OsA==/lib/arm64/libmapbox-gl.so
        #65 pc 00000000001a6d98  /data/app/mordag.myapp-8g5v-mtf48ajqLEugQ6OsA==/lib/arm64/libmapbox-gl.so
        #66 pc 00000000001a6f44  /data/app/mordag.myapp-8g5v-mtf48ajqLEugQ6OsA==/lib/arm64/libmapbox-gl.so
        #67 pc 00000000001a5258  /data/app/mordag.myapp-8g5v-mtf48ajqLEugQ6OsA==/lib/arm64/libmapbox-gl.so
        #68 pc 000000000001438c  /system/lib64/libutils.so (android::Looper::pollInner(int)+868)
        #69 pc 0000000000013f8c  /system/lib64/libutils.so (android::Looper::pollOnce(int, int*, int*, void**)+60)
        #70 pc 0000000000120430  /system/lib64/libandroid_runtime.so (android::android_os_MessageQueue_nativePollOnce(_JNIEnv*, _jobject*, long, int)+44)
        #71 pc 00000000003e1fec  /system/framework/arm64/boot-framework.oat (offset 0x3cd000) (android.media.MediaExtractor.seekTo [DEDUPED]+140)
        #72 pc 000000000001d0fc  /dev/ashmem/dalvik-jit-code-cache (deleted) (android.os.MessageQueue.next+204)
        #73 pc 0000000000560388  /system/lib64/libart.so (art_quick_invoke_stub+584)
        #74 pc 00000000000cf6b8  /system/lib64/libart.so (art::ArtMethod::Invoke(art::Thread*, unsigned int*, unsigned int, art::JValue*, char const*)+200)
        #75 pc 0000000000282afc  /system/lib64/libart.so (art::interpreter::ArtInterpreterToCompiledCodeBridge(art::Thread*, art::ArtMethod*, art::ShadowFrame*, unsigned short, art::JValue*)+344)
        #76 pc 000000000027cbac  /system/lib64/libart.so (bool art::interpreter::DoCall<false, false>(art::ArtMethod*, art::Thread*, art::ShadowFrame&, art::Instruction const*, unsigned short, art::JValue*)+960)
        #77 pc 000000000052fabc  /system/lib64/libart.so (MterpInvokeVirtual+576)
        #78 pc 0000000000552994  /system/lib64/libart.so (ExecuteMterpImpl+14228)
        #79 pc 0000000000ae9e4c  /system/framework/boot-framework.vdex (android.os.Looper.loop+128)
        #80 pc 0000000000256d0c  /system/lib64/libart.so (_ZN3art11interpreterL7ExecuteEPNS_6ThreadERKNS_20CodeItemDataAccessorERNS_11ShadowFrameENS_6JValueEb.llvm.3442999494+488)
        #81 pc 000000000025c8bc  /system/lib64/libart.so (art::interpreter::ArtInterpreterToInterpreterBridge(art::Thread*, art::CodeItemDataAccessor const&, art::ShadowFrame*, art::JValue*)+216)
        #82 pc 000000000027cb90  /system/lib64/libart.so (bool art::interpreter::DoCall<false, false>(art::ArtMethod*, art::Thread*, art::ShadowFrame&, art::Instruction const*, unsigned short, art::JValue*)+932)
        #83 pc 0000000000530f84  /system/lib64/libart.so (MterpInvokeStatic+200)
        #84 pc 0000000000552b14  /system/lib64/libart.so (ExecuteMterpImpl+14612)
        #85 pc 00000000003849ba  /system/framework/boot-framework.vdex (android.app.ActivityThread.main+214)
        #86 pc 0000000000256d0c  /system/lib64/libart.so (_ZN3art11interpreterL7ExecuteEPNS_6ThreadERKNS_20CodeItemDataAccessorERNS_11ShadowFrameENS_6JValueEb.llvm.3442999494+488)
        #87 pc 0000000000520284  /system/lib64/libart.so (artQuickToInterpreterBridge+944)
        #88 pc 00000000005694fc  /system/lib64/libart.so (art_quick_to_interpreter_bridge+92)
        #89 pc 000000000056064c  /system/lib64/libart.so (art_quick_invoke_static_stub+604)
        #90 pc 00000000000cf6d8  /system/lib64/libart.so (art::ArtMethod::Invoke(art::Thread*, unsigned int*, unsigned int, art::JValue*, char const*)+232)
        #91 pc 00000000004661e4  /system/lib64/libart.so (art::(anonymous namespace)::InvokeWithArgArray(art::ScopedObjectAccessAlreadyRunnable const&, art::ArtMethod*, art::(anonymous namespace)::ArgArray*, art::JValue*, char const*)+104)
        #92 pc 0000000000467d38  /system/lib64/libart.so (art::InvokeMethod(art::ScopedObjectAccessAlreadyRunnable const&, _jobject*, _jobject*, _jobject*, unsigned long)+1440)
        #93 pc 00000000003f6728  /system/lib64/libart.so (art::Method_invoke(_JNIEnv*, _jobject*, _jobject*, _jobjectArray*)+52)
        #94 pc 000000000011e6d4  /system/framework/arm64/boot.oat (offset 0x114000) (java.lang.Class.getDeclaredMethodInternal [DEDUPED]+180)
        #95 pc 0000000000560388  /system/lib64/libart.so (art_quick_invoke_stub+584)
        #96 pc 00000000000cf6b8  /system/lib64/libart.so (art::ArtMethod::Invoke(art::Thread*, unsigned int*, unsigned int, art::JValue*, char const*)+200)
        #97 pc 0000000000282afc  /system/lib64/libart.so (art::interpreter::ArtInterpreterToCompiledCodeBridge(art::Thread*, art::ArtMethod*, art::ShadowFrame*, unsigned short, art::JValue*)+344)
        #98 pc 000000000027cbac  /system/lib64/libart.so (bool art::interpreter::DoCall<false, false>(art::ArtMethod*, art::Thread*, art::ShadowFrame&, art::Instruction const*, unsigned short, art::JValue*)+960)
        #99 pc 000000000052fabc  /system/lib64/libart.so (MterpInvokeVirtual+576)
        #100 pc 0000000000552994  /system/lib64/libart.so (ExecuteMterpImpl+14228)
        #101 pc 0000000000c0ad26  /system/framework/boot-framework.vdex (com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run+22)
        #102 pc 0000000000256d0c  /system/lib64/libart.so (_ZN3art11interpreterL7ExecuteEPNS_6ThreadERKNS_20CodeItemDataAccessorERNS_11ShadowFrameENS_6JValueEb.llvm.3442999494+488)
        #103 pc 0000000000520284  /system/lib64/libart.so (artQuickToInterpreterBridge+944)
        #104 pc 00000000005694fc  /system/lib64/libart.so (art_quick_to_interpreter_bridge+92)
        #105 pc 0000000000beabf0  /system/framework/arm64/boot-framework.oat (offset 0x3cd000) (com.android.internal.os.ZygoteInit.main+3088)
08-17 10:16:00.733 22369-22369/? A/DEBUG:     #106 pc 000000000056064c  /system/lib64/libart.so (art_quick_invoke_static_stub+604)
        #107 pc 00000000000cf6d8  /system/lib64/libart.so (art::ArtMethod::Invoke(art::Thread*, unsigned int*, unsigned int, art::JValue*, char const*)+232)
        #108 pc 00000000004661e4  /system/lib64/libart.so (art::(anonymous namespace)::InvokeWithArgArray(art::ScopedObjectAccessAlreadyRunnable const&, art::ArtMethod*, art::(anonymous namespace)::ArgArray*, art::JValue*, char const*)+104)
        #109 pc 0000000000465de8  /system/lib64/libart.so (art::InvokeWithVarArgs(art::ScopedObjectAccessAlreadyRunnable const&, _jobject*, _jmethodID*, std::__va_list)+424)
        #110 pc 0000000000368494  /system/lib64/libart.so (art::JNI::CallStaticVoidMethodV(_JNIEnv*, _jclass*, _jmethodID*, std::__va_list)+652)
        #111 pc 00000000000b1bcc  /system/lib64/libandroid_runtime.so (_JNIEnv::CallStaticVoidMethod(_jclass*, _jmethodID*, ...)+136)
        #112 pc 00000000000b4558  /system/lib64/libandroid_runtime.so (android::AndroidRuntime::start(char const*, android::Vector<android::String8> const&, bool)+752)
        #113 pc 000000000000219c  /system/bin/app_process64 (main+1200)
        #114 pc 00000000000b055c  /system/lib64/libc.so (__libc_init+88)

@AlexanderEggers
Copy link
Contributor Author

@tobrun I found the root problem.

If I rotate the activity and recreate the mapview (adding everything back), the method mapbox.getLayer(id) is throwing an exception.

java.lang.Error: wstring_convert: from_bytes error
        at com.mapbox.mapboxsdk.style.layers.Layer.nativeGetId(Native Method)
        at com.mapbox.mapboxsdk.style.layers.Layer.getId(Layer.java:55)
        at mordag.myapp.view.CustomMapView$addLayers$1.onMapReady(CustomMapView.kt:115)
        at com.mapbox.mapboxsdk.maps.MapView.getMapAsync(MapView.java:685)
        at mordag.myapp.CustomMapView.addLayers(CustomMapView.kt:110)
        at mordag.myapp.view.CustomMapView$addSources$1.onMapReady(CustomMapView.kt:97)
        at com.mapbox.mapboxsdk.maps.MapView$MapCallback.onMapReady(MapView.java:1212)
        at com.mapbox.mapboxsdk.maps.MapView$MapCallback.onMapChanged(MapView.java:1197)
        at com.mapbox.mapboxsdk.maps.NativeMapView.onMapChanged(NativeMapView.java:903)
08-17 11:13:34.150 26802-26802/mordag.myapp W/System.err:     at android.os.MessageQueue.nativePollOnce(Native Method)
        at android.os.MessageQueue.next(MessageQueue.java:326)
        at android.os.Looper.loop(Looper.java:160)
        at android.app.ActivityThread.main(ActivityThread.java:6669)
        at java.lang.reflect.Method.invoke(Native Method)
        at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:493)
        at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:858)

@AlexanderEggers
Copy link
Contributor Author

I probably won't be able to provide any simplified example for the crash anytime soon. Therefore I will close the issue.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Android Mapbox Maps SDK for Android needs information
Projects
None yet
Development

No branches or pull requests

2 participants