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

Native crash from LocationLayerPlugin #11843

Closed
danesfeder opened this issue May 4, 2018 · 6 comments
Closed

Native crash from LocationLayerPlugin #11843

danesfeder opened this issue May 4, 2018 · 6 comments
Labels
Android Mapbox Maps SDK for Android Core The cross-platform C++ core, aka mbgl

Comments

@danesfeder
Copy link
Contributor

Platform: Android
Mapbox SDK version: 6.0.1

Found this crash when running an Android orientation test in the Navigation SDK. Crash occurs after the second initialization of the LocationLayerPlugin (latest release 0.5.0).

********** Crash dump: **********
Build fingerprint: 'OnePlus/OnePlus3/OnePlus3T:7.1.1/NMF26F/10122113:user/release-keys'
pid: 19636, tid: 19636, name: igation.testapp  >>> com.mapbox.services.android.navigation.testapp <<<
signal 11 (SIGSEGV), code 1 (SEGV_MAPERR), fault addr 0x10
Stack frame #00 pc 00000000000e605c  /data/app/com.mapbox.services.android.navigation.testapp-1/lib/arm64/libmapbox-gl.so: Routine std::__ndk1::vector<mapbox::geometry::line_string<double, std::__ndk1::vector>, std::__ndk1::allocator<mapbox::geometry::line_string<double, std::__ndk1::vector> > >::__annotate_shrink(unsigned int) const at /Users/pguardiola/Library/Android/sdk/ndk-bundle/sources/cxx-stl/llvm-libc++/include/vector:853
Stack frame #01 pc 00000000000e7d60  /data/app/com.mapbox.services.android.navigation.testapp-1/lib/arm64/libmapbox-gl.so: Routine jni::ClassDeleter<mbgl::android::geojson::MultiPoint>::operator()(jni::PointerToValue<jni::Class<mbgl::android::geojson::MultiPoint> >) const at /Users/pguardiola/mapbox/mapbox-gl-native/platform/android/MapboxGLAndroidSDK/.externalNativeBuild/cmake/debug/armeabi-v7a/../../../../../../../mason_packages/headers/jni.hpp/3.0.0/include/jni/class.hpp:158
Stack frame #02 pc 00000000000e7db4  /data/app/com.mapbox.services.android.navigation.testapp-1/lib/arm64/libmapbox-gl.so: Routine jni::ClassDeleter<mbgl::android::geojson::MultiPoint>::operator()(jni::PointerToValue<jni::Class<mbgl::android::geojson::MultiPoint> >) const at /Users/pguardiola/mapbox/mapbox-gl-native/platform/android/MapboxGLAndroidSDK/.externalNativeBuild/cmake/debug/armeabi-v7a/../../../../../../../mason_packages/headers/jni.hpp/3.0.0/include/jni/class.hpp:161
Stack frame #03 pc 00000000000dbc10  /system/lib64/libart.so (art_quick_generic_jni_trampoline+144)
Stack frame #04 pc 0000000000021fec  /dev/ashmem/dalvik-jit-code-cache (deleted)
@danesfeder danesfeder added Android Mapbox Maps SDK for Android Core The cross-platform C++ core, aka mbgl labels May 4, 2018
@tobrun
Copy link
Member

tobrun commented May 8, 2018

@danesfeder are you using this to test? I integrated this as part of #11864 and not able to reproduce:

ezgif com-gif-maker 4

@tobrun
Copy link
Member

tobrun commented May 9, 2018

Noticing now that I wasn't copying over the correct Activity under test. With that in place I'm able to reproduce the issue. Note though that the symbolicated stacktrace is different:

