Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Location layer plugin - Maps SDK - can't find source layer warning log and native crash #477

Closed
danesfeder opened this issue May 3, 2018 · 16 comments
Labels
bug A bug is found inside the code base and should be immediately brought to attention ASAP location-layer-plugin Issues that deal with the location layer module

Comments

@danesfeder
Copy link
Contributor

danesfeder commented May 3, 2018

W/mbgl: {GLThread 3241}[Render]: can't find source for layer 'mapbox-location-stroke-layer'
05-02 17:46:23.719 29315-29355/com.mapbox.services.android.navigation.testapp W/mbgl: {GLThread 3241}[Render]: can't find source for layer 'mapbox-location-layer'
05-02 17:46:23.724 29315-29355/com.mapbox.services.android.navigation.testapp W/mbgl: {GLThread 3241}[Render]: can't find source for layer 'mapbox-location-stroke-layer'
05-02 17:46:23.724 29315-29355/com.mapbox.services.android.navigation.testapp W/mbgl: {GLThread 3241}[Render]: can't find source for layer 'mapbox-location-layer'
05-02 17:46:23.751 29315-29315/com.mapbox.services.android.navigation.testapp W/art: Attempt to remove non-JNI local reference, dumping thread
05-02 17:46:23.751 29315-29315/com.mapbox.services.android.navigation.testapp W/art: Attempt to remove non-JNI local reference, dumping thread
05-02 17:46:23.751 29315-29315/com.mapbox.services.android.navigation.testapp W/art: Attempt to remove non-JNI local reference, dumping thread
05-02 17:46:23.751 29315-29315/com.mapbox.services.android.navigation.testapp W/art: Attempt to remove non-JNI local reference, dumping thread
05-02 17:46:23.752 29315-29315/com.mapbox.services.android.navigation.testapp W/art: Attempt to remove non-JNI local reference, dumping thread
05-02 17:46:23.752 29315-29315/com.mapbox.services.android.navigation.testapp W/art: Attempt to remove non-JNI local reference, dumping thread
05-02 17:46:23.752 29315-29315/com.mapbox.services.android.navigation.testapp W/art: Attempt to remove non-JNI local reference, dumping thread
05-02 17:46:23.753 29315-29315/com.mapbox.services.android.navigation.testapp W/art: Attempt to remove non-JNI local reference, dumping thread
05-02 17:46:23.755 29315-29315/com.mapbox.services.android.navigation.testapp W/art: Attempt to remove non-JNI local reference, dumping thread
05-02 17:46:23.755 29315-29315/com.mapbox.services.android.navigation.testapp W/art: Attempt to remove non-JNI local reference, dumping thread
05-02 17:46:23.756 29315-29315/com.mapbox.services.android.navigation.testapp E/mbgl: {igation.testapp}[JNI]: Error setting property: icon-size [5]: Input/output pairs for "interpolate" expressions must be arranged with input values in strictly ascending order.
05-02 17:46:23.756 29315-29315/com.mapbox.services.android.navigation.testapp W/art: Attempt to remove non-JNI local reference, dumping thread
05-02 17:46:23.756 29315-29315/com.mapbox.services.android.navigation.testapp W/art: Attempt to remove non-JNI local reference, dumping thread
05-02 17:46:23.756 29315-29315/com.mapbox.services.android.navigation.testapp W/art: Attempt to remove non-JNI local reference, dumping thread
05-02 17:46:23.759 29315-29315/com.mapbox.services.android.navigation.testapp D/MapboxNavigation: MapboxNavigation startNavigation called.
05-02 17:46:23.765 29315-29315/com.mapbox.services.android.navigation.testapp D/MockLocationEngine: Route distance in km: 0.176245
05-02 17:46:23.767 29315-29355/com.mapbox.services.android.navigation.testapp W/mbgl: {GLThread 3241}[Render]: can't find source for layer 'mapbox-location-stroke-layer'
05-02 17:46:23.767 29315-29355/com.mapbox.services.android.navigation.testapp W/mbgl: {GLThread 3241}[Render]: can't find source for layer 'mapbox-location-layer'
05-02 17:46:23.785 29315-29315/com.mapbox.services.android.navigation.testapp D/MapboxNavigation: Connected to service.
05-02 17:46:23.785 29315-29315/com.mapbox.services.android.navigation.testapp D/NavigationService$LocalBinder: Local binder called.
05-02 17:46:23.790 29315-29355/com.mapbox.services.android.navigation.testapp W/mbgl: {GLThread 3241}[Render]: can't find source for layer 'mapbox-location-stroke-layer'
05-02 17:46:23.791 29315-29355/com.mapbox.services.android.navigation.testapp W/mbgl: {GLThread 3241}[Render]: can't find source for layer 'mapbox-location-layer'
05-02 17:46:23.831 29315-29355/com.mapbox.services.android.navigation.testapp W/mbgl: {GLThread 3241}[Render]: can't find source for layer 'mapbox-location-stroke-layer'
05-02 17:46:23.831 29315-29355/com.mapbox.services.android.navigation.testapp W/mbgl: {GLThread 3241}[Render]: can't find source for layer 'mapbox-location-layer'

