Skip to content

Delay initializing runtime styling on startup - #423

Merged
danesfeder merged 1 commit into
masterfrom
dan-style-xml
Oct 25, 2017
Merged

danesfeder merged 1 commit into
masterfrom
dan-style-xml

Conversation

@danesfeder

Copy link
Copy Markdown
Contributor
  • Wait for map style to load before initializing run time styling
  • Client side fix for native crash we were seeing when launching the "drop-in" UI

cc @ericrwolfe @brunoabinader

@danesfeder danesfeder added the bug Defect to be fixed. label Oct 25, 2017
@danesfeder danesfeder added this to the v0.7.0 milestone Oct 25, 2017
@danesfeder danesfeder self-assigned this Oct 25, 2017
@danesfeder
danesfeder requested review from cammace and tobrun October 25, 2017 20:18
@danesfeder danesfeder changed the title Delay initializing run time styling on startup Delay initializing runtime styling on startup Oct 25, 2017
@danesfeder
danesfeder merged commit 7d1375f into master Oct 25, 2017
@danesfeder
danesfeder deleted the dan-style-xml branch October 25, 2017 21:53
@brunoabinader

Copy link
Copy Markdown

Got a similar, but not equal backtrace after using release-agua branch in GL Native together with master after this PR got merged:

********** Crash dump: **********
Build fingerprint: 'google/sdk_gphone_x86/generic_x86:8.0.0/OSR1.170901.008/4328566:userdebug/dev-keys'
pid: 3928, tid: 4004, name: GLThread 460  >>> com.mapbox.services.android.navigation.testapp <<<
signal 11 (SIGSEGV), code 1 (SEGV_MAPERR), fault addr 0x0
Stack frame #00 pc 0038c393  /data/app/com.mapbox.services.android.navigation.testapp-2KPIJMTXMVsdplyb232BJQ==/lib/x86/libmapbox-gl.so: Routine std::__ndk1::remove_reference<mbgl::style::conversion::Error&>::type&& std::__ndk1::move<mbgl::style::conversion::Error&>(mbgl::style::conversion::Error&) at /home/bruno/Android/Sdk/ndk-bundle/sources/cxx-stl/llvm-libc++/include/type_traits:2174
Stack frame #01 pc 003ec1e8  /data/app/com.mapbox.services.android.navigation.testapp-2KPIJMTXMVsdplyb232BJQ==/lib/x86/libmapbox-gl.so: Routine std::__ndk1::__allocator_destructor<std::__ndk1::allocator<std::__ndk1::__function::__func<mbgl::DefaultFileSource::Impl::request(mbgl::AsyncRequest*, mbgl::Resource, mbgl::ActorRef<mbgl::FileSourceRequest>)::{lambda(mbgl::Response)#1}, std::__ndk1::allocator<{lambda(mbgl::Response)#1}>, void (mbgl::Response)> > >::operator()(void (*)(mbgl::Response)) at /home/bruno/Android/Sdk/ndk-bundle/sources/cxx-stl/llvm-libc++/include/memory:3575
Stack frame #02 pc 00383427  /data/app/com.mapbox.services.android.navigation.testapp-2KPIJMTXMVsdplyb232BJQ==/lib/x86/libmapbox-gl.so: Routine std::experimental::fundamentals_v1::optional<mbgl::style::conversion::Error> mbgl::style::conversion::setProperty<mbgl::android::Value, mbgl::style::FillLayer, mbgl::style::PropertyValue<std::__ndk1::array<float, 2u> >, &mbgl::style::FillLayer::setFillTranslate>(mbgl::style::Layer&, mbgl::android::Value const&) at /home/bruno/work/mapbox-gl-native/platform/android/MapboxGLAndroidSDK/.externalNativeBuild/cmake/debug/x86/../../../../../../../include/mbgl/style/conversion/property_setter.hpp:34
Stack frame #03 pc 00222337  /data/app/com.mapbox.services.android.navigation.testapp-2KPIJMTXMVsdplyb232BJQ==/lib/x86/libmapbox-gl.so: Routine mbgl::android::gson::JsonObject::convert(_JNIEnv&, jni::Object<mbgl::android::gson::JsonObject>) at /home/bruno/work/mapbox-gl-native/platform/android/src/gson/json_object.cpp:?
Stack frame #04 pc 0021d141  /data/app/com.mapbox.services.android.navigation.testapp-2KPIJMTXMVsdplyb232BJQ==/lib/x86/libmapbox-gl.so: Routine std::__ndk1::vector<mapbox::geometry::value, std::__ndk1::allocator<mapbox::geometry::value> >::reserve(unsigned int) at /home/bruno/Android/Sdk/ndk-bundle/sources/cxx-stl/llvm-libc++/include/vector:1536
Stack frame #05 pc 00300bad  /data/app/com.mapbox.services.android.navigation.testapp-2KPIJMTXMVsdplyb232BJQ==/lib/x86/libmapbox-gl.so: Routine std::experimental::fundamentals_v1::optional<mapbox::util::variant<mbgl::style::IntervalStops<mbgl::style::IconTextFitType> > > mbgl::style::conversion::StopsConverter<mbgl::style::IconTextFitType, mapbox::util::variant<mbgl::style::IntervalStops<mbgl::style::IconTextFitType> > >::operator()<mbgl::android::Value>(mbgl::android::Value const&, mbgl::style::conversion::Error&) const at /home/bruno/work/mapbox-gl-native/platform/android/MapboxGLAndroidSDK/.externalNativeBuild/cmake/debug/x86/../../../../../../../include/mbgl/style/conversion/function.hpp:170
Stack frame #06 pc 00211fdc  /data/app/com.mapbox.services.android.navigation.testapp-2KPIJMTXMVsdplyb232BJQ==/lib/x86/libmapbox-gl.so: Routine jni::Class<mbgl::android::geojson::MultiPoint>::NewGlobalRef(_JNIEnv&) const at /home/bruno/work/mapbox-gl-native/platform/android/MapboxGLAndroidSDK/.externalNativeBuild/cmake/debug/x86/../../../../../../../mason_packages/headers/jni.hpp/3.0.0/include/jni/class.hpp:140
Stack frame #07 pc 00212133  /data/app/com.mapbox.services.android.navigation.testapp-2KPIJMTXMVsdplyb232BJQ==/lib/x86/libmapbox-gl.so: Routine std::__ndk1::unique_ptr<jni::jclass, jni::GlobalRefDeleter>::reset(jni::jclass*) at /home/bruno/Android/Sdk/ndk-bundle/sources/cxx-stl/llvm-libc++/include/memory:2744
Stack frame #08 pc 0008fd1b  /data/app/com.mapbox.services.android.navigation.testapp-2KPIJMTXMVsdplyb232BJQ==/lib/x86/libmapbox-gl.so: Routine auto jni::NativePeerMemberFunctionMethod<jni::Object<mbgl::android::TransitionOptions> (mbgl::android::RasterLayer::*)(_JNIEnv&), &mbgl::android::RasterLayer::getRasterHueRotateTransition>::operator()<mbgl::android::RasterLayer, mbgl::android::RasterLayer, void>(jni::Field<mbgl::android::RasterLayer, long long> const&) at /home/bruno/work/mapbox-gl-native/platform/android/MapboxGLAndroidSDK/.externalNativeBuild/cmake/debug/x86/../../../../../../../mason_packages/headers/jni.hpp/3.0.0/include/jni/native_method.hpp:242
Stack frame #09 pc 000907d2  /data/app/com.mapbox.services.android.navigation.testapp-2KPIJMTXMVsdplyb232BJQ==/lib/x86/libmapbox-gl.so: Routine auto jni::NativePeerMemberFunctionMethod<jni::Object<jni::ObjectTag> (mbgl::android::RasterLayer::*)(_JNIEnv&), &mbgl::android::RasterLayer::getRasterFadeDuration>::operator()<mbgl::android::RasterLayer, mbgl::android::RasterLayer, void>(jni::Field<mbgl::android::RasterLayer, long long> const&) at /home/bruno/work/mapbox-gl-native/platform/android/MapboxGLAndroidSDK/.externalNativeBuild/cmake/debug/x86/../../../../../../../mason_packages/headers/jni.hpp/3.0.0/include/jni/native_method.hpp:242
Stack frame #10 pc 00090824  /data/app/com.mapbox.services.android.navigation.testapp-2KPIJMTXMVsdplyb232BJQ==/lib/x86/libmapbox-gl.so: Routine auto jni::NativePeerMemberFunctionMethod<jni::Object<jni::ObjectTag> (mbgl::android::RasterLayer::*)(_JNIEnv&), &mbgl::android::RasterLayer::getRasterFadeDuration>::operator()<mbgl::android::RasterLayer, mbgl::android::RasterLayer, void>(jni::Field<mbgl::android::RasterLayer, long long> const&) at /home/bruno/work/mapbox-gl-native/platform/android/MapboxGLAndroidSDK/.externalNativeBuild/cmake/debug/x86/../../../../../../../mason_packages/headers/jni.hpp/3.0.0/include/jni/native_method.hpp:248
Stack frame #11 pc 0063ec67  /system/lib/libart.so (art_quick_generic_jni_trampoline+71)
Stack frame #12 pc 00028499  /dev/ashmem/dalvik-jit-code-cache (deleted)

