Skip to content

Crash with NavigationMapRoute.addTraffic #353

Closed

Description

@davols

Noticed a crash in crashlytics.
We're running a version we are compiling ourselves. But checking master no changes from our branch and this repos master there are no changes between the two files (our NavigationMapRoute.java and the one in master here.

Fatal Exception: java.lang.IndexOutOfBoundsException: Invalid index 1121, size is 1121
       at java.util.ArrayList.throwIndexOutOfBoundsException(ArrayList.java:255)
       at java.util.ArrayList.get(ArrayList.java:308)
       at com.mapbox.services.android.navigation.ui.v5.route.NavigationMapRoute.addTrafficToSource(SourceFile:2331)

Assuming it's proguard that messes with the linenumbers. Assuming it's
double[] endCoord = lineString.getCoordinates().get(i + 1).getCoordinates(); over at
https://github.com/mapbox/mapbox-navigation-android/blob/master/libandroid-navigation-ui/src/main/java/com/mapbox/services/android/navigation/ui/v5/route/NavigationMapRoute.java#L331 which is the culprit.

As it's from crashlytics I have no clue on how to reproduce it.

Edit: Got it at the office using 0.7.0-SNAPSHOT as well.

Activity

  1. added this to the v0.6.3 milestone on Oct 13, 2017
  2. ericrwolfe commented on Oct 13, 2017

    @ericrwolfe
    Contributor

    @bsudekum wasn't there a similar crash on iOS that was fixed?

  3. ericrwolfe commented on Oct 16, 2017

    @ericrwolfe
    Contributor

    @danesfeder here's the iOS guard that worked around this crash: mapbox/mapbox-navigation-ios#696

    Seems like a potential bug upstream in the directions API, but we should still guard against it.

  4. cammace commented on Oct 18, 2017

    @cammace

    The fix for this is in #384 and will be in the 0.6.3 release. Closing.

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions