maplibre / maplibre-navigation-android

Maplibre Navigation SDK for Android
MIT License
94 stars 51 forks source link

Navigation SDk crash when app theme change during active navigation #59

Open jDilshodbek opened 1 year ago

jDilshodbek commented 1 year ago

The app is crashing when app theme changed

Steps to trigger behavior

  1. Make an active navigation with valid route
  2. App theme is changed from Day to Night or vise version by AppCompatDelegate.setDefaultNightMode(AppCompatDelegate.MODE_NIGHT_YES) or AppCompatDelegate.setDefaultNightMode(AppCompatDelegate.MODE_NIGHT_NO)

App configuration setup

implementation 'org.maplibre.gl:android-sdk:10.0.2' implementation('com.github.maplibre:maplibre-navigation-android:2.0.0') { exclude group: 'com.github.maplibre.maplibre-navigation-android', module: 'libandroid-navigation-ui' } implementation 'org.maplibre.gl:android-plugin-annotation-v9:1.0.0'

Expected behavior

App should work without problem when changing app theme during active navigation

Actual behavior

App is crashing after changing theme during navigation

Crash log

2023-05-22 09:02:51.839 7075-7075 DEBUG crash_dump64 A Cmdline: com.uznewmax.mytaxidriver 2023-05-22 09:02:51.839 7075-7075 DEBUG crash_dump64 A pid: 5296, tid: 5296, name: ax.mytaxidriver >>> com.uznewmax.mytaxidriver <<< 2023-05-22 09:02:51.840 7075-7075 DEBUG crash_dump64 A #00 pc 000000000066d430 /data/app/~~pherX7L4TZD73MKDvel0iA==/com.uznewmax.mytaxidriver-p1gSwX2T2MocgTIdcl2IYg==/base.apk!libmapbox-gl.so (BuildId: d449d063f42831e0fba34c29bbe5f7f11738ed14) 2023-05-22 09:02:51.840 7075-7075 DEBUG crash_dump64 A #01 pc 0000000000497ae4 /data/app/~~pherX7L4TZD73MKDvel0iA==/com.uznewmax.mytaxidriver-p1gSwX2T2MocgTIdcl2IYg==/base.apk!libmapbox-gl.so (mbgl::android::Layer::getVisibility(_JNIEnv&)+44) (BuildId: d449d063f42831e0fba34c29bbe5f7f11738ed14) 2023-05-22 09:02:51.840 7075-7075 DEBUG crash_dump64 A #02 pc 0000000000499cc4 /data/app/~~pherX7L4TZD73MKDvel0iA==/com.uznewmax.mytaxidriver-p1gSwX2T2MocgTIdcl2IYg==/base.apk!libmapbox-gl.so (auto jni::NativeMethodMaker<jni::Unique<jni::Object<jni::ObjectTag>, jni::DefaultRefDeleter<&(_JNIEnv::DeleteLocalRef(_jobject*))> > (auto jni::NativePeerMemberFunctionMethod<jni::Unique<jni::Object<jni::ObjectTag>, jni::DefaultRefDeleter<&(_JNIEnv::DeleteLocalRef(_jobject*))> > (mbgl::android::Layer::*)(_JNIEnv&), &(mbgl::android::Layer::getVisibility(_JNIEnv&))>::operator()<mbgl::android::Layer, mbgl::android::Layer, void>(jni::Field<mbgl::android::Layer, long> const&)::‘lambda’(_JNIEnv&, jni::Object<mbgl::android::Layer>&)::*)(_JNIEnv&, jni::Object<mbgl::android::Layer>&) const>::operator()<auto jni::NativePeerMemberFunctionMethod<jni::Unique<jni::Object<jni::ObjectTag>, jni::DefaultRefDeleter<&(_JNIEnv::DeleteLocalRef(_jobject*))> > (mbgl::android::Layer::*)(_JNIEnv&), &(mbgl::android::Layer::getVisibility(_JNIEnv&))>::operator()<mbgl::android::Layer, mbgl::android::Layer, void>(jni::Field<mbgl::android::Layer, long> const&)::‘lambda’(_JNIEnv&, jni::Object<mbgl::android::Layer>&)>(char const*, auto jni::NativePeerMemberFunctionMethod<jni::Unique<jni::Object<jni::ObjectTag>, jni::DefaultRefDeleter<&(_JNIEnv::DeleteLocalRef(_jobject*))> > (mbgl::android::Layer::*)(_JNIEnv&), &(mbgl::android::Layer::getVisibility(_JNIEnv&))>::operator()<mbgl::android::Layer, mbgl::android::Layer, void>(jni::Field<mbgl::android::Layer, long> const&)::‘lambda’(_JNIEnv&, jni::Object<mbgl::android::Layer>&) const&)::‘lambda’(_JNIEnv*, jni::jobject*)::__invoke(_JNIEnv*, jni::jobject*)+104) (BuildId: d449d063f42831e0fba34c29bbe5f7f11738ed14) 2023-05-22 09:02:51.840 7075-7075 DEBUG crash_dump64 A #03 pc 0000000000499d6c /data/app/~~pherX7L4TZD73MKDvel0iA==/com.uznewmax.mytaxidriver-p1gSwX2T2MocgTIdcl2IYg==/base.apk!libmapbox-gl.so (auto auto jni::MakeNativeMethod<auto jni::NativeMethodMaker<jni::Unique<jni::Object<jni::ObjectTag>, jni::DefaultRefDeleter<&(_JNIEnv::DeleteLocalRef(_jobject*))> > (auto jni::NativePeerMemberFunctionMethod<jni::Unique<jni::Object<jni::ObjectTag>, jni::DefaultRefDeleter<&(_JNIEnv::DeleteLocalRef(_jobject*))> > (mbgl::android::Layer::*)(_JNIEnv&), &(mbgl::android::Layer::getVisibility(_JNIEnv&))>::operator()<mbgl::android::Layer, mbgl::android::Layer, void>(jni::Field<mbgl::android::Layer, long> const&)::‘lambda’(_JNIEnv&, jni::Object<mbgl::android::Layer>&)::*)(_JNIEnv&, jni::Object<mbgl::android::Layer>&) const>::operator()<auto jni::NativePeerMemberFunctionMethod<jni::Unique<jni::Object<jni::ObjectTag>, jni::DefaultRefDeleter<&(_JNIEnv::DeleteLocalRef(_jobject*))> > (mbgl::android::Layer::*)(_JNIEnv&), &(mbgl::android::Layer::getVisibility(_JNIEnv&))>::operator()<mbgl::android::Layer, mbgl::android::Layer, void>(jni::Field<mbgl::android::Layer, long> const&)::‘lambda’(_JNIEnv&, jni::Object<mbgl::android::Layer>&)>(char const*, auto jni::NativePeerMemberFunctionMethod<jni::Unique<jni::Object<jni::ObjectTag>, jni::DefaultRefDeleter<&(_JNIEnv::DeleteLocalRef(_jobject*))> > (mbgl::android::Layer::*)(_JNIEnv&), &(mbgl::android::Layer::getVisibility(_JNIEnv&))>::operator()<mbgl::android::Layer, mbgl::android::Layer, void>(jni::Field<mbgl::android::Layer, long> const&)::‘lambda’(_JNIEnv&, jni::Object<mbgl::android::Layer>&) const&)::‘lambda’(_JNIEnv*, jni::jobject*)>(char const*, char const*, auto jni::NativePeerMemberFunctionMethod<jni::Unique<jni::Object<jni::ObjectTag>, jni::DefaultRefDeleter<&(_JNIEnv::DeleteLocalRef(_jobject*))> > (mbgl::android::Layer::*)(_JNIEnv&), &(mbgl::android::Layer::getVisibility(_JNIEnv&))>::operator()<mbgl::android::Layer, mbgl::android::Layer, void>(jni::Field<mbgl::android::Layer, long> const&)::‘lambda’(_JNIEnv&, jni::Object<mbgl::android::Layer>&) const&, std::__ndk1::enable_if<std::is_class<auto jni::NativePeerMemberFunctionMethod<jni::Unique<jni::Object<jni::ObjectTag>, jni::DefaultRefDeleter<&(_JNIEnv::DeleteLocalRef(_jobject*))> > (mbgl::android::Layer::*)(_JNIEnv&), &(mbgl::android::Layer::getVisibility(_JNIEnv&))>::operator()<mbgl::android::Layer, mbgl::android::Layer, void>(jni::Field<mbgl::android::Layer, long> const&)::‘lambda’(_JNIEnv&, jni::Object<mbgl::android::Layer>&)>::value, void>::type*)::‘lambda’(_JNIEnv*, auto...)::__invoke<jni::jobject*>(_JNIEnv*, auto...)+44) (BuildId: d449d063f42831e0fba34c29bbe5f7f11738ed14) 2023-05-22 09:02:51.840 7075-7075 DEBUG crash_dump64 A #06 pc 00000000002b006a [anon:dalvik-classes19.dex extracted in memory from /data/app/~~pherX7L4TZD73MKDvel0iA==/com.uznewmax.mytaxidriver-p1gSwX2T2MocgTIdcl2IYg==/base.apk!classes19.dex] (com.mapbox.mapboxsdk.style.layers.Layer.getVisibility+10) 2023-05-22 09:02:51.841 7075-7075 DEBUG crash_dump64 A #08 pc 00000000002c2d74 [anon:dalvik-classes19.dex extracted in memory from /data/app/~~pherX7L4TZD73MKDvel0iA==/com.uznewmax.mytaxidriver-p1gSwX2T2MocgTIdcl2IYg==/base.apk!classes19.dex] (com.mapbox.services.android.navigation.v5.navigation.NavigationMapRoute.updateArrowLayersVisibilityTo+56) 2023-05-22 09:02:51.841 7075-7075 DEBUG crash_dump64 A #10 pc 00000000002c2180 [anon:dalvik-classes19.dex extracted in memory from /data/app/~~pherX7L4TZD73MKDvel0iA==/com.uznewmax.mytaxidriver-p1gSwX2T2MocgTIdcl2IYg==/base.apk!classes19.dex] (com.mapbox.services.android.navigation.v5.navigation.NavigationMapRoute.clearRoutes+8) 2023-05-22 09:02:51.841 7075-7075 DEBUG crash_dump64 A #12 pc 00000000002c1de0 [anon:dalvik-classes19.dex extracted in memory from /data/app/~~pherX7L4TZD73MKDvel0iA==/com.uznewmax.mytaxidriver-p1gSwX2T2MocgTIdcl2IYg==/base.apk!classes19.dex] (com.mapbox.services.android.navigation.v5.navigation.NavigationMapRoute.addRoutes+0) 2023-05-22 09:02:51.841 7075-7075 DEBUG crash_dump64 A #14 pc 00000000002c19ec [anon:dalvik-classes19.dex extracted in memory from /data/app/~~pherX7L4TZD73MKDvel0iA==/com.uznewmax.mytaxidriver-p1gSwX2T2MocgTIdcl2IYg==/base.apk!classes19.dex] (com.mapbox.services.android.navigation.v5.navigation.NavigationMapRoute.addRoute+16) 2023-05-22 09:02:51.841 7075-7075 DEBUG crash_dump64 A #16 pc 00000000002c5198 [anon:dalvik-classes19.dex extracted in memory from /data/app/~~pherX7L4TZD73MKDvel0iA==/com.uznewmax.mytaxidriver-p1gSwX2T2MocgTIdcl2IYg==/base.apk!classes19.dex] (com.mapbox.services.android.navigation.v5.route.MapRouteProgressChangeListener.addNewRoute+16) 2023-05-22 09:02:51.841 7075-7075 DEBUG crash_dump64 A #18 pc 00000000002c51d0 [anon:dalvik-classes19.dex extracted in memory from /data/app/~~pherX7L4TZD73MKDvel0iA==/com.uznewmax.mytaxidriver-p1gSwX2T2MocgTIdcl2IYg==/base.apk!classes19.dex] (com.mapbox.services.android.navigation.v5.route.MapRouteProgressChangeListener.onProgressChange+32) 2023-05-22 09:02:51.841 7075-7075 DEBUG crash_dump64 A #20 pc 00000000002bf834 [anon:dalvik-classes19.dex extracted in memory from /data/app/~~pherX7L4TZD73MKDvel0iA==/com.uznewmax.mytaxidriver-p1gSwX2T2MocgTIdcl2IYg==/base.apk!classes19.dex] (com.mapbox.services.android.navigation.v5.navigation.NavigationEventDispatcher.onProgressChange+36) 2023-05-22 09:02:51.841 7075-7075 DEBUG crash_dump64 A #22 pc 00000000002c43d6 [anon:dalvik-classes19.dex extracted in memory from /data/app/~~pherX7L4TZD73MKDvel0iA==/com.uznewmax.mytaxidriver-p1gSwX2T2MocgTIdcl2IYg==/base.apk!classes19.dex] (com.mapbox.services.android.navigation.v5.navigation.RouteProcessorThreadListener.onNewRouteProgress+14) 2023-05-22 09:02:51.841 7075-7075 DEBUG crash_dump64 A #24 pc 00000000002c4100 [anon:dalvik-classes19.dex extracted in memory from /data/app/~~pherX7L4TZD73MKDvel0iA==/com.uznewmax.mytaxidriver-p1gSwX2T2MocgTIdcl2IYg==/base.apk!classes19.dex] (com.mapbox.services.android.navigation.v5.navigation.RouteProcessorHandlerCallback$1.run+20) ---------------------------- PROCESS ENDED (5296) for package com.uznewmax.mytaxidriver ---------------------------- 2023-05-22 09:02:54.479 7152-7152 USNET pid-7152 E USNET: appName: com.uznewmax.mytaxidriver

image

boldtrn commented 1 year ago

This might be something in your code as well. It works in the Kurviger app.

Fabi755 commented 9 months ago

Any updates or solutions? Can we close this?