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

SpriteFactory.fromDrawable crashes #3108

Closed

Description

@tobrun

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.

Activity

  1. added
    Android
    on Nov 24, 2015
  2. added this to the android-v2.3.0 milestone on Nov 24, 2015
  3. tobrun commented on Nov 24, 2015

    @tobrun
    MemberAuthor

    Just tried with a normal BitmapDrawable and it crashes.

  4. changed the title [-]SpriteFactory.fromDrawable can't handle VectorDrawables[/-] [+]SpriteFactory.fromDrawable crashes[/+] on Nov 24, 2015
  5. tobrun commented on Nov 24, 2015

    @tobrun
    MemberAuthor

    This is already being tracked in #3031, closing this down in favor of that one

  6. afathman commented on Dec 7, 2015

    @afathman

    Now being tracked in #3164. Also, missed target of v2.3.0.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Androidcrash

    Type

    No type

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions