mapbox-gl-native
mapbox-gl-native copied to clipboard
SpriteFactory.fromDrawable crashes
When trying to work around the issue mentioned in #3107 with:
new SpriteFactory(mapView).fromDrawable(ContextCompat.getDrawable(context,R.drawable.ic_flag_12dp));
It's crashing with:
********** Crash dump: **********
Build fingerprint: 'Android/vbox86p/vbox86p:6.0/MRA58K/buildbot10191552:userdebug/test-keys'
pid: 5560, tid: 5560, name: m.mapbox.sirius >>> com.mapbox.sirius <<<
signal 11 (SIGSEGV), code 1 (SEGV_MAPERR), fault addr 0xdeadcab1
Stack frame #00 pc 0041c716 /data/app/com.mapbox.sirius-2/lib/x86/libmapbox-gl.so
Stack frame #01 pc 0041c755 /data/app/com.mapbox.sirius-2/lib/x86/libmapbox-gl.so
Stack frame #02 pc 0041c6f6 /data/app/com.mapbox.sirius-2/lib/x86/libmapbox-gl.so (std::terminate()+38)
Stack frame #03 pc 0041b325 /data/app/com.mapbox.sirius-2/lib/x86/libmapbox-gl.so
Stack frame #04 pc 0041ab36 /data/app/com.mapbox.sirius-2/lib/x86/libmapbox-gl.so
Stack frame #05 pc 0041aab3 /data/app/com.mapbox.sirius-2/lib/x86/libmapbox-gl.so
Stack frame #06 pc 0017e045 /data/app/com.mapbox.sirius-2/lib/x86/libmapbox-gl.so (mbgl::SpriteImage::SpriteImage(unsigned short, unsigned short, float, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >&&, bool)+357)
Stack frame #07 pc 00134e14 /data/app/com.mapbox.sirius-2/lib/x86/libmapbox-gl.so
Stack frame #08 pc 0087d3f2 /data/app/com.mapbox.sirius-2/oat/x86/base.odex (offset 0x58b000) (void com.mapbox.mapboxsdk.views.NativeMapView.nativeSetSprite(long, java.lang.String, int, int, float, byte[])+214)
Stack frame #09 pc 008817a8 /data/app/com.mapbox.sirius-2/oat/x86/base.odex (offset 0x58b000) (void com.mapbox.mapboxsdk.views.NativeMapView.setSprite(java.lang.String, int, int, float, byte[])+188)
Stack frame #10 pc 0086d164 /data/app/com.mapbox.sirius-2/oat/x86/base.odex (offset 0x58b000) (void com.mapbox.mapboxsdk.views.MapView.loadSprite(com.mapbox.mapboxsdk.annotations.Sprite)+968)
Stack frame #11 pc 0086d3f3 /data/app/com.mapbox.sirius-2/oat/x86/base.odex (offset 0x58b000) (com.mapbox.mapboxsdk.annotations.Marker com.mapbox.mapboxsdk.views.MapView.prepareMarker(com.mapbox.mapboxsdk.annotations.MarkerOptions)+375)
Stack frame #12 pc 0086e754 /data/app/com.mapbox.sirius-2/oat/x86/base.odex (offset 0x58b000) (com.mapbox.mapboxsdk.annotations.Marker com.mapbox.mapboxsdk.views.MapView.addMarker(com.mapbox.mapboxsdk.annotations.MarkerOptions)+216)
Stack frame #13 pc 008927fd /data/app/com.mapbox.sirius-2/oat/x86/base.odex (offset 0x58b000) (void com.mapbox.sirius.util.MapViewUtils.createMarkerAndMoveViewport(com.mapbox.mapboxsdk.views.MapView, com.mapbox.mapboxsdk.geometry.LatLng, com.mapbox.mapboxsdk.geometry.LatLng, java.lang.String)+1249)
Stack frame #14 pc 0088995a /data/app/com.mapbox.sirius-2/oat/x86/base.odex (offset 0x58b000) (void com.mapbox.sirius.activity.DirectionsActivity$4.run()+254)
Stack frame #15 pc 73669c3b /data/dalvik-cache/x86/system@[email protected] (offset 0x1eb6000)
I believe this issue is related to the usage of a VectorDrawable which was introduced in the stable version of Android Gradle Tools 1.5.0.
Just tried with a normal BitmapDrawable and it crashes.
This is already being tracked in #3031, closing this down in favor of that one
Now being tracked in #3164. Also, missed target of v2.3.0.