Giter VIP home page Giter VIP logo

mapbox / mapbox-gl-native-android Goto Github PK

View Code? Open in Web Editor NEW
216.0 113.0 117.0 9.31 MB

Interactive, thoroughly customizable maps in native Android powered by vector tiles and OpenGL

Home Page: https://mapbox.com/mobile

License: Other

Java 85.20% HTML 0.01% Kotlin 13.22% Python 0.47% JavaScript 0.10% Shell 0.19% Makefile 0.46% C++ 0.29% CMake 0.03% EJS 0.02%
map mapbox-gl opengl android c-plus-plus java vector-tiles openstreetmap mapbox geojson

mapbox-gl-native-android's Introduction

The latest version of Mapbox Maps SDK is now available at mapbox/mapbox-maps-android. This version offers superior performance, features, and developer experience, and is the recommended mobile SDK solution for all Mapbox customers.

Mapbox maintains this repo to address bug fixes and security vulnerabilities. Please note that this project will cease to receive updates, including compatibility and bugfixes, after April 4, 2023. Here is a helpful guide about our latest SDK features and how to migrate to our latest version.

Circle CI build status

The Mapbox Maps SDK for Android is a library based on Mapbox GL Native for embedding interactive map views with scalable, customizable vector maps onto Android devices.

Getting Started

This particular README is for people who are interested in working on and improving the Maps SDK for Android. If you're looking for more general information and instructions on the Maps SDK:

Visit https://docs.mapbox.com/android/maps/overview to see current documentation on the Maps SDK for Android.

Visit https://docs.mapbox.com/android/api/map-sdk to view the Maps SDK's current API reference Javadoc files.

See the Mapbox website's Android install flow to install and use the Mapbox Maps SDK for Android in an application.

Setup environment

These instructions are for developers interested in making code-level contributions to the SDK itself. If you instead want to use the SDK in your app, see above.

Getting the source

Clone the git repository and pull in submodules:

git clone [email protected]:mapbox/mapbox-gl-native-android.git && cd mapbox-gl-native-android
git submodule update --init --recursive

Installing dependencies

Opening the project

Open the root folder of this repository in Android Studio.

Project configuration

Setup Mapbox Access token for dependency download

Add a Mapbox access token with scope set to DOWNLOADS:READ in the root build.gradle.

allprojects {
    repositories {
        maven {
            url 'https://api.mapbox.com/downloads/v2/releases/maven'
            authentication {
                basic(BasicAuthentication)
            }
            credentials {
                username = "mapbox"
                password = "INSERT_MAPBOX_ACCESS_TOKEN_HERE"
            }
        }
    }
}

Setup Checkstyle

Mapbox uses specific IDE settings related to code and check style. See checkstyle guide for configuration details.

Setup Mapbox Access Token for Mapbox vector tiles

The test application (used for development purposes) uses Mapbox vector tiles, which require a Mapbox account and API access token. Obtain a free access token on the Mapbox account page.

With the first gradle invocation, gradle will take the value of the MAPBOX_ACCESS_TOKEN environment variable and save it to MapboxGLAndroidSDKTestApp/src/main/res/values/developer-config.xml. If the environment variable wasn't set, you can edit developer-config.xml manually and add your access token to the mapbox_access_token resource.

Additional resources

Symbolicating native crashes

When hitting native crashes you can use ndk-stack to symbolicate crashes. More information in this guide.

mapbox-gl-native-android's People

Contributors

alexshalamov avatar ank27 avatar chloekraw avatar danswick avatar dependabot[bot] avatar guardiola31337 avatar harvsu avatar jundai avatar kiryldz avatar knov avatar lukaspaczos avatar pengdev avatar ph0tonic avatar sbma44 avatar tmpsantos avatar tobrun avatar ystsoi avatar yuryybk avatar zmiao avatar zugaldia avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

mapbox-gl-native-android's Issues

Is queryRenderedFeatures() working correctly with specified layer? (v7.3.2)

Steps to reproduce

  1. queryRenderedFeatures(pixel,"layer-id") returns 0 feature while there are a lots features.

Expected behavior

All features return when i use just queryRenderedFeatures(pixel) include layer which i created and uploaded style in studio. I know Marker was deprecated. But that is not problem.

Actual behavior

Returns 0 feature.

Configuration

**Android versions: all
**Device models: all
**Mapbox SDK versions: 7.3.2

public boolean onMapClick(@NonNull LatLng point) {
        final PointF pixel = mapboxMap.getProjection().toScreenLocation(point);
        List<Feature> features = mapboxMap.queryRenderedFeatures(pixel, layerID);
        if (features.size() > 0) {
            Feature feature = features.get(0);

            String property;

            StringBuilder stringBuilder = new StringBuilder();
            if (feature.properties() != null) {
                for (Map.Entry<String, JsonElement> entry : feature.properties().entrySet()) {
                    stringBuilder.append(String.format("%s - %s", entry.getKey(), entry.getValue()));
                    stringBuilder.append(System.getProperty("line.separator"));
                }

                featureMarker = mapboxMap.addMarker(new MarkerOptions()
                        .position(point)
                        .title("berkay")
                        .snippet(stringBuilder.toString())
                );

            } else {
                property = "snippet";
                featureMarker = mapboxMap.addMarker(new MarkerOptions()
                        .position(point)
                        .snippet(property)
                );
            }
        }
        mapboxMap.selectMarker(featureMarker);
        return true;
    }
}

Use weak references for Layer and Source API

Follow up from mapbox/mapbox-gl-native#15333 (comment), current Android codebase uses references for Layer and Source API's. This is an issue as we aren't able to determine if a source/layer is still valid. We are currently working around this by flagging (boolean) if a source/layer is detached. With the weak reference setup we can check the weak reference itself to determine if that component is still valid.

cc @mapbox/maps-android @pozdnyakov @alexshalamov

[Android] Move LocationComponent's INSTANT_LOCATION_TRANSITION_THRESHOLD into LocationComponentOptions

Our app is using the bundled LocationComponent.

Currently, when the user wakes the screen, they're presented with a stale display of their old location, which then animates to the current location. This animation may take a very long time.

LocationAnimationCoordinator decides whether to "snap" to the current location based off the constant value INSTANT_LOCATION_TRANSITION_THRESHOLD of 50,000 which on my Pixel 3 is 46 screen widths.

It would be very helpful if this value were customizable, as we're presenting navigation and fitness data, where the user needs to see their current location as soon as it is possible.

Remove location component's activation requirement

This ticket tracks a possible removal of the need to activate the component before first using it.

Right now, each of LocationComponentActivationOptions and LocationComponentOptions options can be re-applied in the runtime of the component anyway (which wasn't the case initially), which opens the door to doing the "activation" part under the hood while one of below happens:

  • the component is enabled for the first time
  • the component object is created during the MapboxMap initialization

Second option would create a bunch of object instances even if the user is not going to ever use location features and require additional Style validation checks, but would make the setup even simpler as enabling the component will not require Context and Style which can be passed from MapboxMap instead.

/cc @tobrun @danesfeder @langsmith

Optimise Mapbox#setConnected

The Mapbox#setConnected API was introduced for embedded devices that didn't support a connectivity state through Android internal connectivity change events delivered through intents. These developers call Mapbox#setConnected(true) to always have the device connected and load tiles. With iOS introducing a new API to pause network requests in mapbox/mapbox-gl-native#15650, we should optimize our setup to match this.

cc @mapbox/maps-android

Transifex spams every day about strings.xml

Like many Transifex translators, I watch the projects that I translate. The Mapbox GL Native project there spams translators every day with a notification that strings.xml has been updated, but the file hasnโ€™t changed and there are no updates. None of the iOS or macOS .strings files are affected by this issue, only the strings.xml file used by the Android SDK. We should figure out how to stop these spurious updates; otherwise, weโ€™ll need to turn off autoupdating of strings.xml, because this spam reduces the likelihood of a translator paying attention to legitimate updates and announcements.

Iโ€™ve tried turning autoupdating on and off and also reimporting the English source file. The exported English file matches the imported one verbatim.

/cc @tobrun @jfirebaugh

CustomGeometrySource finalize JNI crash

We have mapbox on a fragment using a CustomGeometrySource, and when switching multiple times quickly to another fragment and back again, we'll get a JNI crash from CustomGeometrySource.finalize()

Steps to reproduce

  1. Create an instance of CustomGeometrySource, but do not add it to the map as a source
  2. When GC cleans that instance up, its finalizer will crash

Here's a sample that crashes at startup (add your token in strings.xml first):
https://github.com/jheikkola/mapbox-fragment-testing

Or you can also make it happen like this

  1. Setup mapbox on a fragment, with custom CustomGeometrySource added, using all the required fragment lifecycle methods
  2. Switch to another non-map fragment and back, very quickly, about 20 times. It's not reliable to reproduce, maybe because related to GC and timing

Expected behavior

Actual behavior

application crashes with

java_vm_ext.cc:542] JNI DETECTED ERROR IN APPLICATION: can't call void com.mapbox.mapboxsdk.style.sources.CustomGeometrySource.releaseThreads() on null object
    java_vm_ext.cc:542]     in call to CallVoidMethodV
    java_vm_ext.cc:542]     from void com.mapbox.mapboxsdk.style.sources.CustomGeometrySource.finalize()
    java_vm_ext.cc:542] "FinalizerDaemon" daemon prio=5 tid=6 Runnable
    java_vm_ext.cc:542]   | group="system" sCount=0 dsCount=0 flags=0 obj=0x12f80330 self=0xe6a6ac00
    java_vm_ext.cc:542]   | sysTid=24345 nice=4 cgrp=default sched=0/0 handle=0xcdc7c970
    java_vm_ext.cc:542]   | state=R schedstat=( 909837804 361102466 717 ) utm=86 stm=4 core=0 HZ=100
    java_vm_ext.cc:542]   | stack=0xcdb79000-0xcdb7b000 stackSize=1042KB
    java_vm_ext.cc:542]   | held mutexes= "mutator lock"(shared held)
    java_vm_ext.cc:542]   native: #00 pc 002e5b0f  /system/lib/libart.so (art::DumpNativeStack(std::__1::basic_ostream<char, std::__1::char_traits<char>>&, int, BacktraceMap*, char const*, art::ArtMethod*, void*, bool)+134)
    ...
    java_vm_ext.cc:542]   native: mapbox/mapbox-gl-native#48 pc 0001e4a5  /system/lib/libc.so (__start_thread+32)
    java_vm_ext.cc:542]   at com.mapbox.mapboxsdk.style.sources.CustomGeometrySource.finalize(Native method)
    java_vm_ext.cc:542]   at java.lang.Daemons$FinalizerDaemon.doFinalize(Daemons.java:250)
    java_vm_ext.cc:542]   at java.lang.Daemons$FinalizerDaemon.runInternal(Daemons.java:237)
    java_vm_ext.cc:542]   at java.lang.Daemons$Daemon.run(Daemons.java:103)
    java_vm_ext.cc:542]   at java.lang.Thread.run(Thread.java:764)

Configuration

Android versions: 9 sdk 28
Device models: Samsung Galaxy XCover 4
Mapbox SDK versions: 8.4.0

[Android] Double tapping while tracking zooms to location, not puck

Double tapping the map while tracking the user causes the camera to zoom to the tapped location, while the camera mode is still "tracking" the user's puck. This behavior will look weird for the user, since it won't look like the puck is still being tracked (although, at location updates, the camera will start actually tracking again).

In previous versions (I'm afraid I don't know the exact versions) the camera would zoom in on the user's puck if the camera was tracking, regardless of where on the map was double tapped.

The zoom behavior seems to work as expected when the user is getting location updates and on the move, and so is likely mostly a problem while standing still.

Steps to reproduce

  1. Have an idle location
  2. Set camera mode to CameraMode.TRACKING_GPS_NORTH or CameraMode.TRACKING_GPS
  3. Double tap on the map, somewhere that is not on the user's location

Expected behavior

The map would zoom in on the user's puck, and the camera would still be tracking the user.

Actual behavior

The map zooms in on the chosen location, and it looks like the puck is no longer being tracked, even though it is.

I have noticed sometimes that the zoom behavior works correctly when starting up the app, but after moving the map (setting camera mode to non-tracking) and setting camera mode to Tracking again, the issue reappears.

Configuration

Mapbox SDK versions: 8.4.0

Multi-pointer fling animation

Currently, fling animation is based on the GestureListener#onFling. This means that we can detect fling for single pointer movements only. We are also executing the animation using the core animations. This together causes a poor experience when the map is moved and scaled at the same time:
ezgif com-video-to-gif (2)

We should instead use the velocity provided by the OnMoveGestureListener#onMoveEnd and animate with Android Animators to make move and scale velocity animations concurrent.

IllegalStateException when location component receives last location

We're using mapbox in a fragment with a style loaded from uri, a CustomGeometrySource and location component. Sometimes when creating or removing fragment we'll get the below IllegalStateException from style validation when last location is received.

This seems strange since the location component is activated after style has loaded, in the OnStyleLoaded callback, and I would think that last location is not requested until activation?

We do add layers and icons to the style, so it probably takes a little time to load and process the style, but anything related to location component is done in OnStyleLoaded callback.

Steps to reproduce

No reliable steps yet.. but seems to happen either when creating or destroying the map fragment

Expected behavior

Actual behavior

application crash with

