Skip to content
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

Closed
skienzl opened this issue Mar 19, 2018 · 5 comments
Closed

Crash when enableOffRouteDetection is set to false #780

skienzl opened this issue Mar 19, 2018 · 5 comments

Comments

@skienzl
Copy link

skienzl commented Mar 19, 2018

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)

@danesfeder
Copy link
Contributor

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.

@skienzl
Copy link
Author

skienzl commented Mar 21, 2018

Thx @danesfeder for the quick check. Do you have an estimate when this PR gets merged and released?

@skienzl
Copy link
Author

skienzl commented Mar 22, 2018

@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 :/

@danesfeder
Copy link
Contributor

@skienzl no problem, the PR was just merged - going to be a few minutes before a snapshot loads up with the changes. Official 0.12.0 release with these changes should be landing in the coming week or so. Can't give you an official date at this time unfortunately.

@skienzl
Copy link
Author

skienzl commented Mar 22, 2018

@danesfeder thank you very much!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants