here-android-sdk-examples
here-android-sdk-examples copied to clipboard
setMapUpdateMode causes ANR
@HybridPlus
public NavigationManager.Error setMapUpdateMode(NavigationManager.MapUpdateMode var1) {
return this.c.a(var1);
}
This method causes ANR in case of passing ROADVIEW as a parameter.
Here android SDK versionName="3.15.2"
Full log (without our app package name):
"main" prio=5 tid=1 Blocked
| group="main" sCount=1 dsCount=0 flags=1 obj=0x758437d0 self=0x79cca0dc00
| sysTid=30763 nice=0 cgrp=default sched=1073741825/1 handle=0x7a525d9548
| state=S schedstat=( 40646478538 446455903 6509 ) utm=3879 stm=185 core=4 HZ=100
| stack=0x7ffc2e5000-0x7ffc2e7000 stackSize=8MB
| held mutexes=
kernel: (couldn't read /proc/self/task/30763/stack)
native: #00 pc 000000000001ed2c /system/lib64/libc.so (syscall+28)
native: #01 pc 00000000000d7424 /system/lib64/libart.so (art::ConditionVariable::WaitHoldingLocks(art::Thread*)+148)
native: #02 pc 00000000003be8ac /system/lib64/libart.so (_ZN3art7Monitor4LockILNS_10LockReasonE1EEEvPNS_6ThreadE+2052)
native: #03 pc 00000000003c3ed8 /system/lib64/libart.so (art::Monitor::MonitorEnter(art::Thread*, art::mirror::Object*, bool)+504)
native: #04 pc 000000000051b60c /system/lib64/libart.so (art::JniMethodStartSynchronized(_jobject*, art::Thread*)+44)
native: #05 pc 0000000000523d40 /system/lib64/libart.so (artQuickGenericJniTrampoline+1136)
native: #06 pc 0000000000565bac /system/lib64/libart.so (art_quick_generic_jni_trampoline+92)
native: #07 pc 000000000055cb88 /system/lib64/libart.so (art_quick_invoke_stub+584)
native: #08 pc 00000000000cf740 /system/lib64/libart.so (art::ArtMethod::Invoke(art::Thread*, unsigned int*, unsigned int, art::JValue*, char const*)+200)
native: #09 pc 0000000000282438 /system/lib64/libart.so (art::interpreter::ArtInterpreterToCompiledCodeBridge(art::Thread*, art::ArtMethod*, art::ShadowFrame*, unsigned short, art::JValue*)+344)
native: #10 pc 000000000027c3f4 /system/lib64/libart.so (bool art::interpreter::DoCall<false, false>(art::ArtMethod*, art::Thread*, art::ShadowFrame&, art::Instruction const*, unsigned short, art::JValue*)+948)
native: #11 pc 000000000052d810 /system/lib64/libart.so (MterpInvokeDirect+296)
native: #12 pc 000000000054f294 /system/lib64/libart.so (ExecuteMterpImpl+14484)
native: #13 pc 000000000015d088 /dev/ashmem/dalvik-classes91.dex extracted in memory from /data/app/com.example-zjWTm-mxZQkwZ7fG7WLLww==/base.apk!classes91.dex (deleted) (com.nokia.maps.NavigationManagerImpl.b+8)
native: #14 pc 0000000000255ef0 /system/lib64/libart.so (_ZN3art11interpreterL7ExecuteEPNS_6ThreadERKNS_20CodeItemDataAccessorERNS_11ShadowFrameENS_6JValueEb.llvm.2250428965+496)
native: #15 pc 000000000025ba70 /system/lib64/libart.so (art::interpreter::ArtInterpreterToInterpreterBridge(art::Thread*, art::CodeItemDataAccessor const&, art::ShadowFrame*, art::JValue*)+216)
native: #16 pc 000000000027c3d8 /system/lib64/libart.so (bool art::interpreter::DoCall<false, false>(art::ArtMethod*, art::Thread*, art::ShadowFrame&, art::Instruction const*, unsigned short, art::JValue*)+920)
native: #17 pc 000000000052d810 /system/lib64/libart.so (MterpInvokeDirect+296)
native: #18 pc 000000000054f294 /system/lib64/libart.so (ExecuteMterpImpl+14484)
native: #19 pc 000000000015cdce /dev/ashmem/dalvik-classes91.dex extracted in memory from /data/app/com.example-zjWTm-mxZQkwZ7fG7WLLww==/base.apk!classes91.dex (deleted) (com.nokia.maps.NavigationManagerImpl.a+22)
native: #20 pc 0000000000255ef0 /system/lib64/libart.so (_ZN3art11interpreterL7ExecuteEPNS_6ThreadERKNS_20CodeItemDataAccessorERNS_11ShadowFrameENS_6JValueEb.llvm.2250428965+496)
native: #21 pc 000000000025ba70 /system/lib64/libart.so (art::interpreter::ArtInterpreterToInterpreterBridge(art::Thread*, art::CodeItemDataAccessor const&, art::ShadowFrame*, art::JValue*)+216)
native: #22 pc 000000000027c3d8 /system/lib64/libart.so (bool art::interpreter::DoCall<false, false>(art::ArtMethod*, art::Thread*, art::ShadowFrame&, art::Instruction const*, unsigned short, art::JValue*)+920)
native: #23 pc 000000000052c4d0 /system/lib64/libart.so (MterpInvokeVirtual+584)
native: #24 pc 000000000054f194 /system/lib64/libart.so (ExecuteMterpImpl+14228)
native: #25 pc 00000000000b3bb4 /dev/ashmem/dalvik-classes91.dex extracted in memory from /data/app/com.example-zjWTm-mxZQkwZ7fG7WLLww==/base.apk!classes91.dex (deleted) (com.here.android.mpa.guidance.NavigationManager.setMapUpdateMode+4)
native: #26 pc 0000000000255ef0 /system/lib64/libart.so (_ZN3art11interpreterL7ExecuteEPNS_6ThreadERKNS_20CodeItemDataAccessorERNS_11ShadowFrameENS_6JValueEb.llvm.2250428965+496)
native: #27 pc 000000000025ba70 /system/lib64/libart.so (art::interpreter::ArtInterpreterToInterpreterBridge(art::Thread*, art::CodeItemDataAccessor const&, art::ShadowFrame*, art::JValue*)+216)
native: #28 pc 000000000027c3d8 /system/lib64/libart.so (bool art::interpreter::DoCall<false, false>(art::ArtMethod*, art::Thread*, art::ShadowFrame&, art::Instruction const*, unsigned short, art::JValue*)+920)
native: #29 pc 000000000052c4d0 /system/lib64/libart.so (MterpInvokeVirtual+584)
native: #30 pc 000000000054f194 /system/lib64/libart.so (ExecuteMterpImpl+14228)
native: #31 pc 0000000000014b98 /dev/ashmem/dalvik-classes8.dex extracted in memory from /data/app/com.example-zjWTm-mxZQkwZ7fG7WLLww==/base.apk!classes8.dex (deleted) (our function call)
native: #32 pc 0000000000255ef0 /system/lib64/libart.so (_ZN3art11interpreterL7ExecuteEPNS_6ThreadERKNS_20CodeItemDataAccessorERNS_11ShadowFrameENS_6JValueEb.llvm.2250428965+496)
native: #33 pc 000000000025ba70 /system/lib64/libart.so (art::interpreter::ArtInterpreterToInterpreterBridge(art::Thread*, art::CodeItemDataAccessor const&, art::ShadowFrame*, art::JValue*)+216)
native: #34 pc 000000000027c3d8 /system/lib64/libart.so (bool art::interpreter::DoCall<false, false>(art::ArtMethod*, art::Thread*, art::ShadowFrame&, art::Instruction const*, unsigned short, art::JValue*)+920)
native: #35 pc 000000000052d810 /system/lib64/libart.so (MterpInvokeDirect+296)
native: #36 pc 000000000054f294 /system/lib64/libart.so (ExecuteMterpImpl+14484)
native: #37 pc 0000000000014c60 /dev/ashmem/dalvik-classes8.dex extracted in memory from /data/app/com.example-zjWTm-mxZQkwZ7fG7WLLww==/base.apk!classes8.dex (deleted) (our function call)
native: #38 pc 0000000000255ef0 /system/lib64/libart.so (_ZN3art11interpreterL7ExecuteEPNS_6ThreadERKNS_20CodeItemDataAccessorERNS_11ShadowFrameENS_6JValueEb.llvm.2250428965+496)
native: #39 pc 000000000025ba70 /system/lib64/libart.so (art::interpreter::ArtInterpreterToInterpreterBridge(art::Thread*, art::CodeItemDataAccessor const&, art::ShadowFrame*, art::JValue*)+216)
native: #40 pc 000000000027c3d8 /system/lib64/libart.so (bool art::interpreter::DoCall<false, false>(art::ArtMethod*, art::Thread*, art::ShadowFrame&, art::Instruction const*, unsigned short, art::JValue*)+920)
native: #41 pc 000000000052d448 /system/lib64/libart.so (MterpInvokeInterface+1392)
native: #42 pc 000000000054f394 /system/lib64/libart.so (ExecuteMterpImpl+14740)
native: #43 pc 00000000000208e6 /dev/ashmem/dalvik-classes8.dex extracted in memory from /data/app/com.example-zjWTm-mxZQkwZ7fG7WLLww==/base.apk!classes8.dex (deleted) (our function call)
native: #44 pc 0000000000255ef0 /system/lib64/libart.so (_ZN3art11interpreterL7ExecuteEPNS_6ThreadERKNS_20CodeItemDataAccessorERNS_11ShadowFrameENS_6JValueEb.llvm.2250428965+496)
native: #45 pc 000000000025ba70 /system/lib64/libart.so (art::interpreter::ArtInterpreterToInterpreterBridge(art::Thread*, art::CodeItemDataAccessor const&, art::ShadowFrame*, art::JValue*)+216)
native: #46 pc 000000000027c3d8 /system/lib64/libart.so (bool art::interpreter::DoCall<false, false>(art::ArtMethod*, art::Thread*, art::ShadowFrame&, art::Instruction const*, unsigned short, art::JValue*)+920)
native: #47 pc 000000000052c4d0 /system/lib64/libart.so (MterpInvokeVirtual+584)
native: #48 pc 000000000054f194 /system/lib64/libart.so (ExecuteMterpImpl+14228)
native: #49 pc 0000000000020688 /dev/ashmem/dalvik-classes8.dex extracted in memory from /data/app/com.example-zjWTm-mxZQkwZ7fG7WLLww==/base.apk!classes8.dex (deleted) (our function call)
native: #50 pc 0000000000255ef0 /system/lib64/libart.so (_ZN3art11interpreterL7ExecuteEPNS_6ThreadERKNS_20CodeItemDataAccessorERNS_11ShadowFrameENS_6JValueEb.llvm.2250428965+496)
native: #51 pc 000000000051cc10 /system/lib64/libart.so (artQuickToInterpreterBridge+1032)
native: #52 pc 0000000000565cfc /system/lib64/libart.so (art_quick_to_interpreter_bridge+92)
native: #53 pc 00000000000aef18 /dev/ashmem/dalvik-jit-code-cache (deleted) (kotlin.coroutines.jvm.internal.BaseContinuationImpl.resumeWith+168)
native: #54 pc 00000000000b0554 /dev/ashmem/dalvik-jit-code-cache (deleted) (kotlinx.coroutines.DispatchedTask.run+836)
native: #55 pc 0000000000144ff8 /dev/ashmem/dalvik-jit-code-cache (deleted) (android.os.Handler.handleCallback+56)
native: #56 pc 0000000000148ffc /dev/ashmem/dalvik-jit-code-cache (deleted) (android.os.Handler.dispatchMessage+60)
native: #57 pc 000000000055cb88 /system/lib64/libart.so (art_quick_invoke_stub+584)
native: #58 pc 00000000000cf740 /system/lib64/libart.so (art::ArtMethod::Invoke(art::Thread*, unsigned int*, unsigned int, art::JValue*, char const*)+200)
native: #59 pc 0000000000282438 /system/lib64/libart.so (art::interpreter::ArtInterpreterToCompiledCodeBridge(art::Thread*, art::ArtMethod*, art::ShadowFrame*, unsigned short, art::JValue*)+344)
native: #60 pc 000000000027c3f4 /system/lib64/libart.so (bool art::interpreter::DoCall<false, false>(art::ArtMethod*, art::Thread*, art::ShadowFrame&, art::Instruction const*, unsigned short, art::JValue*)+948)
native: #61 pc 000000000052c4d0 /system/lib64/libart.so (MterpInvokeVirtual+584)
native: #62 pc 000000000054f194 /system/lib64/libart.so (ExecuteMterpImpl+14228)
native: #63 pc 0000000000a319ea /system/framework/boot-framework.vdex (android.os.Looper.loop+414)
native: #64 pc 0000000000255ef0 /system/lib64/libart.so (_ZN3art11interpreterL7ExecuteEPNS_6ThreadERKNS_20CodeItemDataAccessorERNS_11ShadowFrameENS_6JValueEb.llvm.2250428965+496)
native: #65 pc 000000000025ba70 /system/lib64/libart.so (art::interpreter::ArtInterpreterToInterpreterBridge(art::Thread*, art::CodeItemDataAccessor const&, art::ShadowFrame*, art::JValue*)+216)
native: #66 pc 000000000027c3d8 /system/lib64/libart.so (bool art::interpreter::DoCall<false, false>(art::ArtMethod*, art::Thread*, art::ShadowFrame&, art::Instruction const*, unsigned short, art::JValue*)+920)
native: #67 pc 000000000052d9d4 /system/lib64/libart.so (MterpInvokeStatic+204)
native: #68 pc 000000000054f314 /system/lib64/libart.so (ExecuteMterpImpl+14612)
native: #69 pc 000000000037553c /system/framework/boot-framework.vdex (android.app.ActivityThread.main+216)
native: #70 pc 0000000000255ef0 /system/lib64/libart.so (_ZN3art11interpreterL7ExecuteEPNS_6ThreadERKNS_20CodeItemDataAccessorERNS_11ShadowFrameENS_6JValueEb.llvm.2250428965+496)
native: #71 pc 000000000051cc10 /system/lib64/libart.so (artQuickToInterpreterBridge+1032)
native: #72 pc 0000000000565cfc /system/lib64/libart.so (art_quick_to_interpreter_bridge+92)
native: #73 pc 000000000055ce4c /system/lib64/libart.so (art_quick_invoke_static_stub+604)
native: #74 pc 00000000000cf760 /system/lib64/libart.so (art::ArtMethod::Invoke(art::Thread*, unsigned int*, unsigned int, art::JValue*, char const*)+232)
native: #75 pc 0000000000463468 /system/lib64/libart.so (art::(anonymous namespace)::InvokeWithArgArray(art::ScopedObjectAccessAlreadyRunnable const&, art::ArtMethod*, art::(anonymous namespace)::ArgArray*, art::JValue*, char const*)+104)
native: #76 pc 0000000000464ec0 /system/lib64/libart.so (art::InvokeMethod(art::ScopedObjectAccessAlreadyRunnable const&, _jobject*, _jobject*, _jobject*, unsigned long)+1440)
native: #77 pc 00000000003f4460 /system/lib64/libart.so (art::Method_invoke(_JNIEnv*, _jobject*, _jobject*, _jobjectArray*)+48)
at com.nokia.maps.NavigationManagerImpl.setMapUpdateMode(Native method)
@samvgorode how often do you see this behaviour? Do you have steps to reproduce?
@NazarKacharaba in my application I can reproduce it every time. I need to know what can be a reason.
@samvgorode could you create code sample and share it with us so we can reproduce and fix it?
@NazarKacharaba UPD. It happens on different devices. Main step to reproduce - create a very long route (f.e. Los Angeles - New York) and launch guidance.
@NazarKacharaba seems like I've found a real reason for this ANR. Starting MapDataPrefetcher.fetchData(route: Route)
with a very long route as a parameter causes this problem.
How to start a big route with prefetching properly? Maybe there are any tips & tricks?
Are you waiting until route fetching is finished before starting navigation with this route?
No. Just start navigation immediately. Should I wait until fetching is done?
Yes, you should wait until fetching is finished.
Thank you. I will try on Monday and let you know the result.