java.lang.IllegalStateException: Calling getLayer when a newer style is loading/has loaded.
        at com.mapbox.mapboxsdk.maps.Style.validateState(Style.java:599)
        at com.mapbox.mapboxsdk.maps.Style.getLayer(Style.java:238)
        at com.mapbox.mapboxsdk.location.LocationLayerController.setLayerVisibility(LocationLayerController.java:225)
        at com.mapbox.mapboxsdk.location.LocationLayerController.show(LocationLayerController.java:164)
        at com.mapbox.mapboxsdk.location.LocationComponent.showLocationLayerIfHidden(LocationComponent.java:1339)
        at com.mapbox.mapboxsdk.location.LocationComponent.updateLocation(LocationComponent.java:1324)
        at com.mapbox.mapboxsdk.location.LocationComponent.access$1000(LocationComponent.java:97)
        at com.mapbox.mapboxsdk.location.LocationComponent$LastLocationEngineCallback.onSuccess(LocationComponent.java:1512)
        at com.mapbox.mapboxsdk.location.LocationComponent$LastLocationEngineCallback.onSuccess(LocationComponent.java:1500)
        at com.mapbox.android.core.location.GoogleLocationEngineImpl$GoogleLastLocationEngineCallbackTransport.onSuccess(GoogleLocationEngineImpl.java:132)
        at com.mapbox.android.core.location.GoogleLocationEngineImpl$GoogleLastLocationEngineCallbackTransport.onSuccess(GoogleLocationEngineImpl.java:121)
        at com.google.android.gms.tasks.zzn.run(Unknown Source:4)
        at android.os.Handler.handleCallback(Handler.java:873)
        at android.os.Handler.dispatchMessage(Handler.java:99)
        at android.os.Looper.loop(Looper.java:214)
        at android.app.ActivityThread.main(ActivityThread.java:7156)

Configuration

Android versions: 9 sdk 28
Device models: Samsung Galaxy XCover 4
Mapbox SDK versions: 8.4.0

Expressions.raw producing wrong expressions for hillshade fill-opacity

Steps to reproduce

  1. Create the following hillshade layer in android except the fill-opacity PaintProperty
{
    "id": "hillshade",
    "type": "fill",
    "source": "composite",
    "source-layer": "hillshade",
    "maxzoom": 16,
    "layout": {},
    "paint": {
      "fill-color": [
        "match",
        [
          "get",
          "class"
        ],
        "shadow",
        "hsl(56, 59%, 22%)",
        "hsl(0, 0%, 100%)"
      ],
      "fill-opacity": [
        "interpolate",
        [
          "linear"
        ],
        [
          "zoom"
        ],
        14,
        [
          "match",
          [
            "get",
            "level"
          ],
          [
            67,
            56
          ],
          0.06,
          [
            89,
            78
          ],
          0.05,
          0.12
        ],
        16,
        0
      ],
      "fill-antialias": false
    }
  }

where composite source is

{
            "url": "mapbox://mapbox.mapbox-streets-v8,mapbox.mapbox-terrain-v2",
            "type": "vector"
        }
  1. Convert the following string to an expression
[
  "interpolate",
  [
    "linear"
  ],
  [
    "zoom"
  ],
  14,
  [
    "match",
    [
      "get",
      "level"
    ],
    [
      67,
      56
    ],
    0.06,
    [
      89,
      78
    ],
    0.05,
    0.12
  ],
  16,
  0
]
  1. Add the expression to the layer as a fill-opacity property

Expected behavior

The fill-opacity property should be set and the expression should be valid for Mbgl to be OK with it and not log the error

The expressions returned should have strings for both values in index [4] i.e. [4][0] and [4][1] should both be strings however, only [4][0] is a string. This causes the following error when added as a fill-opacity property

E/Mbgl: {a.kujaku.sample}[JNI]: Error setting property: fill-opacity [4][2]: Expected string but found number instead.

Actual behavior

  • An error is logged trying to set the property
E/Mbgl: {a.kujaku.sample}[JNI]: Error setting property: fill-opacity [4][2]: Expected string but found number instead.
  • The expressions returned looks like this
["interpolate", ["linear"], ["zoom"], 14.0, ["match", ["get", "level"], ["67", 56.0], 0.06, ["89", 78.0], 0.05, 0.12], 16.0, 0.0]

Configuration

Android versions: 7.0
Device models: Samsung Galaxy Tab S2 SM-T713
Mapbox SDK versions: 7.2.0 and 7.4.0

Async native lib loading

StrictMode policy violation; ~duration=64 ms: android.os.strictmode.DiskReadViolation
       at android.os.StrictMode$AndroidBlockGuardPolicy.onReadFromDisk(StrictMode.java:1504)
       at libcore.io.BlockGuardOs.open(BlockGuardOs.java:206)
       at libcore.io.IoUtils.canOpenReadOnly(IoUtils.java:163)
       at dalvik.system.DexPathList$NativeLibraryElement.findNativeLibrary(DexPathList.java:833)
       at dalvik.system.DexPathList.findLibrary(DexPathList.java:548)
       at dalvik.system.BaseDexClassLoader.findLibrary(BaseDexClassLoader.java:179)
       at java.lang.Runtime.loadLibrary0(Runtime.java:1005)
       at java.lang.System.loadLibrary(System.java:1669)
       at com.getkeepsafe.relinker.SystemLibraryLoader.loadLibrary(SystemLibraryLoader.java:24)
       at com.getkeepsafe.relinker.ReLinkerInstance.loadLibraryInternal(ReLinkerInstance.java:163)
       at com.getkeepsafe.relinker.ReLinkerInstance.loadLibrary(ReLinkerInstance.java:136)
       at com.getkeepsafe.relinker.ReLinkerInstance.loadLibrary(ReLinkerInstance.java:92)
       at com.mapbox.mapboxsdk.module.loader.LibraryLoaderProviderImpl$ReLinkerLibraryLoader.load(LibraryLoaderProviderImpl.java:38)
       at com.mapbox.mapboxsdk.LibraryLoader.load(LibraryLoader.java:43)
       at com.mapbox.mapboxsdk.net.NativeConnectivityListener.<clinit>(NativeConnectivityListener.java:13)
       at com.mapbox.mapboxsdk.net.ConnectivityReceiver.instance(ConnectivityReceiver.java:43)
       at com.mapbox.mapboxsdk.Mapbox.getInstance(Mapbox.java:60)
       at com.mapbox.mapboxsdk.testapp.MapboxApplication.initializeMapbox(MapboxApplication.java:77)
       at com.mapbox.mapboxsdk.testapp.MapboxApplication.onCreate(MapboxApplication.java:40)
       at android.app.Instrumentation.callApplicationOnCreate(Instrumentation.java:1154)
       at android.app.ActivityThread.handleBindApplication(ActivityThread.java:6204)
       at android.app.ActivityThread.access$1200(ActivityThread.java:236)
       at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1784)
       at android.os.Handler.dispatchMessage(Handler.java:106)
       at android.os.Looper.loop(Looper.java:214)
       at android.app.ActivityThread.main(ActivityThread.java:7032)
       at java.lang.reflect.Method.invoke(Native Method)
       at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:494)
       at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:965)

Relinker allows to load native libs asynchronously as shown here.

Download a map and when open other maps after that get black screen

Start with a brief description below this line. -->
Download a region for use offline and try to open same map or other maps gets black screen (no layers) I always have internet connection, I didn't try to use the saved region, just display the maps with internet connection.
If I kill the app and open it again it displays the map correctly

Steps to reproduce

  1. Open a map and download an offline region
  2. Go back to select to open other map after download (with internet connection)
  3. The map displays black background.

Expected behavior

Open a map after download an offline region should show the map with correct background layer

Actual behavior

Shows black background

Configuration

Android versions: Android 8.0.0 and Android 9.0
Device models: Tried with 10 devices
Mapbox SDK versions: Latest version and mapboxVersion = '8.1.0'

Image from iOS (5)
Image from iOS (4)

Remove FileSource from public API

Core is working towards removing filesource from the public API, all public filesource api will be migrated to the map object. This should be reflected in the Android API, all functionality should be migrated to mapView.

Offline API nullability

We are missing nullability annotations on the offline API callbacks. This makes it hard for it to be consumed from kotlin. For example:

OfflineManager.getInstance(rule.activity).createOfflineRegion(
        createTestRegionDefinition(),
        ByteArray(0),
        object : OfflineManager.CreateOfflineRegionCallback {
          override fun onCreate(region: OfflineRegion?) {
            // region will be non-null but we need to check it anyway
            region?.let {
                    
            }
          }
        })
    }

Android:SupportMapFragment behaviour

So i was migrating from google maps to Mapbox Maps, I used SupportMapFragment Everywhere, Tried replacing Google's with Mapbox's SupportMapFragment. I found an issue
when i am replacing SupportMapFragment with any other fragment and coming back to SupportMapFragment whole view gets rendered and i can see visible redrawing. But in case of google's SupportMapFragment it somehow retaining its state.

Created a video

Steps to reproduce

For Mapbox and Google

  1. Create an activity with a button and a blank fragment.
  2. In Activity add SupportMapFragment when activity first loads say in onCreate.
  3. When user presses button replace SupportMapFragment with BlankFragment.

Expected behavior

Last drawing state should be retained.

Actual behavior

Its creating whole view and there is visible map rendering when user comes back.

Configuration

Android versions: 7,8 and 9
Device models: PIxel 2, OnePlus 3T and MI A2
Mapbox SDK versions: 8.0.0

Change internal representation of Expression to JsonArray

Atm our expression syntax is build on a String operator with optional varargs Expression arguments. Internally we hold on onto this until we pass them to core as Object[] using Expression#toArray(). While this works, it's not completely flexible (eg. mapbox/mapbox-gl-native#12766) and doesn't match what we do when we retrieve an expression from core (we retrieve a JsonArray representation).

[android] Device tests can fail to complete all tests

The device tests in android-gnustl-arm-v7 job can fail with:

Test failed to run to completion. Reason: 'Test run failed to complete. Expected 627 tests, received 12'. Check device logcat for details

The log ends with:

08-01 00:01:10.399: W/BroadcastQueue(565): Timeout of broadcast BroadcastRecord{1e68e352 u0 com.mapbox.scheduler_flusher} - receiver=android.os.BinderProxy@fe6fb62, started 60002ms ago
08-01 00:01:10.400: W/BroadcastQueue(565): Receiver during timeout: BroadcastFilter{24d625b0 u0 ReceiverList{35bd14f3 22477 com.mapbox.mapboxsdk.testapp/10095/u0 remote:fe6fb62}}
08-01 00:01:10.417: W/ProcessCpuTracker(565): Skipping unknown process pid 20164
08-01 00:01:10.421: I/ActivityManager(565): Skipping duplicate ANR: ProcessRecord{39aa2a57 22477:com.mapbox.mapboxsdk.testapp/u0a95} Broadcast of Intent { act=com.mapbox.scheduler_flusher flg=0x14 (has extras) }

This manifests on CircleCI as a timeout:

Too long with no output (exceeded 20m0s)

/cc @mapbox/maps-android

setForeground not working for wear devices using GLSurfaceView

We use View.setForeground(R.color.someColor) to hide the black surface of GLSurfaceView until we have rendered the background of a style to provide a better user experience. Android wear watches however, running 8.0.0, don't draw the foreground color:

ezgif com-video-to-gif (62)

Workaround is to use a TexureView instead.

OnMapReady of SupportMapFragment not been invoked

After Downloading the Tiles and loading the map Offline, If we make the app online and then offline after that if you navigate to the Map page , The map doesn't load.

On debugging we found in the above scenario also the GetMapAsync() is being called but we are not getting the OnMapReady() call back. Even the base OnMapReady() is not being invoked

Naxam.Mapbox.Droid version used is 6.4.0.1
Device tested: lenovo k6 Power
OS: android

Steps to Trigger Behavior

  1. Launch the app online
  2. Click on Navigate to the Map page
  3. Click on Offline storage and download to download the tiles.
  4. After the above is completed navigate the back.
  5. Make the app offline and navigate to the map page, You can see the map loads.
  6. Navigate back make the app online and then offline after a few seconds.
  7. Navigate back to the map page.
  8. You will see the map doesn't load

Link to Demonstration

https://drive.google.com/open?id=1cWMxQrCvFwiecmNX0rMPBhBti1_psFoJ

Expected Behavior

From the user perspective the map should load.
From Dev perspective since the below code is getting executed

             fragment = new MapViewFragment();
            activity.SupportFragmentManager.BeginTransaction()
            .Replace(view.Id, fragment)
            .CommitAllowingStateLoss();
            fragment.GetMapAsync(this);

We expect the OnMapReady() callback should be invoked

Actual Behavior

The Map doesn't load.
neither the OnMapReady() call back nor the OnMapReady() override is been called.

Note:- At step 6 we saw the following in the output. Not sure it is relevant.
05-11 12:59:41.198 I/mbgl ( 4437): {DefaultFileSour}[Database]: Unable to make space for entry

Migrate to AndroidX

Announced at Google I/O 2018 with details in this blogpost, androidx will replace the support library dependencies. We should look into how this change impacts end developer and plan to migrate accordingly. More information in release notes of androidx.

Please provide changelog of stable releases

For those of us who stick to stable versions, we would like to see a changelog listing the changes between stable versions. Currently to know all the changes between stable versions, we have to look at all the delta changelogs between alpha and beta versions.