********** Crash dump: **********
Build fingerprint: 'samsung/starltexx/starlte:8.0.0/R16NW/G960FXXS1ARD1:user/release-keys'
pid: 22137, tid: 22137, name: nstream.testapp >>> com.mapbox.mapboxsdk.downstream.testapp <<<
signal 11 (SIGSEGV), code 1 (SEGV_MAPERR), fault addr 0x8
Stack frame #00 pc 00156c1c /data/app/com.mapbox.mapboxsdk.downstream.testapp-nt3Hac4TpouCd9YQwv3gtQ==/lib/arm/libmapbox-gl.so: Routine mbgl::android::GeoJSONSource::setFeature(_JNIEnv&, jni::Objectmbgl::android::geojson::Feature) at /Users/Nurbot/mapbox-gl-native/platform/android/src/style/sources/geojson_source.cpp:86
Stack frame #1 pc 00159d83 /data/app/com.mapbox.mapboxsdk.downstream.testapp-nt3Hac4TpouCd9YQwv3gtQ==/lib/arm/libmapbox-gl.so: Routine operator() at /Users/Nurbot/mapbox-gl-native/platform/android/MapboxGLAndroidSDK/.externalNativeBuild/cmake/debug/armeabi-v7a/../../../../../../../mason_packages/headers/jni.hpp/3.0.0/include/jni/native_method.hpp:245
Stack frame #2 pc 00159d01 /data/app/com.mapbox.mapboxsdk.downstream.testapp-nt3Hac4TpouCd9YQwv3gtQ==/lib/arm/libmapbox-gl.so: Routine operator() at /Users/Nurbot/mapbox-gl-native/platform/android/MapboxGLAndroidSDK/.externalNativeBuild/cmake/debug/armeabi-v7a/../../../../../../../mason_packages/headers/jni.hpp/3.0.0/include/jni/native_method.hpp:112
Stack frame #3 pc 00159cb7 /data/app/com.mapbox.mapboxsdk.downstream.testapp-nt3Hac4TpouCd9YQwv3gtQ==/lib/arm/libmapbox-gl.so: Routine __invoke at /Users/Nurbot/mapbox-gl-native/platform/android/MapboxGLAndroidSDK/.externalNativeBuild/cmake/debug/armeabi-v7a/../../../../../../../mason_packages/headers/jni.hpp/3.0.0/include/jni/native_method.hpp:110
Stack frame #4 pc 00159e2b /data/app/com.mapbox.mapboxsdk.downstream.testapp-nt3Hac4TpouCd9YQwv3gtQ==/lib/arm/libmapbox-gl.so: Routine operator()<jni::jobject *, jni::jobject *> at /Users/Nurbot/mapbox-gl-native/platform/android/MapboxGLAndroidSDK/.externalNativeBuild/cmake/debug/armeabi-v7a/../../../../../../../mason_packages/headers/jni.hpp/3.0.0/include/jni/native_method.hpp:59
Stack frame #5 pc 00159ddb /data/app/com.mapbox.mapboxsdk.downstream.testapp-nt3Hac4TpouCd9YQwv3gtQ==/lib/arm/libmapbox-gl.so: Routine __invoke<jni::jobject *, jni::jobject *> at /Users/Nurbot/mapbox-gl-native/platform/android/MapboxGLAndroidSDK/.externalNativeBuild/cmake/debug/armeabi-v7a/../../../../../../../mason_packages/headers/jni.hpp/3.0.0/include/jni/native_method.hpp:55
Stack frame #6 pc 003e3279 /system/lib/libart.so (art_quick_generic_jni_trampoline+40)
Stack frame #7 pc 00063fd3 /dev/ashmem/dalvik-jit-code-cache_22137_22137 (deleted)

@tobrun
Copy link
Member

tobrun commented May 16, 2018

Revisited my PR with solely LLP integration. Not able to produce the crash from OP. This shows that the issue will be related to the nav sdk and not the location layer plugin.

ezgif com-video-to-gif 14

@tobrun
Copy link
Member

tobrun commented May 16, 2018

Seeing that this can be reproduced with LLP if you don't call into onStart/onStop, @danesfeder would you be able to test removing this and manually invoking onStart/onStop if LLP != null here and here

@danesfeder
Copy link
Contributor Author

@tobrun Ah that's a good hunch - yeah sure thing, thanks!

@tobrun
Copy link
Member

tobrun commented May 16, 2018

Capturing from @danesfeder that above was the issue, good to close here.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Android Mapbox Maps SDK for Android Core The cross-platform C++ core, aka mbgl
Projects
None yet
Development

No branches or pull requests

2 participants