mapbox / mapbox/mapbox-navigation-android

IndexOutOfBoundsException MapMatchingActivity Robo test crash

Open
#3,543 2 comments 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

An issue caught by a Robo test https://github.com/mapbox/mapbox-navigation-android/pull/3542 https://app.circleci.com/pipelines/github/mapbox/mapbox-navigation-android/8650/workflows/b8f7787e-4e41-4b47-a5fa-e488d009d61f/jobs/31813 https://console.firebase.google.com/u/0/project/mapbox-navigation-android/testlab/histories/bh.2e74b6b076d6fa53/matrices/6224214162069429918/executions/bs.5a0d623ec5801783

```
java.lang.IndexOutOfBoundsException: Invalid index 0, size is 0
FATAL EXCEPTION: main
Process: com.mapbox.navigation.examples, PID: 21281
java.lang.IndexOutOfBoundsException: Invalid index 0, size is 0
at java.util.ArrayList.throwIndexOutOfBoundsException(ArrayList.java:255)
at java.util.ArrayList.get(ArrayList.java:308)
at com.mapbox.navigation.examples.core.MapMatchingActivity$c.a()
at d.b.c.d.a.c$a.a()
at h.i$b$a.d()
at h.a.run(lambda)
at android.os.Handler.handleCallback(Handler.java:739)
at android.os.Handler.dispatchMessage(Handler.java:95)
at android.os.Looper.loop(Looper.java:135)
at android.app.ActivityThread.main(ActivityThread.java:5221)
at java.lang.reflect.Method.invoke(Native Method)
at java.lang.reflect.Method.invoke(Method.java:372)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:899)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:694)
```

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 with MapMatchingActivity and the linked Robo test results, then trace the callback that reaches MapMatchingActivity$c.a(). Reproduce the crash through the CircleCI or Firebase Test Lab links and ensure the empty-list case no longer raises IndexOutOfBoundsException.

Written by the indexing model from the issue text.

Assessment

Tech stack
android, 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.