Steps to reproduce

Visit the changelog for the android releases: https://github.com/mapbox/mapbox-gl-native/blob/android-v8.3.0/platform/android/CHANGELOG.md

Expected behavior

See a single entry listing changes between 8.2.2 and 8.3.0:

  • 8.3.0 - August 28, 2019 - Changes since Mapbox Maps SDK for Android v8.2.2

Actual behavior

See multiple separate entries for the various alpha, beta and release versions between 8.2.0 and 8.3.0:

  • 8.3.0 - August 28, 2019 - Changes since Mapbox Maps SDK for Android v8.3.0-beta.1
  • 8.3.0-beta.1 - August 22, 2019 - Changes since Mapbox Maps SDK for Android v8.3.0-alpha.3
  • 8.3.0-alpha.3 - August 15, 2019 - Changes since Mapbox Maps SDK for Android v8.3.0-alpha.2
  • 8.3.0-alpha.2 - August 7, 2019 - Changes since Mapbox Maps SDK for Android v8.3.0-alpha.1
  • 8.3.0-alpha.1 - July 31, 2019 - Changes since Mapbox Maps SDK for Android v8.2.0
  • 8.2.2 - August 23, 2019 - Changes since Mapbox Maps SDK for Android v8.2.1
  • 8.2.1 - July 31, 2019 - Changes since Mapbox Maps SDK for Android v8.2.0

Integration test RecyclerView

Both the TextureView as the GLSurfaceView integration tests were updated to include a second MapView.

Expected behavior

The integration test scrolls the RecyclerView.

Actual behavior

The second MapView captures touch events and pans the map instead.

Store unstripped release builds

To allow symbolicating stacktraces from users we need to store unstripped versions of our shared objects as part of our release process. Ideally we upload these to s3 in a versioned manner. We create these unstripped versions by building with BUILDTYPE=RelWithDebInfo.

Additionally, we could create a small tool that takes a given stacktrace and SDK version number to symbolicate the trace. This would make the process of looking into a native crash a little bit easier.

cc @tmpsantos @alexshalamov @mapbox/maps-android

[Android] IllegalArgumentException with EGLConfigChooser

I have observed some crashes with mapbox related to the EGLConfigChooser. I can't really name details, but I have noticed crashes since updating to mapbox 7.x with devices running Android 7.x.

Fatal Exception: java.lang.IllegalArgumentException
       at com.google.android.gles_jni.EGLImpl.eglGetConfigAttrib(EGLImpl.java)
       at com.mapbox.mapboxsdk.maps.renderer.egl.EGLConfigChooser.getConfigAttr(EGLConfigChooser.java:276)
       at com.mapbox.mapboxsdk.maps.renderer.egl.EGLConfigChooser.chooseBestMatchConfig(EGLConfigChooser.java:201)
       at com.mapbox.mapboxsdk.maps.renderer.egl.EGLConfigChooser.chooseConfig(EGLConfigChooser.java:84)
       at android.opengl.GLSurfaceView$EglHelper.start(GLSurfaceView.java:1051)
       at android.opengl.GLSurfaceView$GLThread.guardedRun(GLSurfaceView.java:1421)
       at android.opengl.GLSurfaceView$GLThread.run(GLSurfaceView.java:1268)

And another:

Fatal Exception: java.lang.IllegalArgumentException
       at com.google.android.gles_jni.EGLImpl.eglGetConfigAttrib(EGLImpl.java)
       at com.mapbox.mapboxsdk.maps.renderer.egl.EGLConfigChooser.getConfigAttr(EGLConfigChooser.java:274)
       at com.mapbox.mapboxsdk.maps.renderer.egl.EGLConfigChooser.chooseBestMatchConfig(EGLConfigChooser.java:199)
       at com.mapbox.mapboxsdk.maps.renderer.egl.EGLConfigChooser.chooseConfig(EGLConfigChooser.java:84)
       at android.opengl.GLSurfaceView$EglHelper.start(GLSurfaceView.java:1051)
       at android.opengl.GLSurfaceView$GLThread.guardedRun(GLSurfaceView.java:1421)
       at android.opengl.GLSurfaceView$GLThread.run(GLSurfaceView.java:1268)

Is it possible if someone takes a look at this crash? Maybe it is caused by some recent changes?

If there are no changes made that should case this issue, is it possible to translate this exception into something which only creates a log? Or is that going to create even more issues?

Configuration

Android versions: 7.1.1, 7.0.0
Device models: Galaxy Tab A 8.0
Mapbox SDK versions: 7.2.0

Narrow but high viewport does not fit into area constrained by map.setPadding

In our app, we show a screen with a map on it, which has a bottom overlay. This overlay can be dragged over the screen and snaps to certain positions. When the overlay is pulled all the way down, the map has a relatively small bottom padding that allows the drag handler to be visible. Using this small padding of 120, the bounds of the viewport are correctly centered and the whole viewport is visible.
If we now drag the panel up, we set a higher bottom padding of the 50% of the map height and expect the viewport to still be visible in the now smaller area of the map, e.g. by zooming out.
What actually happens is that the whole viewport is only shifted up slightly, not even in a way that the center would be correct, and no zooming out happens.

Steps to reproduce

  1. set low bottom padding
  2. move camera
  3. set high bottom padding
  4. move camera

Expected behavior

The viewport is visible in the now smaller area of the map.

Actual behavior

The viewport is shifted up slightly.

Screenshot_1562170131
In the bottom position, padding is applied correctly and the whole viewport is visible

Screenshot_1562170135
With the panel in the center position, the viewport is not shown correctly

We use the following code to set the bottom padding:

internal fun setViewportPadding(left: Int, top: Int, right: Int, bottom: Int) {
    mapReady {
        val bounds = this.map?.projection?.getVisibleRegion(false)?.latLngBounds
        if (bounds != null) {
            val cameraUpdate = CameraUpdateFactory.newLatLngBounds(bounds, 0)
            this.map?.setPadding(left, top, right, bottom)
            this.map?.animateCamera(cameraUpdate, 500)
        }
    }
}

Configuration

Android versions: 8/9
Device models: Pixel2/3, One Plus 5
Mapbox SDK versions: 8.0.1

[Android] Native crashes(Galaxy S9, K3 2017, Pixel 2)

I have native crashes at startup at several android devices:

  • Pixel 2:
    Android version: 9
    Mapbox SDK version: 6.7.1
    Stacktrace:
*** *** *** *** *** *** *** *** *** *** *** *** *** *** *** ***
Build fingerprint: 'google/walleye/walleye:9/PPR2.181005.003/4984323:user/release-keys'
Revision: 'MP1'
ABI: 'arm64'
pid: 10301, tid: 10301, name: .taxifinder.app  >>> com.taxifinder.app <<<
signal 11 (SIGSEGV), code 1 (SEGV_MAPERR), fault addr 0x7ff0000000000008
    x0  0000000000000000  x1  0000007fea762f10  x2  0000000000010006  x3  0000000000000007
    x4  0000000000000036  x5  00000074fb00d688  x6  00000074fb13b3c0  x7  00000074db520400
    x8  00000074fb036b70  x9  7ff0000000000000  x10 0000000000000001  x11 000000000000002b
    x12 08ab7b702b7a9255  x13 00000074db520380  x14 00000000ffffffff  x15 00000001241a3a68
    x16 00000074df3f28e8  x17 000000757dc86120  x18 000000005c93ed28  x19 00000074e2de1eb0
    x20 0000007580ad95e0  x21 0000007580ad95e0  x22 00000074e2c64760  x23 00000074f139958c
    x24 0000007580ad95e0  x25 0000000000000000  x26 0000007580ad95e0  x27 000000000000003b
    x28 0000000000000001  x29 0000007fea763020
    sp  0000007fea762f50  lr  00000074df093a10  pc  00000074df093a18
backtrace:
    #00 pc 0000000000170a18  /data/app/com.taxifinder.app-k6qVoCGjT1k6nmPuuRpdEQ==/lib/arm64/libmapbox-gl.so
    mapbox/mapbox-gl-native#1 pc 0000000000171620  /data/app/com.taxifinder.app-k6qVoCGjT1k6nmPuuRpdEQ==/lib/arm64/libmapbox-gl.so
    mapbox/mapbox-gl-native#2 pc 00000000000a0074  /data/app/com.taxifinder.app-k6qVoCGjT1k6nmPuuRpdEQ==/lib/arm64/libmapbox-gl.so
    mapbox/mapbox-gl-native#3 pc 0000000000041868  /data/app/com.taxifinder.app-k6qVoCGjT1k6nmPuuRpdEQ==/lib/arm64/libmapbox-gl.so
    mapbox/mapbox-gl-native#4 pc 0000000000041a14  /data/app/com.taxifinder.app-k6qVoCGjT1k6nmPuuRpdEQ==/lib/arm64/libmapbox-gl.so
    mapbox/mapbox-gl-native#5 pc 000000000003f084  /data/app/com.taxifinder.app-k6qVoCGjT1k6nmPuuRpdEQ==/lib/arm64/libmapbox-gl.so
    mapbox/mapbox-gl-native#6 pc 0000000000014474  /system/lib64/libutils.so (android::Looper::pollInner(int)+836)
    mapbox/mapbox-gl-native#7 pc 000000000001408c  /system/lib64/libutils.so (android::Looper::pollOnce(int, int*, int*, void**)+60)
    mapbox/mapbox-gl-native#8 pc 0000000000120c2c  /system/lib64/libandroid_runtime.so (android::android_os_MessageQueue_nativePollOnce(_JNIEnv*, _jobject*, long, int)+44)
    mapbox/mapbox-gl-native#9 pc 00000000003e1fec  /system/framework/arm64/boot-framework.oat (offset 0x3cd000) (android.media.MediaExtractor.seekTo [DEDUPED]+140)
    mapbox/mapbox-gl-native#10 pc 0000000000aaf910  /system/framework/arm64/boot-framework.oat (offset 0x3cd000) (android.os.MessageQueue.next+240)
    mapbox/mapbox-gl-native#11 pc 0000000000aad29c  /system/framework/arm64/boot-framework.oat (offset 0x3cd000) (android.os.Looper.loop+636)
    mapbox/mapbox-gl-native#12 pc 000000000087a138  /system/framework/arm64/boot-framework.oat (offset 0x3cd000) (android.app.ActivityThread.main+664)
    mapbox/mapbox-gl-native#13 pc 000000000055cc4c  /system/lib64/libart.so (art_quick_invoke_static_stub+604)
    mapbox/mapbox-gl-native#14 pc 00000000000cf760  /system/lib64/libart.so (art::ArtMethod::Invoke(art::Thread*, unsigned int*, unsigned int, art::JValue*, char const*)+232)
    mapbox/mapbox-gl-native#15 pc 00000000004633b8  /system/lib64/libart.so (art::(anonymous namespace)::InvokeWithArgArray(art::ScopedObjectAccessAlreadyRunnable const&, art::ArtMethod*, art::(anonymous namespace)::ArgArray*, art::JValue*, char const*)+104)
    mapbox/mapbox-gl-native#16 pc 0000000000464e10  /system/lib64/libart.so (art::InvokeMethod(art::ScopedObjectAccessAlreadyRunnable const&, _jobject*, _jobject*, _jobject*, unsigned long)+1440)
    mapbox/mapbox-gl-native#17 pc 00000000003f43b0  /system/lib64/libart.so (art::Method_invoke(_JNIEnv*, _jobject*, _jobject*, _jobjectArray*)+48)
    mapbox/mapbox-gl-native#18 pc 000000000011e6d4  /system/framework/arm64/boot.oat (offset 0x114000) (java.lang.Class.getDeclaredMethodInternal [DEDUPED]+180)
    mapbox/mapbox-gl-native#19 pc 0000000000be3738  /system/framework/arm64/boot-framework.oat (offset 0x3cd000) (com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run+136)
    mapbox/mapbox-gl-native#20 pc 0000000000bea920  /system/framework/arm64/boot-framework.oat (offset 0x3cd000) (com.android.internal.os.ZygoteInit.main+3088)
    mapbox/mapbox-gl-native#21 pc 000000000055cc4c  /system/lib64/libart.so (art_quick_invoke_static_stub+604)
    mapbox/mapbox-gl-native#22 pc 00000000000cf760  /system/lib64/libart.so (art::ArtMethod::Invoke(art::Thread*, unsigned int*, unsigned int, art::JValue*, char const*)+232)
    mapbox/mapbox-gl-native#23 pc 00000000004633b8  /system/lib64/libart.so (art::(anonymous namespace)::InvokeWithArgArray(art::ScopedObjectAccessAlreadyRunnable const&, art::ArtMethod*, art::(anonymous namespace)::ArgArray*, art::JValue*, char const*)+104)
    mapbox/mapbox-gl-native#24 pc 0000000000463010  /system/lib64/libart.so (art::InvokeWithVarArgs(art::ScopedObjectAccessAlreadyRunnable const&, _jobject*, _jmethodID*, std::__va_list)+416)
    mapbox/mapbox-gl-native#25 pc 0000000000366854  /system/lib64/libart.so (art::JNI::CallStaticVoidMethodV(_JNIEnv*, _jclass*, _jmethodID*, std::__va_list)+644)
    mapbox/mapbox-gl-native#26 pc 00000000000b1bf8  /system/lib64/libandroid_runtime.so (_JNIEnv::CallStaticVoidMethod(_jclass*, _jmethodID*, ...)+120)
    mapbox/mapbox-gl-native#27 pc 00000000000b4578  /system/lib64/libandroid_runtime.so (android::AndroidRuntime::start(char const*, android::Vector<android::String8> const&, bool)+760)
    mapbox/mapbox-gl-native#28 pc 00000000000021a0  /system/bin/app_process64 (main+1200)
    mapbox/mapbox-gl-native#29 pc 00000000000ae760  /system/lib64/libc.so (__libc_init+88)

