mapbox / mapbox/mapbox-navigation-android

Crash MapboxNavigationTelemetry.java line 540

Open
#3,971 2 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

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

Description

**Android API:** Any
**Mapbox Navigation SDK version:** v.1.3.0

### Steps to trigger behavior

Happens randomly after setting a new route using a custom router.

### Actual behavior

App crashes
```
NullPointerException:
com.mapbox.navigation.core.telemetry.MapboxNavigationTelemetry.populate (MapboxNavigationTelemetry.java:540)
com.mapbox.navigation.core.telemetry.MapboxNavigationTelemetry.handleReroute (MapboxNavigationTelemetry.java:488)
com.mapbox.navigation.core.telemetry.MapboxNavigationTelemetry.onRoutesChanged (MapboxNavigationTelemetry.java:311)
com.mapbox.navigation.core.directions.session.MapboxDirectionsSession.setRoutes (MapboxDirectionsSession.java:39)
com.mapbox.navigation.core.directions.session.MapboxDirectionsSession$requestRoutes$1.onResponse (MapboxDirectionsSession.java:84)
````

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 at MapboxNavigationTelemetry.java:540 and trace how handleReroute and onRoutesChanged process routes after MapboxDirectionsSession.setRoutes. Reproduce the random crash by setting a new route through a custom router, then verify that the same flow no longer raises the reported NullPointerException.

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
Mostly clear
Newbie friendliness
38/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.