mapbox / mapbox/mapbox-navigation-android

IndexOutOfBoundsException in ViewportDataSourceProcessor.getPointsToFrameOnCurrentStep

Open
#5,783 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

bug jira-sync-complete
Dominant language
Kotlin
Stars
651
Forks
321
PR merge metrics
No merged PRs in 30d

Description

Nav SDK: v2.5.0-beta.2

```
Fatal Exception: java.lang.IndexOutOfBoundsException: Index: 4, Size: 3
at java.util.ArrayList.get(ArrayList.java:437)
at com.mapbox.navigation.ui.maps.camera.data.ViewportDataSourceProcessor.getPointsToFrameOnCurrentStep(ViewportDataSourceProcessor.kt:180)
at com.mapbox.navigation.ui.maps.camera.data.MapboxNavigationViewportDataSource.onRouteProgressChanged(MapboxNavigationViewportDataSource.kt:490)
```

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by inspecting ViewportDataSourceProcessor.kt at line 180 and the caller in MapboxNavigationViewportDataSource.kt at line 490. Trace which route-progress state produces an IndexOutOfBoundsException when the list has size 3 but index 4 is requested, then verify that the reported crash no longer occurs.

Written by the indexing model from the issue text.

Assessment

Tech stack
kotlin
Domain
mobile
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.