Video

  • Galaxy S9:
    Android version: 8.0
    Mapbox SDK version: 6.7.1
    Stacktrace:
*** *** *** *** *** *** *** *** *** *** *** *** *** *** *** ***
Build fingerprint: 'samsung/starqlteue/starqlteue:8.0.0/R16NW/G960U1UEU1ARBG:user/release-keys'
Revision: '14'
ABI: 'arm64'
pid: 22831, tid: 22831, name: .taxifinder.app  >>> com.taxifinder.app <<<
signal 11 (SIGSEGV), code 1 (SEGV_MAPERR), fault addr 0x6f66206465735d
    x0   0000000000000000  x1   0000007fc1ba9920  x2   0000000000010006  x3   0000000000000007
    x4   000000000000018f  x5   0000007fc1ba9670  x6   00000073d290faf0  x7   00000073d3f19a70
    x8   00000073e35908a0  x9   726f662064657355  x10  0000007fc1ba99c8  x11  0000000000000017
    x12  08ab7b702b7a9255  x13  00000073d290eda0  x14  00000000ffffffff  x15  000000000010f460
    x16  00000073d5ea58e8  x17  00000073f6cf930c  x18  000000000000002c  x19  00000073d1c33330
    x20  00000073f993ba60  x21  00000073f993ba60  x22  00000073d1c449c0  x23  00000073d23a978c
    x24  00000073f993ba60  x25  0000000000000000  x26  0000000000000000  x27  0000000000000001
    x28  0000000000000054  x29  0000007fc1ba9a30  x30  00000073d5b46a10
    sp   0000007fc1ba9960  pc   00000073d5b46a18  pstate 0000000060000000

Video

  • LGE K3 2017:
    Android version: 6.0
    Mapbox SDK version: 6.7.1
    Stacktrace:
*** *** *** *** *** *** *** *** *** *** *** *** *** *** *** ***
Build fingerprint: 'lge/lv0_trf_us/lv0:6.0.1/MXB48T/1705410450712:user/release-keys'
Revision: '0'
ABI: 'arm'
pid: 22505, tid: 22505, name: .taxifinder.app  >>> com.taxifinder.app <<<
signal 11 (SIGSEGV), code 1 (SEGV_MAPERR), fault addr 0x30
    r0 e73d3981  r1 bec75cc8  r2 b6f77b9c  r3 b6f77b34
    r4 00000000  r5 bec75d40  r6 b86be038  r7 bec75ca8
    r8 bec75cc8  r9 00000000  sl b86bfdf4  fp 00000001
    ip b4ad892c  sp bec75c80  lr 9cba09f7  pc 9cc54cdc  cpsr 200e0030
backtrace:
    #00 pc 001b8cdc  /data/app/com.taxifinder.app-1/lib/arm/libmapbox-gl.so
    mapbox/mapbox-gl-native#1 pc 001049f3  /data/app/com.taxifinder.app-1/lib/arm/libmapbox-gl.so
    mapbox/mapbox-gl-native#2 pc 001052e1  /data/app/com.taxifinder.app-1/lib/arm/libmapbox-gl.so
    mapbox/mapbox-gl-native#3 pc 000687e7  /data/app/com.taxifinder.app-1/lib/arm/libmapbox-gl.so
    mapbox/mapbox-gl-native#4 pc 0001de3d  /data/app/com.taxifinder.app-1/lib/arm/libmapbox-gl.so
    mapbox/mapbox-gl-native#5 pc 0001df81  /data/app/com.taxifinder.app-1/lib/arm/libmapbox-gl.so
    mapbox/mapbox-gl-native#6 pc 0001c0b1  /data/app/com.taxifinder.app-1/lib/arm/libmapbox-gl.so
    mapbox/mapbox-gl-native#7 pc 00012ef1  /system/lib/libutils.so (_ZN7android6Looper9pollInnerEi+532)
    mapbox/mapbox-gl-native#8 pc 00012fc3  /system/lib/libutils.so (_ZN7android6Looper8pollOnceEiPiS1_PPv+130)
    mapbox/mapbox-gl-native#9 pc 00087349  /system/lib/libandroid_runtime.so (_ZN7android18NativeMessageQueue8pollOnceEP7_JNIEnvP8_jobjecti+22)
    mapbox/mapbox-gl-native#10 pc 030bdbb5  /system/framework/arm/boot.oat (offset 0x2b5f000)

Video

(Android Mapbox) When using AS profiler, the mapview crashes

When using the AS profiler on one of my test devices, the mapview is crashing a few seconds after enabled this tool. I can reproduce this crash only on the Moto G5 so far.

2019-05-09 17:47:56.959 21342-21342/? A/DEBUG: *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** ***
2019-05-09 17:47:56.959 21342-21342/? A/DEBUG: Build fingerprint: 'motorola/cedric/cedric:8.1.0/OPPS28.85-13-6/04442:user/release-keys'
2019-05-09 17:47:56.959 21342-21342/? A/DEBUG: Revision: 'p500'
2019-05-09 17:47:56.959 21342-21342/? A/DEBUG: ABI: 'arm'
2019-05-09 17:47:56.959 21342-21342/? A/DEBUG: pid: 20869, tid: 20869, name: app.android.dev >>> my.app.android.dev <<<
2019-05-09 17:47:56.959 21342-21342/? A/DEBUG: signal 11 (SIGSEGV), code 1 (SEGV_MAPERR), fault addr 0x1f
2019-05-09 17:47:56.959 21342-21342/? A/DEBUG: Cause: null pointer dereference
2019-05-09 17:47:56.959 21342-21342/? A/DEBUG: r0 beb82f38 r1 ffffffff r2 00000003 r3 9135e141
2019-05-09 17:47:56.960 21342-21342/? A/DEBUG: r4 beb82ee0 r5 beb82f38 r6 aee691b8 r7 beb82e80
2019-05-09 17:47:56.960 21342-21342/? A/DEBUG: r8 00000000 r9 00000000 sl 00000001 fp 00000000
2019-05-09 17:47:56.960 21342-21342/? A/DEBUG: ip 84570fb0 sp beb82e80 lr 913673d7 pc 9136754a cpsr 800d0030
2019-05-09 17:47:56.960 21342-21342/? W/crash_dump32: type=1400 audit(0.0:7142): avc: denied { search } for uid=10430 name="my.app.android.dev" dev="dm-1" ino=13462 scontext=u:r:crash_dump:s0:c512,c768 tcontext=u:object_r:app_data_file:s0:c512,c768 tclass=dir permissive=0
2019-05-09 17:47:56.967 21342-21342/? A/DEBUG: backtrace:
2019-05-09 17:47:56.967 21342-21342/? A/DEBUG: #00 pc 0025e54a /data/app/my.app.android.dev-8_0MndZxD_oc2bcIZvHDHA==/lib/arm/libmapbox-gl.so
2019-05-09 17:47:56.967 21342-21342/? A/DEBUG: mapbox/mapbox-gl-native#1 pc 0025e3d3 /data/app/my.app.android.dev-8_0MndZxD_oc2bcIZvHDHA==/lib/arm/libmapbox-gl.so
2019-05-09 17:47:56.967 21342-21342/? A/DEBUG: mapbox/mapbox-gl-native#2 pc 002552a1 /data/app/my.app.android.dev-8_0MndZxD_oc2bcIZvHDHA==/lib/arm/libmapbox-gl.so
2019-05-09 17:47:56.967 21342-21342/? A/DEBUG: mapbox/mapbox-gl-native#3 pc 0025524f /data/app/my.app.android.dev-8_0MndZxD_oc2bcIZvHDHA==/lib/arm/libmapbox-gl.so
2019-05-09 17:47:56.967 21342-21342/? A/DEBUG: mapbox/mapbox-gl-native#4 pc 0018bee4 /data/data/my.app.android.dev/libperfa_arm.so
2019-05-09 17:47:56.967 21342-21342/? A/DEBUG: mapbox/mapbox-gl-native#5 pc 0018c808 /data/data/my.app.android.dev/libperfa_arm.so

Configuration

Android versions: 8.1
Device models: Moto G5
Mapbox SDK versions: 7.4.0-beta.3

[android] Include `LICENSE.md` file with distributed library

image

We currently link to our license file from Bintray (our distribution channel) and, thanks to some recent work mapbox/mapbox-gl-native#14163, we make sure that this file is up to date with every code contribution.

I'd like to use this ticket to explore the viability of including the actual file together with the library we publish to Bintray (and subsequently Maven Central). I'm unsure if this/how this is possible, and what would be the best way to achieve this (some Gradle rule?).

/cc: @kathleenlu09

Android: map download status.isComplete() is called twice

After updating mapbox version, status.isComplete() behavior has changed.

Steps to reproduce

  1. Add a breakpoint in endProgress

Expected behavior

status.isComplete() is called once.

Actual behavior

status.isComplete() is called twice.

Configuration

Android versions: Android 9.0
Device models: Pixel 3
Mapbox SDK versions: 8.1.0

TextureView framebuffer detach crash

Crash null pointer dereference coming from libGLESv2_adreno. I'm occasionally able to reproduce on a Pixel 2 XL running Pie with these steps:

  1. Open ViewPagerActivity
  2. Scroll view pager
  3. Rotate the Activity to horizontal view
  4. Minimize the activity
  5. From the launcher in portrait orientation bring the activity back

Release:

A/libc: Fatal signal 11 (SIGSEGV), code 1 (SEGV_MAPERR), fault addr 0x28 in tid 10032 (pboxsdk.testapp), pid 10032 (pboxsdk.testapp)
A/DEBUG: *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** ***
A/DEBUG: Build fingerprint: 'google/taimen/taimen:9/PQ3A.190801.002/5670241:user/release-keys'
A/DEBUG: Revision: 'rev_10'
A/DEBUG: ABI: 'arm64'
A/DEBUG: pid: 10032, tid: 10032, name: pboxsdk.testapp  >>> com.mapbox.mapboxsdk.testapp <<<
A/DEBUG: signal 11 (SIGSEGV), code 1 (SEGV_MAPERR), fault addr 0x28
A/DEBUG: Cause: null pointer dereference
A/DEBUG:     x0  0000000000000000  x1  000000762dc0d300  x2  0000000000000000  x3  000000762cf5f580
A/DEBUG:     x4  000000762cf5f5b4  x5  0000000000000000  x6  00000007ffb42000  x7  0000000000000000
A/DEBUG:     x8  0000000000000857  x9  0000000000000000  x10 000000762cf63638  x11 0000000000000000
A/DEBUG:     x12 0000000000000001  x13 000000762cf5f638  x14 0000000000000000  x15 0000000000000000
A/DEBUG:     x16 00000000000011d9  x17 0000000000000002  x18 0000000000000003  x19 0000000000000000
A/DEBUG:     x20 0000000000000001  x21 0000000000000000  x22 0000000000000000  x23 000000763eabb2d8
A/DEBUG:     x24 00000076318f2cf8  x25 00000076318f2d10  x26 00000076318f2d00  x27 000000764203ffc0
A/DEBUG:     x28 0000000000000000  x29 0000007fe7442940
A/DEBUG:     sp  0000007fe74428d0  lr  00000076314ab6b8  pc  00000076313e1350
A/DEBUG: backtrace:
A/DEBUG:     #00 pc 000000000012d350  /vendor/lib64/egl/libGLESv2_adreno.so (EsxFramebufferObject::DetachAll(EsxContext*)+60)
A/DEBUG:     mapbox/mapbox-gl-native#1 pc 00000000001f76b4  /vendor/lib64/egl/libGLESv2_adreno.so (EglContext::UnmakeCurrentEsx()+304)
A/DEBUG:     mapbox/mapbox-gl-native#2 pc 00000000001f7534  /vendor/lib64/egl/libGLESv2_adreno.so (EglContext::UnmakeCurrent()+128)
A/DEBUG:     mapbox/mapbox-gl-native#3 pc 00000000001f8570  /vendor/lib64/egl/libGLESv2_adreno.so (EglThreadList::SearchCurrentDisplayAndUnmake(EglDisplay*)+224)
A/DEBUG:     mapbox/mapbox-gl-native#4 pc 00000000001f815c  /vendor/lib64/egl/libGLESv2_adreno.so (EglDisplay::Terminate(int)+168)
A/DEBUG:     mapbox/mapbox-gl-native#5 pc 00000000001ee55c  /vendor/lib64/egl/libGLESv2_adreno.so (EglApi::Terminate(void*)+84)
A/DEBUG:     mapbox/mapbox-gl-native#6 pc 0000000000011150  /system/lib64/libEGL.so (android::egl_display_t::terminate()+112)
A/DEBUG:     mapbox/mapbox-gl-native#7 pc 000000000006c8f0  /system/lib64/libgui.so (android::GLConsumer::EglImage::~EglImage()+80)
A/DEBUG:     mapbox/mapbox-gl-native#8 pc 000000000006c72c  /system/lib64/libgui.so (android::GLConsumer::abandonLocked()+68)
A/DEBUG:     mapbox/mapbox-gl-native#9 pc 0000000000063678  /system/lib64/libgui.so (android::ConsumerBase::onLastStrongRef(void const*)+48)
A/DEBUG:     mapbox/mapbox-gl-native#10 pc 0000000000155260  /system/lib64/libandroid_runtime.so (android::SurfaceTexture_release(_JNIEnv*, _jobject*)+80)
A/DEBUG:     mapbox/mapbox-gl-native#11 pc 00000000003d624c  /system/framework/arm64/boot-framework.oat (offset 0x3cd000) (android.graphics.Camera.nativeConstructor [DEDUPED]+124)
A/DEBUG:     mapbox/mapbox-gl-native#12 pc 00000000007f5958  /system/framework/arm64/boot-framework.oat (offset 0x3cd000) (android.graphics.SurfaceTexture.release+40)
A/DEBUG:     mapbox/mapbox-gl-native#13 pc 0000000000d2865c  /system/framework/arm64/boot-framework.oat (offset 0x3cd000) (android.view.TextureView.releaseSurfaceTexture+252)
A/DEBUG:     mapbox/mapbox-gl-native#14 pc 0000000000d29068  /system/framework/arm64/boot-framework.oat (offset 0x3cd000) (android.view.TextureView.onDetachedFromWindowInternal+248)
A/DEBUG:     mapbox/mapbox-gl-native#15 pc 0000000000c6b3f0  /system/framework/arm64/boot-framework.oat (offset 0x3cd000) (android.view.View.dispatchDetachedFromWindow+192)
A/DEBUG:     mapbox/mapbox-gl-native#16 pc 0000000000d303c0  /system/framework/arm64/boot-framework.oat (offset 0x3cd000) (android.view.ViewGroup.dispatchDetachedFromWindow+240)
A/DEBUG:     mapbox/mapbox-gl-native#17 pc 0000000000d2d6c8  /system/framework/arm64/boot-framework.oat (offset 0x3cd000) (android.view.ViewGroup.removeViewInternal+376)
A/DEBUG:     mapbox/mapbox-gl-native#18 pc 00000000000a0590  /dev/ashmem/dalvik-jit-code-cache (deleted)

Debug, symbolicated:

********** Crash dump: **********
Build fingerprint: 'google/taimen/taimen:9/PQ3A.190801.002/5670241:user/release-keys'
#00 0x000000000012d350 /vendor/lib64/egl/libGLESv2_adreno.so (EsxFramebufferObject::DetachAll(EsxContext*)+60)
mapbox/mapbox-gl-native#1 0x00000000001f76b4 /vendor/lib64/egl/libGLESv2_adreno.so (EglContext::UnmakeCurrentEsx()+304)
mapbox/mapbox-gl-native#2 0x00000000001f7534 /vendor/lib64/egl/libGLESv2_adreno.so (EglContext::UnmakeCurrent()+128)
mapbox/mapbox-gl-native#3 0x00000000001f8570 /vendor/lib64/egl/libGLESv2_adreno.so (EglThreadList::SearchCurrentDisplayAndUnmake(EglDisplay*)+224)
mapbox/mapbox-gl-native#4 0x00000000001f815c /vendor/lib64/egl/libGLESv2_adreno.so (EglDisplay::Terminate(int)+168)
mapbox/mapbox-gl-native#5 0x00000000001ee55c /vendor/lib64/egl/libGLESv2_adreno.so (EglApi::Terminate(void*)+84)
mapbox/mapbox-gl-native#6 0x0000000000011150 /system/lib64/libEGL.so (android::egl_display_t::terminate()+112)
mapbox/mapbox-gl-native#7 0x000000000006c8f0 /system/lib64/libgui.so (android::GLConsumer::EglImage::~EglImage()+80)
mapbox/mapbox-gl-native#8 0x000000000006c72c /system/lib64/libgui.so (android::GLConsumer::abandonLocked()+68)
mapbox/mapbox-gl-native#9 0x0000000000063678 /system/lib64/libgui.so (android::ConsumerBase::onLastStrongRef(void const*)+48)
mapbox/mapbox-gl-native#10 0x0000000000155260 /system/lib64/libandroid_runtime.so (android::SurfaceTexture_release(_JNIEnv*, _jobject*)+80)
mapbox/mapbox-gl-native#11 0x00000000003d624c /system/framework/arm64/boot-framework.oat (offset 0x3cd000) (android.graphics.Camera.nativeConstructor [DEDUPED]+124)
mapbox/mapbox-gl-native#12 0x000000000055cb88 /system/lib64/libart.so (art_quick_invoke_stub+584)
mapbox/mapbox-gl-native#13 0x00000000000cf740 /system/lib64/libart.so (art::ArtMethod::Invoke(art::Thread*, unsigned int*, unsigned int, art::JValue*, char const*)+200)
mapbox/mapbox-gl-native#14 0x00000000002823b0 /system/lib64/libart.so (art::interpreter::ArtInterpreterToCompiledCodeBridge(art::Thread*, art::ArtMethod*, art::ShadowFrame*, unsigned short, art::JValue*)+344)
mapbox/mapbox-gl-native#15 0x000000000027c36c /system/lib64/libart.so (bool art::interpreter::DoCall<false, false>(art::ArtMethod*, art::Thread*, art::ShadowFrame&, art::Instruction const*, unsigned short, art::JValue*)+948)
mapbox/mapbox-gl-native#16 0x000000000052d758 /system/lib64/libart.so (MterpInvokeDirect+296)
mapbox/mapbox-gl-native#17 0x000000000054f214 /system/lib64/libart.so (ExecuteMterpImpl+14484)
mapbox/mapbox-gl-native#18 0x0000000000421f60 /system/framework/boot-framework.vdex (android.graphics.SurfaceTexture.release)
mapbox/mapbox-gl-native#19 0x0000000000255e68 /system/lib64/libart.so (_ZN3art11interpreterL7ExecuteEPNS_6ThreadERKNS_20CodeItemDataAccessorERNS_11ShadowFrameENS_6JValueEb.llvm.2088410233+496)
mapbox/mapbox-gl-native#20 0x000000000025b9e8 /system/lib64/libart.so (art::interpreter::ArtInterpreterToInterpreterBridge(art::Thread*, art::CodeItemDataAccessor const&, art::ShadowFrame*, art::JValue*)+216)
mapbox/mapbox-gl-native#21 0x000000000027c350 /system/lib64/libart.so (bool art::interpreter::DoCall<false, false>(art::ArtMethod*, art::Thread*, art::ShadowFrame&, art::Instruction const*, unsigned short, art::JValue*)+920)
mapbox/mapbox-gl-native#22 0x000000000052c418 /system/lib64/libart.so (MterpInvokeVirtual+584)
mapbox/mapbox-gl-native#23 0x000000000054f114 /system/lib64/libart.so (ExecuteMterpImpl+14228)
mapbox/mapbox-gl-native#24 0x0000000000b71e9e /system/framework/boot-framework.vdex (android.view.TextureView.releaseSurfaceTexture+56)
mapbox/mapbox-gl-native#25 0x0000000000255e68 /system/lib64/libart.so (_ZN3art11interpreterL7ExecuteEPNS_6ThreadERKNS_20CodeItemDataAccessorERNS_11ShadowFrameENS_6JValueEb.llvm.2088410233+496)
mapbox/mapbox-gl-native#26 0x000000000025b9e8 /system/lib64/libart.so (art::interpreter::ArtInterpreterToInterpreterBridge(art::Thread*, art::CodeItemDataAccessor const&, art::ShadowFrame*, art::JValue*)+216)
mapbox/mapbox-gl-native#27 0x000000000027c350 /system/lib64/libart.so (bool art::interpreter::DoCall<false, false>(art::ArtMethod*, art::Thread*, art::ShadowFrame&, art::Instruction const*, unsigned short, art::JValue*)+920)
mapbox/mapbox-gl-native#28 0x000000000052d758 /system/lib64/libart.so (MterpInvokeDirect+296)
mapbox/mapbox-gl-native#29 0x000000000054f214 /system/lib64/libart.so (ExecuteMterpImpl+14484)
mapbox/mapbox-gl-native#30 0x0000000000b71db0 /system/framework/boot-framework.vdex (android.view.TextureView.onDetachedFromWindowInternal+6)
mapbox/mapbox-gl-native#31 0x0000000000255e68 /system/lib64/libart.so (_ZN3art11interpreterL7ExecuteEPNS_6ThreadERKNS_20CodeItemDataAccessorERNS_11ShadowFrameENS_6JValueEb.llvm.2088410233+496)
mapbox/mapbox-gl-native#32 0x000000000051cb58 /system/lib64/libart.so (artQuickToInterpreterBridge+1032)
mapbox/mapbox-gl-native#33 0x0000000000565cfc /system/lib64/libart.so (art_quick_to_interpreter_bridge+92)
mapbox/mapbox-gl-native#34 0x000000000009fed0 /dev/ashmem/dalvik-jit-code-cache (deleted) (android.view.View.dispatchDetachedFromWindow+192)
mapbox/mapbox-gl-native#35 0x00000000000c9408 /dev/ashmem/dalvik-jit-code-cache (deleted) (android.view.ViewGroup.dispatchDetachedFromWindow+216)
mapbox/mapbox-gl-native#36 0x000000000055cb88 /system/lib64/libart.so (art_quick_invoke_stub+584)
mapbox/mapbox-gl-native#37 0x00000000000cf740 /system/lib64/libart.so (art::ArtMethod::Invoke(art::Thread*, unsigned int*, unsigned int, art::JValue*, char const*)+200)
mapbox/mapbox-gl-native#38 0x00000000002823b0 /system/lib64/libart.so (art::interpreter::ArtInterpreterToCompiledCodeBridge(art::Thread*, art::ArtMethod*, art::ShadowFrame*, unsigned short, art::JValue*)+344)
mapbox/mapbox-gl-native#39 0x000000000027c36c /system/lib64/libart.so (bool art::interpreter::DoCall<false, false>(art::ArtMethod*, art::Thread*, art::ShadowFrame&, art::Instruction const*, unsigned short, art::JValue*)+948)
mapbox/mapbox-gl-native#40 0x000000000052c418 /system/lib64/libart.so (MterpInvokeVirtual+584)
mapbox/mapbox-gl-native#41 0x000000000054f114 /system/lib64/libart.so (ExecuteMterpImpl+14228)
mapbox/mapbox-gl-native#42 0x0000000000b77ca4 /system/framework/boot-framework.vdex (android.view.ViewGroup.removeViewInternal+116)
mapbox/mapbox-gl-native#43 0x0000000000255e68 /system/lib64/libart.so (_ZN3art11interpreterL7ExecuteEPNS_6ThreadERKNS_20CodeItemDataAccessorERNS_11ShadowFrameENS_6JValueEb.llvm.2088410233+496)
mapbox/mapbox-gl-native#44 0x000000000025b9e8 /system/lib64/libart.so (art::interpreter::ArtInterpreterToInterpreterBridge(art::Thread*, art::CodeItemDataAccessor const&, art::ShadowFrame*, art::JValue*)+216)
mapbox/mapbox-gl-native#45 0x000000000027c350 /system/lib64/libart.so (bool art::interpreter::DoCall<false, false>(art::ArtMethod*, art::Thread*, art::ShadowFrame&, art::Instruction const*, unsigned short, art::JValue*)+920)
mapbox/mapbox-gl-native#46 0x000000000052d758 /system/lib64/libart.so (MterpInvokeDirect+296)
mapbox/mapbox-gl-native#47 0x000000000054f214 /system/lib64/libart.so (ExecuteMterpImpl+14484)
mapbox/mapbox-gl-native#48 0x0000000000d20d6c /system/framework/boot-framework.vdex (android.view.ViewGroup.removeViewInternal+12)
mapbox/mapbox-gl-native#49 0x0000000000255e68 /system/lib64/libart.so (_ZN3art11interpreterL7ExecuteEPNS_6ThreadERKNS_20CodeItemDataAccessorERNS_11ShadowFrameENS_6JValueEb.llvm.2088410233+496)
mapbox/mapbox-gl-native#50 0x000000000025b9e8 /system/lib64/libart.so (art::interpreter::ArtInterpreterToInterpreterBridge(art::Thread*, art::CodeItemDataAccessor const&, art::ShadowFrame*, art::JValue*)+216)
mapbox/mapbox-gl-native#51 0x000000000027c350 /system/lib64/libart.so (bool art::interpreter::DoCall<false, false>(art::ArtMethod*, art::Thread*, art::ShadowFrame&, art::Instruction const*, unsigned short, art::JValue*)+920)
mapbox/mapbox-gl-native#52 0x000000000052d758 /system/lib64/libart.so (MterpInvokeDirect+296)
mapbox/mapbox-gl-native#53 0x000000000054f214 /system/lib64/libart.so (ExecuteMterpImpl+14484)
mapbox/mapbox-gl-native#54 0x0000000000b77be2 /system/framework/boot-framework.vdex (android.view.ViewGroup.removeView)
mapbox/mapbox-gl-native#55 0x0000000000255e68 /system/lib64/libart.so (_ZN3art11interpreterL7ExecuteEPNS_6ThreadERKNS_20CodeItemDataAccessorERNS_11ShadowFrameENS_6JValueEb.llvm.2088410233+496)
mapbox/mapbox-gl-native#56 0x000000000025b9e8 /system/lib64/libart.so (art::interpreter::ArtInterpreterToInterpreterBridge(art::Thread*, art::CodeItemDataAccessor const&, art::ShadowFrame*, art::JValue*)+216)
mapbox/mapbox-gl-native#57 0x000000000027c350 /system/lib64/libart.so (bool art::interpreter::DoCall<false, false>(art::ArtMethod*, art::Thread*, art::ShadowFrame&, art::Instruction const*, unsigned short, art::JValue*)+920)
mapbox/mapbox-gl-native#58 0x000000000052caa8 /system/lib64/libart.so (MterpInvokeSuper+1408)
mapbox/mapbox-gl-native#59 0x000000000054f194 /system/lib64/libart.so (ExecuteMterpImpl+14356)
mapbox/mapbox-gl-native#60 0x000000000020ed50 /dev/ashmem/dalvik-classes.dex extracted in memory from /data/app/com.mapbox.mapboxsdk.testapp-CbhRDPV72Hxaxq5ir6I0Hg==/base.apk (deleted) (android.support.v4.view.ViewPager.removeView+16)
mapbox/mapbox-gl-native#61 0x0000000000255e68 /system/lib64/libart.so (_ZN3art11interpreterL7ExecuteEPNS_6ThreadERKNS_20CodeItemDataAccessorERNS_11ShadowFrameENS_6JValueEb.llvm.2088410233+496)
mapbox/mapbox-gl-native#62 0x000000000025b9e8 /system/lib64/libart.so (art::interpreter::ArtInterpreterToInterpreterBridge(art::Thread*, art::CodeItemDataAccessor const&, art::ShadowFrame*, art::JValue*)+216)
mapbox/mapbox-gl-native#63 0x000000000027c350 /system/lib64/libart.so (bool art::interpreter::DoCall<false, false>(art::ArtMethod*, art::Thread*, art::ShadowFrame&, art::Instruction const*, unsigned short, art::JValue*)+920)
mapbox/mapbox-gl-native#64 0x000000000052c418 /system/lib64/libart.so (MterpInvokeVirtual+584)
mapbox/mapbox-gl-native#65 0x000000000054f114 /system/lib64/libart.so (ExecuteMterpImpl+14228)
mapbox/mapbox-gl-native#66 0x00000000001bf1ba /dev/ashmem/dalvik-classes.dex extracted in memory from /data/app/com.mapbox.mapboxsdk.testapp-CbhRDPV72Hxaxq5ir6I0Hg==/base.apk (deleted) (android.support.v4.app.FragmentManagerImpl.moveToState+1926)
mapbox/mapbox-gl-native#67 0x0000000000255e68 /system/lib64/libart.so (_ZN3art11interpreterL7ExecuteEPNS_6ThreadERKNS_20CodeItemDataAccessorERNS_11ShadowFrameENS_6JValueEb.llvm.2088410233+496)
mapbox/mapbox-gl-native#68 0x000000000051cb58 /system/lib64/libart.so (artQuickToInterpreterBridge+1032)
mapbox/mapbox-gl-native#69 0x0000000000565cfc /system/lib64/libart.so (art_quick_to_interpreter_bridge+92)
mapbox/mapbox-gl-native#70 0x00000000000dbb88 /dev/ashmem/dalvik-jit-code-cache (deleted) (android.support.v4.app.FragmentManagerImpl.moveFragmentToExpectedState+264)
mapbox/mapbox-gl-native#71 0x00000000000966b0 /dev/ashmem/dalvik-jit-code-cache (deleted) (android.support.v4.app.FragmentManagerImpl.moveToState+352)
mapbox/mapbox-gl-native#72 0x00000000000a8554 /dev/ashmem/dalvik-jit-code-cache (deleted) (android.support.v4.app.FragmentManagerImpl.dispatchStateChange+68)
mapbox/mapbox-gl-native#73 0x000000000055cb88 /system/lib64/libart.so (art_quick_invoke_stub+584)
mapbox/mapbox-gl-native#74 0x00000000000cf740 /system/lib64/libart.so (art::ArtMethod::Invoke(art::Thread*, unsigned int*, unsigned int, art::JValue*, char const*)+200)
mapbox/mapbox-gl-native#75 0x00000000002823b0 /system/lib64/libart.so (art::interpreter::ArtInterpreterToCompiledCodeBridge(art::Thread*, art::ArtMethod*, art::ShadowFrame*, unsigned short, art::JValue*)+344)
mapbox/mapbox-gl-native#76 0x000000000027c36c /system/lib64/libart.so (bool art::interpreter::DoCall<false, false>(art::ArtMethod*, art::Thread*, art::ShadowFrame&, art::Instruction const*, unsigned short, art::JValue*)+948)
#77 0x000000000052d758 /system/lib64/libart.so (MterpInvokeDirect+296)
mapbox/mapbox-gl-native#78 0x000000000054f214 /system/lib64/libart.so (ExecuteMterpImpl+14484)
mapbox/mapbox-gl-native#79 0x00000000001bd30a /dev/ashmem/dalvik-classes.dex extracted in memory from /data/app/com.mapbox.mapboxsdk.testapp-CbhRDPV72Hxaxq5ir6I0Hg==/base.apk (deleted) (android.support.v4.app.FragmentManagerImpl.dispatchDestroy+14)
mapbox/mapbox-gl-native#80 0x0000000000255e68 /system/lib64/libart.so (_ZN3art11interpreterL7ExecuteEPNS_6ThreadERKNS_20CodeItemDataAccessorERNS_11ShadowFrameENS_6JValueEb.llvm.2088410233+496)
mapbox/mapbox-gl-native#81 0x000000000025b9e8 /system/lib64/libart.so (art::interpreter::ArtInterpreterToInterpreterBridge(art::Thread*, art::CodeItemDataAccessor const&, art::ShadowFrame*, art::JValue*)+216)
mapbox/mapbox-gl-native#82 0x000000000027c350 /system/lib64/libart.so (bool art::interpreter::DoCall<false, false>(art::ArtMethod*, art::Thread*, art::ShadowFrame&, art::Instruction const*, unsigned short, art::JValue*)+920)
mapbox/mapbox-gl-native#83 0x000000000052c418 /system/lib64/libart.so (MterpInvokeVirtual+584)
mapbox/mapbox-gl-native#84 0x000000000054f114 /system/lib64/libart.so (ExecuteMterpImpl+14228)
mapbox/mapbox-gl-native#85 0x00000000001ba290 /dev/ashmem/dalvik-classes.dex extracted in memory from /data/app/com.mapbox.mapboxsdk.testapp-CbhRDPV72Hxaxq5ir6I0Hg==/base.apk (deleted) (android.support.v4.app.FragmentController.dispatchDestroy+8)
mapbox/mapbox-gl-native#86 0x0000000000255e68 /system/lib64/libart.so (_ZN3art11interpreterL7ExecuteEPNS_6ThreadERKNS_20CodeItemDataAccessorERNS_11ShadowFrameENS_6JValueEb.llvm.2088410233+496)
mapbox/mapbox-gl-native#87 0x000000000025b9e8 /system/lib64/libart.so (art::interpreter::ArtInterpreterToInterpreterBridge(art::Thread*, art::CodeItemDataAccessor const&, art::ShadowFrame*, art::JValue*)+216)
mapbox/mapbox-gl-native#88 0x000000000027c350 /system/lib64/libart.so (bool art::interpreter::DoCall<false, false>(art::ArtMethod*, art::Thread*, art::ShadowFrame&, art::Instruction const*, unsigned short, art::JValue*)+920)
mapbox/mapbox-gl-native#89 0x000000000052c418 /system/lib64/libart.so (MterpInvokeVirtual+584)
mapbox/mapbox-gl-native#90 0x000000000054f114 /system/lib64/libart.so (ExecuteMterpImpl+14228)
mapbox/mapbox-gl-native#91 0x00000000001b98e0 /dev/ashmem/dalvik-classes.dex extracted in memory from /data/app/com.mapbox.mapboxsdk.testapp-CbhRDPV72Hxaxq5ir6I0Hg==/base.apk (deleted) (android.support.v4.app.FragmentActivity.onDestroy+40)
mapbox/mapbox-gl-native#92 0x0000000000255e68 /system/lib64/libart.so (_ZN3art11interpreterL7ExecuteEPNS_6ThreadERKNS_20CodeItemDataAccessorERNS_11ShadowFrameENS_6JValueEb.llvm.2088410233+496)
mapbox/mapbox-gl-native#93 0x000000000025b9e8 /system/lib64/libart.so (art::interpreter::ArtInterpreterToInterpreterBridge(art::Thread*, art::CodeItemDataAccessor const&, art::ShadowFrame*, art::JValue*)+216)
mapbox/mapbox-gl-native#94 0x000000000027c350 /system/lib64/libart.so (bool art::interpreter::DoCall<false, false>(art::ArtMethod*, art::Thread*, art::ShadowFrame&, art::Instruction const*, unsigned short, art::JValue*)+920)
mapbox/mapbox-gl-native#95 0x000000000052caa8 /system/lib64/libart.so (MterpInvokeSuper+1408)
mapbox/mapbox-gl-native#96 0x000000000054f194 /system/lib64/libart.so (ExecuteMterpImpl+14356)
mapbox/mapbox-gl-native#97 0x0000000000229e40 /dev/ashmem/dalvik-classes.dex extracted in memory from /data/app/com.mapbox.mapboxsdk.testapp-CbhRDPV72Hxaxq5ir6I0Hg==/base.apk (deleted) (android.support.v7.app.AppCompatActivity.onDestroy)
mapbox/mapbox-gl-native#98 0x0000000000255e68 /system/lib64/libart.so (_ZN3art11interpreterL7ExecuteEPNS_6ThreadERKNS_20CodeItemDataAccessorERNS_11ShadowFrameENS_6JValueEb.llvm.2088410233+496)
mapbox/mapbox-gl-native#99 0x000000000025b9e8 /system/lib64/libart.so (art::interpreter::ArtInterpreterToInterpreterBridge(art::Thread*, art::CodeItemDataAccessor const&, art::ShadowFrame*, art::JValue*)+216)
mapbox/mapbox-gl-native#100 0x000000000027c350 /system/lib64/libart.so (bool art::interpreter::DoCall<false, false>(art::ArtMethod*, art::Thread*, art::ShadowFrame&, art::Instruction const*, unsigned short, art::JValue*)+920)
mapbox/mapbox-gl-native#101 0x000000000052c418 /system/lib64/libart.so (MterpInvokeVirtual+584)
mapbox/mapbox-gl-native#102 0x000000000054f114 /system/lib64/libart.so (ExecuteMterpImpl+14228)
mapbox/mapbox-gl-native#103 0x0000000000389656 /system/framework/boot-framework.vdex (android.app.Activity.performDestroy+26)
mapbox/mapbox-gl-native#104 0x0000000000255e68 /system/lib64/libart.so (_ZN3art11interpreterL7ExecuteEPNS_6ThreadERKNS_20CodeItemDataAccessorERNS_11ShadowFrameENS_6JValueEb.llvm.2088410233+496)
mapbox/mapbox-gl-native#105 0x000000000025b9e8 /system/lib64/libart.so (art::interpreter::ArtInterpreterToInterpreterBridge(art::Thread*, art::CodeItemDataAccessor const&, art::ShadowFrame*, art::JValue*)+216)
mapbox/mapbox-gl-native#106 0x000000000027c350 /system/lib64/libart.so (bool art::interpreter::DoCall<false, false>(art::ArtMethod*, art::Thread*, art::ShadowFrame&, art::Instruction const*, unsigned short, art::JValue*)+920)
mapbox/mapbox-gl-native#107 0x000000000052c418 /system/lib64/libart.so (MterpInvokeVirtual+584)
mapbox/mapbox-gl-native#108 0x000000000054f114 /system/lib64/libart.so (ExecuteMterpImpl+14228)
mapbox/mapbox-gl-native#109 0x00000000003a89f6 /system/framework/boot-framework.vdex (android.app.Instrumentation.callActivityOnDestroy)
mapbox/mapbox-gl-native#110 0x0000000000255e68 /system/lib64/libart.so (_ZN3art11interpreterL7ExecuteEPNS_6ThreadERKNS_20CodeItemDataAccessorERNS_11ShadowFrameENS_6JValueEb.llvm.2088410233+496)
mapbox/mapbox-gl-native#111 0x000000000025b9e8 /system/lib64/libart.so (art::interpreter::ArtInterpreterToInterpreterBridge(art::Thread*, art::CodeItemDataAccessor const&, art::ShadowFrame*, art::JValue*)+216)
mapbox/mapbox-gl-native#112 0x000000000027c350 /system/lib64/libart.so (bool art::interpreter::DoCall<false, false>(art::ArtMethod*, art::Thread*, art::ShadowFrame&, art::Instruction const*, unsigned short, art::JValue*)+920)
mapbox/mapbox-gl-native#113 0x000000000052c418 /system/lib64/libart.so (MterpInvokeVirtual+584)
mapbox/mapbox-gl-native#114 0x000000000054f114 /system/lib64/libart.so (ExecuteMterpImpl+14228)
mapbox/mapbox-gl-native#115 0x0000000000381068 /system/framework/boot-framework.vdex (android.app.ActivityThread.performDestroyActivity+244)
mapbox/mapbox-gl-native#116 0x0000000000255e68 /system/lib64/libart.so (_ZN3art11interpreterL7ExecuteEPNS_6ThreadERKNS_20CodeItemDataAccessorERNS_11ShadowFrameENS_6JValueEb.llvm.2088410233+496)
mapbox/mapbox-gl-native#117 0x000000000025b9e8 /system/lib64/libart.so (art::interpreter::ArtInterpreterToInterpreterBridge(art::Thread*, art::CodeItemDataAccessor const&, art::ShadowFrame*, art::JValue*)+216)
mapbox/mapbox-gl-native#118 0x000000000027d45c /system/lib64/libart.so (bool art::interpreter::DoCall<true, false>(art::ArtMethod*, art::Thread*, art::ShadowFrame&, art::Instruction const*, unsigned short, art::JValue*)+724)
mapbox/mapbox-gl-native#119 0x000000000052dc50 /system/lib64/libart.so (MterpInvokeVirtualRange+576)
mapbox/mapbox-gl-native#120 0x000000000054f414 /system/lib64/libart.so (ExecuteMterpImpl+14996)
mapbox/mapbox-gl-native#121 0x00000000003842bc /system/framework/boot-framework.vdex (android.app.ActivityThread.handleDestroyActivity)
mapbox/mapbox-gl-native#122 0x0000000000255e68 /system/lib64/libart.so (_ZN3art11interpreterL7ExecuteEPNS_6ThreadERKNS_20CodeItemDataAccessorERNS_11ShadowFrameENS_6JValueEb.llvm.2088410233+496)
mapbox/mapbox-gl-native#123 0x000000000025b9e8 /system/lib64/libart.so (art::interpreter::ArtInterpreterToInterpreterBridge(art::Thread*, art::CodeItemDataAccessor const&, art::ShadowFrame*, art::JValue*)+216)
mapbox/mapbox-gl-native#124 0x000000000027d45c /system/lib64/libart.so (bool art::interpreter::DoCall<true, false>(art::ArtMethod*, art::Thread*, art::ShadowFrame&, art::Instruction const*, unsigned short, art::JValue*)+724)
mapbox/mapbox-gl-native#125 0x000000000052f784 /system/lib64/libart.so (MterpInvokeVirtualQuickRange+420)
mapbox/mapbox-gl-native#126 0x0000000000552f14 /system/lib64/libart.so (ExecuteMterpImpl+30100)
mapbox/mapbox-gl-native#127 0x00000000004b9638 /system/framework/boot-framework.vdex (android.app.ActivityThread.handleRelaunchActivityInner+74)
mapbox/mapbox-gl-native#128 0x0000000000255e68 /system/lib64/libart.so (_ZN3art11interpreterL7ExecuteEPNS_6ThreadERKNS_20CodeItemDataAccessorERNS_11ShadowFrameENS_6JValueEb.llvm.2088410233+496)
mapbox/mapbox-gl-native#129 0x000000000025b9e8 /system/lib64/libart.so (art::interpreter::ArtInterpreterToInterpreterBridge(art::Thread*, art::CodeItemDataAccessor const&, art::ShadowFrame*, art::JValue*)+216)
mapbox/mapbox-gl-native#130 0x000000000027d45c /system/lib64/libart.so (bool art::interpreter::DoCall<true, false>(art::ArtMethod*, art::Thread*, art::ShadowFrame&, art::Instruction const*, unsigned short, art::JValue*)+724)
mapbox/mapbox-gl-native#131 0x000000000052ef8c /system/lib64/libart.so (MterpInvokeDirectRange+244)
mapbox/mapbox-gl-native#132 0x000000000054f514 /system/lib64/libart.so (ExecuteMterpImpl+15252)
mapbox/mapbox-gl-native#133 0x00000000004b9562 /system/framework/boot-framework.vdex (android.app.ActivityThread.handleRelaunchActivity+400)
mapbox/mapbox-gl-native#134 0x0000000000255e68 /system/lib64/libart.so (_ZN3art11interpreterL7ExecuteEPNS_6ThreadERKNS_20CodeItemDataAccessorERNS_11ShadowFrameENS_6JValueEb.llvm.2088410233+496)
mapbox/mapbox-gl-native#135 0x000000000025b9e8 /system/lib64/libart.so (art::interpreter::ArtInterpreterToInterpreterBridge(art::Thread*, art::CodeItemDataAccessor const&, art::ShadowFrame*, art::JValue*)+216)
mapbox/mapbox-gl-native#136 0x000000000027c350 /system/lib64/libart.so (bool art::interpreter::DoCall<false, false>(art::ArtMethod*, art::Thread*, art::ShadowFrame&, art::Instruction const*, unsigned short, art::JValue*)+920)
mapbox/mapbox-gl-native#137 0x000000000052f468 /system/lib64/libart.so (MterpInvokeVirtualQuick+584)
mapbox/mapbox-gl-native#138 0x0000000000552e94 /system/lib64/libart.so (ExecuteMterpImpl+29972)
mapbox/mapbox-gl-native#139 0x00000000004ff76e /system/framework/boot-framework.vdex (android.app.servertransaction.ActivityRelaunchItem.execute+28)
mapbox/mapbox-gl-native#140 0x0000000000255e68 /system/lib64/libart.so (_ZN3art11interpreterL7ExecuteEPNS_6ThreadERKNS_20CodeItemDataAccessorERNS_11ShadowFrameENS_6JValueEb.llvm.2088410233+496)
mapbox/mapbox-gl-native#141 0x000000000025b9e8 /system/lib64/libart.so (art::interpreter::ArtInterpreterToInterpreterBridge(art::Thread*, art::CodeItemDataAccessor const&, art::ShadowFrame*, art::JValue*)+216)
mapbox/mapbox-gl-native#142 0x000000000027c350 /system/lib64/libart.so (bool art::interpreter::DoCall<false, false>(art::ArtMethod*, art::Thread*, art::ShadowFrame&, art::Instruction const*, unsigned short, art::JValue*)+920)
mapbox/mapbox-gl-native#143 0x000000000052c418 /system/lib64/libart.so (MterpInvokeVirtual+584)
mapbox/mapbox-gl-native#144 0x000000000054f114 /system/lib64/libart.so (ExecuteMterpImpl+14228)
mapbox/mapbox-gl-native#145 0x00000000003c77a8 /system/framework/boot-framework.vdex (android.app.servertransaction.TransactionExecutor.executeCallbacks+198)
mapbox/mapbox-gl-native#146 0x0000000000255e68 /system/lib64/libart.so (_ZN3art11interpreterL7ExecuteEPNS_6ThreadERKNS_20CodeItemDataAccessorERNS_11ShadowFrameENS_6JValueEb.llvm.2088410233+496)
mapbox/mapbox-gl-native#147 0x000000000025b9e8 /system/lib64/libart.so (art::interpreter::ArtInterpreterToInterpreterBridge(art::Thread*, art::CodeItemDataAccessor const&, art::ShadowFrame*, art::JValue*)+216)
mapbox/mapbox-gl-native#148 0x000000000027c350 /system/lib64/libart.so (bool art::interpreter::DoCall<false, false>(art::ArtMethod*, art::Thread*, art::ShadowFrame&, art::Instruction const*, unsigned short, art::JValue*)+920)
mapbox/mapbox-gl-native#149 0x000000000052c418 /system/lib64/libart.so (MterpInvokeVirtual+584)
mapbox/mapbox-gl-native#150 0x000000000054f114 /system/lib64/libart.so (ExecuteMterpImpl+14228)
mapbox/mapbox-gl-native#151 0x00000000003c76ba /system/framework/boot-framework.vdex (android.app.servertransaction.TransactionExecutor.execute+68)
mapbox/mapbox-gl-native#152 0x0000000000255e68 /system/lib64/libart.so (_ZN3art11interpreterL7ExecuteEPNS_6ThreadERKNS_20CodeItemDataAccessorERNS_11ShadowFrameENS_6JValueEb.llvm.2088410233+496)
mapbox/mapbox-gl-native#153 0x000000000025b9e8 /system/lib64/libart.so (art::interpreter::ArtInterpreterToInterpreterBridge(art::Thread*, art::CodeItemDataAccessor const&, art::ShadowFrame*, art::JValue*)+216)
mapbox/mapbox-gl-native#154 0x000000000027c350 /system/lib64/libart.so (bool art::interpreter::DoCall<false, false>(art::ArtMethod*, art::Thread*, art::ShadowFrame&, art::Instruction const*, unsigned short, art::JValue*)+920)
mapbox/mapbox-gl-native#155 0x000000000052c418 /system/lib64/libart.so (MterpInvokeVirtual+584)
mapbox/mapbox-gl-native#156 0x000000000054f114 /system/lib64/libart.so (ExecuteMterpImpl+14228)
mapbox/mapbox-gl-native#157 0x000000000038009a /system/framework/boot-framework.vdex (android.app.ActivityThread$H.handleMessage+78)
mapbox/mapbox-gl-native#158 0x0000000000255e68 /system/lib64/libart.so (_ZN3art11interpreterL7ExecuteEPNS_6ThreadERKNS_20CodeItemDataAccessorERNS_11ShadowFrameENS_6JValueEb.llvm.2088410233+496)
mapbox/mapbox-gl-native#159 0x000000000051cb58 /system/lib64/libart.so (artQuickToInterpreterBridge+1032)
mapbox/mapbox-gl-native#160 0x0000000000565cfc /system/lib64/libart.so (art_quick_to_interpreter_bridge+92)
mapbox/mapbox-gl-native#161 0x0000000000079750 /dev/ashmem/dalvik-jit-code-cache (deleted) (android.os.Handler.dispatchMessage+160)
mapbox/mapbox-gl-native#162 0x0000000000098f08 /dev/ashmem/dalvik-jit-code-cache (deleted) (android.os.Looper.loop+1032)
mapbox/mapbox-gl-native#163 0x000000000055cedc /system/lib64/libart.so (art_quick_osr_stub+44)
mapbox/mapbox-gl-native#164 0x000000000030ae0c /system/lib64/libart.so (art::jit::Jit::MaybeDoOnStackReplacement(art::Thread*, art::ArtMethod*, unsigned int, int, art::JValue*)+1988)
mapbox/mapbox-gl-native#165 0x0000000000532a98 /system/lib64/libart.so (MterpMaybeDoOnStackReplacement+144)
mapbox/mapbox-gl-native#166 0x0000000000553af0 /system/lib64/libart.so (ExecuteMterpImpl+33136)
mapbox/mapbox-gl-native#167 0x0000000000aecd24 /system/framework/boot-framework.vdex (android.os.Looper.loop+928)
mapbox/mapbox-gl-native#168 0x0000000000255e68 /system/lib64/libart.so (_ZN3art11interpreterL7ExecuteEPNS_6ThreadERKNS_20CodeItemDataAccessorERNS_11ShadowFrameENS_6JValueEb.llvm.2088410233+496)
mapbox/mapbox-gl-native#169 0x000000000025b9e8 /system/lib64/libart.so (art::interpreter::ArtInterpreterToInterpreterBridge(art::Thread*, art::CodeItemDataAccessor const&, art::ShadowFrame*, art::JValue*)+216)
mapbox/mapbox-gl-native#170 0x000000000027c350 /system/lib64/libart.so (bool art::interpreter::DoCall<false, false>(art::ArtMethod*, art::Thread*, art::ShadowFrame&, art::Instruction const*, unsigned short, art::JValue*)+920)
mapbox/mapbox-gl-native#171 0x000000000052d91c /system/lib64/libart.so (MterpInvokeStatic+204)
mapbox/mapbox-gl-native#172 0x000000000054f294 /system/lib64/libart.so (ExecuteMterpImpl+14612)
mapbox/mapbox-gl-native#173 0x0000000000385b8a /system/framework/boot-framework.vdex (android.app.ActivityThread.main+214)
mapbox/mapbox-gl-native#174 0x0000000000255e68 /system/lib64/libart.so (_ZN3art11interpreterL7ExecuteEPNS_6ThreadERKNS_20CodeItemDataAccessorERNS_11ShadowFrameENS_6JValueEb.llvm.2088410233+496)
mapbox/mapbox-gl-native#175 0x000000000051cb58 /system/lib64/libart.so (artQuickToInterpreterBridge+1032)
mapbox/mapbox-gl-native#176 0x0000000000565cfc /system/lib64/libart.so (art_quick_to_interpreter_bridge+92)
mapbox/mapbox-gl-native#177 0x000000000055ce4c /system/lib64/libart.so (art_quick_invoke_static_stub+604)
mapbox/mapbox-gl-native#178 0x00000000000cf760 /system/lib64/libart.so (art::ArtMethod::Invoke(art::Thread*, unsigned int*, unsigned int, art::JValue*, char const*)+232)
mapbox/mapbox-gl-native#179 0x00000000004633b8 /system/lib64/libart.so (art::(anonymous namespace)::InvokeWithArgArray(art::ScopedObjectAccessAlreadyRunnable const&, art::ArtMethod*, art::(anonymous namespace)::ArgArray*, art::JValue*, char const*)+104)
mapbox/mapbox-gl-native#180 0x0000000000464e10 /system/lib64/libart.so (art::InvokeMethod(art::ScopedObjectAccessAlreadyRunnable const&, _jobject*, _jobject*, _jobject*, unsigned long)+1440)
mapbox/mapbox-gl-native#181 0x00000000003f43b0 /system/lib64/libart.so (art::Method_invoke(_JNIEnv*, _jobject*, _jobject*, _jobjectArray*)+48)
mapbox/mapbox-gl-native#182 0x000000000011e6d4 /system/framework/arm64/boot.oat (offset 0x114000) (java.lang.Class.getDeclaredMethodInternal [DEDUPED]+180)
mapbox/mapbox-gl-native#183 0x000000000055cb88 /system/lib64/libart.so (art_quick_invoke_stub+584)
mapbox/mapbox-gl-native#184 0x00000000000cf740 /system/lib64/libart.so (art::ArtMethod::Invoke(art::Thread*, unsigned int*, unsigned int, art::JValue*, char const*)+200)
mapbox/mapbox-gl-native#185 0x00000000002823b0 /system/lib64/libart.so (art::interpreter::ArtInterpreterToCompiledCodeBridge(art::Thread*, art::ArtMethod*, art::ShadowFrame*, unsigned short, art::JValue*)+344)
mapbox/mapbox-gl-native#186 0x000000000027c36c /system/lib64/libart.so (bool art::interpreter::DoCall<false, false>(art::ArtMethod*, art::Thread*, art::ShadowFrame&, art::Instruction const*, unsigned short, art::JValue*)+948)
mapbox/mapbox-gl-native#187 0x000000000052c418 /system/lib64/libart.so (MterpInvokeVirtual+584)
mapbox/mapbox-gl-native#188 0x000000000054f114 /system/lib64/libart.so (ExecuteMterpImpl+14228)
mapbox/mapbox-gl-native#189 0x0000000000c0db2e /system/framework/boot-framework.vdex (com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run+22)
mapbox/mapbox-gl-native#190 0x0000000000255e68 /system/lib64/libart.so (_ZN3art11interpreterL7ExecuteEPNS_6ThreadERKNS_20CodeItemDataAccessorERNS_11ShadowFrameENS_6JValueEb.llvm.2088410233+496)
mapbox/mapbox-gl-native#191 0x000000000051cb58 /system/lib64/libart.so (artQuickToInterpreterBridge+1032)
mapbox/mapbox-gl-native#192 0x0000000000565cfc /system/lib64/libart.so (art_quick_to_interpreter_bridge+92)
mapbox/mapbox-gl-native#193 0x0000000000beb480 /system/framework/arm64/boot-framework.oat (offset 0x3cd000) (com.android.internal.os.ZygoteInit.main+3088)
mapbox/mapbox-gl-native#194 0x000000000055ce4c /system/lib64/libart.so (art_quick_invoke_static_stub+604)
mapbox/mapbox-gl-native#195 0x00000000000cf760 /system/lib64/libart.so (art::ArtMethod::Invoke(art::Thread*, unsigned int*, unsigned int, art::JValue*, char const*)+232)
mapbox/mapbox-gl-native#196 0x00000000004633b8 /system/lib64/libart.so (art::(anonymous namespace)::InvokeWithArgArray(art::ScopedObjectAccessAlreadyRunnable const&, art::ArtMethod*, art::(anonymous namespace)::ArgArray*, art::JValue*, char const*)+104)
mapbox/mapbox-gl-native#197 0x0000000000463010 /system/lib64/libart.so (art::InvokeWithVarArgs(art::ScopedObjectAccessAlreadyRunnable const&, _jobject*, _jmethodID*, std::__va_list)+416)
mapbox/mapbox-gl-native#198 0x0000000000366854 /system/lib64/libart.so (art::JNI::CallStaticVoidMethodV(_JNIEnv*, _jclass*, _jmethodID*, std::__va_list)+644)
mapbox/mapbox-gl-native#199 0x00000000000b1f30 /system/lib64/libandroid_runtime.so (_JNIEnv::CallStaticVoidMethod(_jclass*, _jmethodID*, ...)+120)
mapbox/mapbox-gl-native#200 0x00000000000b48b0 /system/lib64/libandroid_runtime.so (android::AndroidRuntime::start(char const*, android::Vector<android::String8> const&, bool)+760)
mapbox/mapbox-gl-native#201 0x00000000000021a0 /system/bin/app_process64 (main+1200)
mapbox/mapbox-gl-native#202 0x00000000000ae760 /system/lib64/libc.so (__libc_init+88)
Crash dump is completed

Option to disable location tracking animation

@LukasPaczos commented on Tue Jul 03 2018

We are hearing voices that smooth tracking animation puts a real stress on the battery consumption, CPU usage and introduces a delay. In order to improve the experience on lower-end devices, we could expose an option to disable the smooth animation.

/cc @danesfeder


@LukasPaczos commented on Tue Aug 28 2018

Unfortunately, because of the async rendering, disabling animations won't be feasible at this point as we are out of sync when updating the location source and the camera position at the same time.

ezgif com-video-to-gif 3

The work to unblock this use case is tracked in https://github.com/mapbox/mapbox-gl-native/issues/12752.

Can't 'make android-configuration'

Steps to reproduce

  1. https://github.com/mapbox/mapbox-gl-native/tree/master/platform/android#opening-the-project
  2. linux
    run make android-configuration in the root folder of the project and open the Android Studio project in /platform/android.
  3. error, can't make

Expected behavior

success and open in android studio

Actual behavior

$ make android-configuration cat platform/android/gradle/configuration.gradle scripts/check-cxx11abi.sh: line 2: $'\r': command not found : invalid optionx11abi.sh: line 3: set: - set: usage: set [-abefhkmnptuvxBCHP] [-o option-name] [--] [arg ...] : invalid option namei.sh: line 4: set: pipefail scripts/check-cxx11abi.sh: line 5: $'\r': command not found scripts/check-cxx11abi.sh: line 22: syntax error: unexpected end of file ext { node = '/usr/bin/nodejs' npm = '/usr/bin/npm' ccache = '' }

