mapbox / mapbox/mapbox-navigation-android
IndexOutOfBoundsException MapMatchingActivity Robo test crash
Nobody has claimed this yet.
- 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
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- 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