After updating to Maps SDK 6.x and LLP 0.5.0 we are seeing these logs in the Nav SDK. This seems to be happening when using the map even if the location layer plugin isn't being initialized within that activity or fragment. Like something is being cached regarding the layer or expression.

When rotating the turn-by-turn UI, we get intermittent crashes and our orientation instrumentation test is able to reproduce the native crash.

cc @LukasPaczos @tobrun @cammace

@danesfeder danesfeder added bug A bug is found inside the code base and should be immediately brought to attention ASAP location-layer-plugin Issues that deal with the location layer module labels May 3, 2018
@cammace
Copy link
Contributor

cammace commented May 3, 2018

Sounds like a similar issue to #470 which has since been fixed. Can you test with the snapshot and confirm @danesfeder?

@danesfeder
Copy link
Contributor Author

@cammace will do thanks

@danesfeder
Copy link
Contributor Author

Testing 0.6.0-SNAPSHOT, the native crash still occurs, but the can't find source layer logs are now gone.

This error log in particular was still showing:

E/mbgl: {igation.testapp}[JNI]: Error setting property: icon-size [5]: Input/output pairs for "interpolate" expressions must be arranged with input values in strictly ascending order.

Wondering if this may be related to the subsequent native crash.

@cammace cammace added this to the location-layer-0.5.1 milestone May 4, 2018
@tobrun
Copy link
Member

tobrun commented May 4, 2018

@danesfeder, not related to crash, the log indicate that your stop pairs keys aren't placed in acsecnsing order. Before expressions this wasn't requires, now it is.

@danesfeder
Copy link
Contributor Author

Symbolicated crash:

********** 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)

@jjniemand
Copy link

jjniemand commented May 8, 2018

Having the same issue using 0.6.0-SNAPSHOT:

W/mbgl: {GLThread 2680}[Render]: can't find source for layer 'mapbox-location-shadow'
        {GLThread 2680}[Render]: can't find source for layer 'mapbox-location-stroke-layer'
        {GLThread 2680}[Render]: can't find source for layer 'mapbox-location-layer'
W/mbgl: {GLThread 2680}[Render]: can't find source for layer 'mapbox-location-shadow'
        {GLThread 2680}[Render]: can't find source for layer 'mapbox-location-stroke-layer'
W/mbgl: {GLThread 2680}[Render]: can't find source for layer 'mapbox-location-layer'
W/mbgl: {GLThread 2680}[Render]: can't find source for layer 'mapbox-location-shadow'
        {GLThread 2680}[Render]: can't find source for layer 'mapbox-location-stroke-layer'
        {GLThread 2680}[Render]: can't find source for layer 'mapbox-location-layer'
W/mbgl: {GLThread 2680}[Render]: can't find source for layer 'mapbox-location-shadow'
        {GLThread 2680}[Render]: can't find source for layer 'mapbox-location-stroke-layer'
W/mbgl: {GLThread 2680}[Render]: can't find source for layer 'mapbox-location-layer'

@cammace
Copy link
Contributor

cammace commented May 9, 2018

@jjniemand the issue you are seeing is now fixed on master and will be in the 0.5.1 release happening this week. For now, if you need an immediate fix, please use the SNAPSHOT.

@jjniemand
Copy link

@cammace thanks for the feedback. The warning messages above seems to be gone now using the latest SNAPSHOT.

@cammace
Copy link
Contributor

cammace commented May 11, 2018

@jjniemand even better news, the 0.5.2 stable release happened yesterday, you shouldn't need to use the SNAPSHOT anymore :)

@mohamed3la2
Copy link

mohamed3la2 commented May 14, 2018

I am trying to use NavigationView using com.mapbox.mapboxsdk:mapbox-android-navigation-ui:0.13.0 to do turn by turn UI using Mapbox Documentation
https://www.mapbox.com/android-docs/navigation/overview/navigation-ui/#navigationviewoptions
and when i call navigationView.initialize( this) i get this !
nav ui
What should i do :( ?

@P-Zenker
Copy link

I can confirm this log messages. But they disappear after the first location update.

@mohamed3la2
Copy link

What do you mean by First location update ?

@P-Zenker
Copy link

@mohamed3la2 Normally you get a location update via GPS etc. Mapbox provides a few good examples for this usecase.

But if you cant wait for it:

locationLayer = new LocationLayerPlugin(mapView, mapboxMap, locationEngine);
Location location = new Location("");
location.setLatitude(53.874384);
location.setLongitude(10.684057);
locationLayer.forceLocationUpdate(location); // <---

@mohamed3la2
Copy link

@P-Zenker When i am doing that i getting mapview not turn-by-turn navigation ui and i am still getting the same issue

@cammace
Copy link
Contributor

cammace commented May 16, 2018

Going off of what occurred in mapbox/mapbox-gl-native#11843, the original intent of this ticket is no longer an issue if I'm correct. Safe to close here @danesfeder?

@danesfeder
Copy link
Contributor Author

@cammace yep, all good

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug A bug is found inside the code base and should be immediately brought to attention ASAP location-layer-plugin Issues that deal with the location layer module
Projects
None yet
Development

No branches or pull requests

6 participants