Configuration

Android versions:
Device models:
Mapbox SDK versions:

app crashes when working with it

F/libc (32497): /usr/local/google/buildbot/src/android/ndk-release-r19/external/libcxx/../../external/libcxxabi/src/abort_message.cpp:73: abort_message: assertion "Pure virtual function called!" failed
F/libc (32497): Fatal signal 6 (SIGABRT), code -6 in tid 32497 (aa.go.mapboxmap)


Build fingerprint: 'samsung/rubensltexx/rubenslte:5.1.1/LMY47X/T365XXS1BPL2:user/release-keys'
Revision: '3'
ABI: 'arm'
pid: 32497, tid: 32497, name: aa.go.mapboxmap >>> org.dolphin.vinaa.go.mapboxmap <<<
signal 6 (SIGABRT), code -6 (SI_TKILL), fault addr --------
Abort message: '/usr/local/google/buildbot/src/android/ndk-release-r19/external/libcxx/../../external/libcxxabi/src/abort_message.cpp:73: abort_message: assertion "Pure virtual function called!" failed'
r0 00000000 r1 00007ef1 r2 00000006 r3 00000000
r4 b6fb2e38 r5 00000006 r6 0000000b r7 0000010c
r8 b6e6ae04 r9 b4878e80 sl beb1fa38 fp beb1fa48
ip 00007ef1 sp beb1f960 lr b6e157b1 pc b6e38e4c cpsr 60000010
backtrace:
#00 pc 00037e4c /system/lib/libc.so (tgkill+12)
mapbox/mapbox-gl-native#1 pc 000147ad /system/lib/libc.so (pthread_kill+52)
mapbox/mapbox-gl-native#2 pc 000153cb /system/lib/libc.so (raise+10)
mapbox/mapbox-gl-native#3 pc 00011c65 /system/lib/libc.so (__libc_android_abort+36)
mapbox/mapbox-gl-native#4 pc 0001000c /system/lib/libc.so (abort+4)
mapbox/mapbox-gl-native#5 pc 00012e9d /system/lib/libc.so (__libc_fatal+16)
mapbox/mapbox-gl-native#6 pc 00011ce9 /system/lib/libc.so (__assert2+20)
mapbox/mapbox-gl-native#7 pc 0025bdc1 /data/app/org.dolphin.vinaa.go.mapboxmap-1/lib/arm/libmapbox-gl.so
mapbox/mapbox-gl-native#8 pc 0025b319 /data/app/org.dolphin.vinaa.go.mapboxmap-1/lib/arm/libmapbox-gl.so
mapbox/mapbox-gl-native#9 pc 000306f7 /data/app/org.dolphin.vinaa.go.mapboxmap-1/lib/arm/libmapbox-gl.so
mapbox/mapbox-gl-native#10 pc 0029d957 /data/dalvik-cache/arm/data@[email protected]@[email protected]
Tombstone written to: /data/tombstones/tombstone_08
I/flutter (32497): catch report path
Lost connection to device.

Configuration

Android versions:6.0.1
Device models:Galaxy J7
Mapbox SDK versions:8.0.0

Update polyline instead of remove it and add it again

Hello,
Such as updateMarker, it will be useful allowing updates of a polyline or a polygon on the map. The only way to do so today in 4.1.0 version is to remove the polyline and adding it again, but the performances decrease quickly when trying to do this on map scroll.
The following animation is what I want to achieve, but with fluidity.

ezgif com-video-to-gif 1

I'm working on OSM Contributor and this feature will be very interesting for us.

Layers are not removed from map after calling style.removeLayer()

mapbox-android: 8.3.3

I've tried calling removeLayer on both layer and id, not working. Style has the layers at style.getLayers() which are neither detached nor invalidated. Is this intended behaviour?

I have a memory leak in native heap after destroying a map which had many layers added/removed and I suspect it's caused by the issue above.

Gradle 6.0 deprecations

Migration to gradle 5.0 is happening in mapbox/mapbox-gl-native#14646.
That migration is showing deprecation notices for gradle 6.0:

The DefaultSourceDirectorySet constructor has been deprecated. This is scheduled to be removed in Gradle 6.0. Please use the ObjectFactory service to create instances of SourceDirectorySet instead.
        at build_ae19709924bs0po3wsyjd4fv6.run(/home/tobrun/ws/mapbox-gl-native/platform/android/MapboxGLAndroidSDK/build.gradle:3)
        (Run with --stacktrace to get the full stack trace of this deprecation warning.)
/home/tobrun/ws/mapbox-gl-native/platform/android/MapboxGLAndroidSDK/src/main/java
The JacocoReportBase.setSourceDirectories(FileCollection) method has been deprecated. This is scheduled to be removed in Gradle 6.0. Use getSourceDirectories().from(...)
        at jacoco_report_5p88hyjlhpz9tb9tjfj6ch2n5$_run_closure2.doCall(/home/tobrun/ws/mapbox-gl-native/platform/android/gradle/jacoco-report.gradle:30)
        (Run with --stacktrace to get the full stack trace of this deprecation warning.)
The JacocoReportBase.setClassDirectories(FileCollection) method has been deprecated. This is scheduled to be removed in Gradle 6.0. Use getClassDirectories().from(...)
        at jacoco_report_5p88hyjlhpz9tb9tjfj6ch2n5$_run_closure2.doCall(/home/tobrun/ws/mapbox-gl-native/platform/android/gradle/jacoco-report.gradle:31)
        (Run with --stacktrace to get the full stack trace of this deprecation warning.)
The JacocoReportBase.setExecutionData(FileCollection) method has been deprecated. This is scheduled to be removed in Gradle 6.0. Use getExecutionData().from(...)
        at jacoco_report_5p88hyjlhpz9tb9tjfj6ch2n5$_run_closure2.doCall(/home/tobrun/ws/mapbox-gl-native/platform/android/gradle/jacoco-report.gradle:32)
        (Run with --stacktrace to get the full stack trace of this deprecation warning.)

Gradle command to generate these warnings:

./gradlew -Pmapbox.abis=none :MapboxGLAndroidSDK:build --warning-mode all

Test release build of the test app with robo on firebase

To prevent regressions as mapbox/mapbox-gl-native#15762, we need to run a release build of the testapp on firebase. The reason why we don't have this today, is that a release build of the test app can't be combined with running instrumentation tests. Recently noticed that this is possible with running robo (monkey) tests.

This step can be added to the current release job but shouldn't be executed when we are doing a release build (running on master or git tag).

cc @mapbox/maps-android @alexshalamov

LifeCycle & LifeCycleObserver

Google announced Android Architecture Components at Google I/O 2017 and is now in preview. One of possibilities with this api is making objects lifecycle aware. This makes integration of our maps more easy and less error prone. Pottentially we are able to remove the following boilerplate code from all activities containing a MapView.

  // Add the mapView lifecycle to the activity's lifecycle methods
  @Override
  protected void onStart() {
    super.onStart();
    mapView.onStart();
  }
  
  @Override
  public void onResume() {
    super.onResume();
    mapView.onResume();
  }

  @Override
  public void onPause() {
    super.onPause();
    mapView.onPause();
  }
  
  @Override
  protected void onStop() {
    super.onStop();
    mapView.onStop();
  }

  @Override
  public void onLowMemory() {
    super.onLowMemory();
    mapView.onLowMemory();
  }

  @Override
  protected void onDestroy() {
    super.onDestroy();
    mapView.onDestroy();
  }
  
  @Override
  protected void onSaveInstanceState(Bundle outState) {
    super.onSaveInstanceState(outState);
    mapView.onSaveInstanceState(outState);
  }

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.