@Grsmto

Grsmto commented Oct 26, 2017 •

Copy link
Copy Markdown

@brunoabinader I'm having the same issue on GL Native v5.2.0-beta.2 on a Nexus 5X, before merging this, so I don't think it comes from it. I thought it could be related to that one, didn't test yet.
(there is no way to link to a PR/issue without polluting the referenced link? :/)

@ivovandongen

Copy link
Copy Markdown

@brunoabinader Is it me or does that stack trace make no sense? The jump from #2 to #1 seems not possible to me.

@Grsmto mapbox/mapbox-gl-native/pull/10253 only works around issues on the Adreno 3xx range, the Nexus 5X has a Adreno 418 no? If you can reproduce this problem on your device we could try out if something similar fixes this.

@brunoabinader

Copy link
Copy Markdown

@ivovandongen could this be because ndk-stack is not being able to distinguish between different thread calls?

Grsmto pushed a commit to Grsmto/mapbox-navigation-android that referenced this pull request Oct 27, 2017
…android into fix-build

* 'master' of https://github.com/mapbox/mapbox-navigation-android:
  Adjust API Milestone to handle new routes (mapbox#425)
  Cancel notification when the service is destroyed, not just when notification button is clicked (mapbox#409)
  adds validation utils class (mapbox#424)
  Wait for map style to load before initializing run time styling (mapbox#423)
  Changed up NavigationRoute (mapbox#413)

# Conflicts:
#	libandroid-navigation/src/main/java/com/mapbox/services/android/navigation/v5/navigation/NavigationRoute.java
@danesfeder danesfeder mentioned this pull request Nov 13, 2017
9 tasks done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Defect to be fixed.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants