mapbox / mapbox/mapbox-navigation-android
RouteLineDistancesIndex.getPoint() NullPointerException
Nobody has claimed this yet.
- Dominant language
- Kotlin
- Stars
- 651
- Forks
- 321
- PR merge metrics
- No merged PRs in 30d
Description
### Steps to trigger behavior
Unknown at this time. I just ran into it while testing on the main branch.
### Issue
```
2020-10-26 12:10:21.310 9969-9969/com.mapbox.navigation.examples E/AndroidRuntime: FATAL EXCEPTION: main
Process: com.mapbox.navigation.examples, PID: 9969
java.lang.NullPointerException: Attempt to invoke virtual method 'com.mapbox.geojson.Point com.mapbox.navigation.ui.route.RouteLineDistancesIndex.getPoint()' on a null object reference
at com.mapbox.navigation.ui.route.MapRouteLine.updateTraveledRouteLine(MapRouteLine.kt:1052)
at com.mapbox.navigation.ui.route.NavigationMapRoute$1.onIndicatorPositionChanged(NavigationMapRoute.java:343)
at com.mapbox.mapboxsdk.location.LocationComponent$10.onIndicatorPositionChanged(LocationComponent.java:1880)
at com.mapbox.mapboxsdk.location.LocationLayerController$1.onNewAnimationValue(LocationLayerController.java:269)
at com.mapbox.mapboxsdk.location.LocationLayerController$1.onNewAnimationValue(LocationLayerController.java:265)
at com.mapbox.mapboxsdk.location.MapboxAnimator.postUpdates(MapboxAnimator.java:106)
at com.mapbox.mapboxsdk.location.MapboxAnimator.onAnimationUpdate(MapboxAnimator.java:93)
at android.animation.ValueAnimator.animateValue(ValueAnimator.java:1566)
at android.animation.ValueAnimator.animateBasedOnTime(ValueAnimator.java:1357)
at android.animation.ValueAnimator.doAnimationFrame(ValueAnimator.java:1489)
at android.animation.ValueAnimator.pulseAnimationFrame(ValueAnimator.java:1508)
at android.animation.AnimatorSet.pulseFrame(AnimatorSet.java:1170)
at android.animation.AnimatorSet.doAnimationFrame(AnimatorSet.java:1061)
at android.animation.AnimationHandler.doAnimationFrame(AnimationHandler.java:146)
at android.animation.AnimationHandler.access$100(AnimationHandler.java:37)
at android.animation.AnimationHandler$1.doFrame(AnimationHandler.java:54)
at android.view.Choreographer$CallbackRecord.run(Choreographer.java:970)
at android.view.Choreographer.doCallbacks(Choreographer.java:796)
at android.view.Choreographer.doFrame(Choreographer.java:727)
```
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 at MapRouteLine.kt:1052, where updateTraveledRouteLine triggers the null dereference, and trace the callback from NavigationMapRoute.java:343 through the location callbacks. Establish a reproducible route-update scenario from the stack trace, then verify that indicator updates no longer crash when the distance index is unavailable.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- android, kotlin
- Domain
- mobile
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100