instructionIndex is null message
Hello!
We got message sometimes from navigation lib like this "instructionIndex is null"
Our business code is request a new route on custom events during navigation (not just once). And the requested new route has shared waypoints with the previous one. And We are using silent waypoints except first and last waypoints.
mapboxNavigation.requestRoutes(
RouteOptions.builder()
.applyDefaultNavigationOptions()
.applyLanguageAndVoiceUnitOptions(this)
.coordinatesList(coordinates)
.waypointIndicesList(
listOf(0, lastIndex)
)
.build(),
object : NavigationRouterCallback {
override fun onCanceled(routeOptions: RouteOptions, routerOrigin: RouterOrigin) {
// no impl
}
override fun onFailure(reasons: List<RouterFailure>, routeOptions: RouteOptions) {
// no impl
}
override fun onRoutesReady(
routes: List<NavigationRoute>,
routerOrigin: RouterOrigin
) {
mapboxNavigation.setNavigationRoutes(routes)
}
}
)
implemetation based of this example
Android API: 28 Mapbox Navigation SDK version: 2.19.0
Steps to trigger behavior
- Request a route to start navigation
- Little delay or travel to half of the path
- Request a new route and set it again.. and again until custom end.
Expected behavior
no instructionIndex is null message and no weird navigation
Actual behavior
instructionIndex is null message occured some times, and the navigation became weird, (weird == navigation seems lost, the progress observer produce false data related to remaining waypoint count) Our experience say mostly happen in intersections, but not at all
I have the same problem. I tried to debug it bottom-to-up, and finally, I found out that the status coming from NavigatorObserver had a null bannerInstruction that caused this problem. This bug comes from the native processor.
Mapbox Navigation SDK version: 2.20.2
@VysotskiVadim, @kiryldz, Could You please take a look at this problem?