-
Notifications
You must be signed in to change notification settings - Fork 319
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Crash when enableOffRouteDetection is set to false #780
Comments
Hey @skienzl, this looks like a regression in our code. We will investigate today and get a fix in ASAP. Thank you for your patience. |
Thx @danesfeder for the quick check. Do you have an estimate when this PR gets merged and released? |
@danesfeder really sorry to get on your nerves. but this is an important bug fix for our usecase and as far as i can see the PR is already ready to go and would it be possible to merge it to the snapshot release. thanks in advance and again sorry :/ |
@skienzl no problem, the PR was just merged - going to be a few minutes before a snapshot loads up with the changes. Official |
@danesfeder thank you very much! |
Bug report: If you set enableOffRouteDetection to false in MapboxNavigationOptions the crashes if you start navigation.
Seems like because of this setting no OffRouteDetector is set during the MapboxNavigation init:
MapboxNavigation.java
Because no engine is set. The following lines throw a NullPointerException:
NavigationHelper.java
Logs:
E/AndroidRuntime: FATAL EXCEPTION: NavThread Process: com.app.debug, PID: 572 java.lang.NullPointerException: Attempt to invoke virtual method 'boolean com.mapbox.services.android.navigation.v5.offroute.OffRoute.isUserOffRoute(android.location.Location, com.mapbox.services.android.navigation.v5.routeprogress.RouteProgress, com.mapbox.services.android.navigation.v5.navigation.MapboxNavigationOptions)' on a null object reference at com.mapbox.services.android.navigation.v5.navigation.NavigationHelper.isUserOffRoute(NavigationHelper.java:205) at com.mapbox.services.android.navigation.v5.navigation.NavigationEngine.handleRequest(NavigationEngine.java:99) at com.mapbox.services.android.navigation.v5.navigation.NavigationEngine.handleMessage(NavigationEngine.java:62) at android.os.Handler.dispatchMessage(Handler.java:102) at android.os.Looper.loop(Looper.java:164) at android.os.HandlerThread.run(HandlerThread.java:65)
The text was updated successfully, but these errors were encountered: