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

DualNavigationMapActivity NullPointerException when adding route #1130

Closed
danesfeder opened this issue Jul 20, 2018 · 0 comments
Closed

DualNavigationMapActivity NullPointerException when adding route #1130

danesfeder opened this issue Jul 20, 2018 · 0 comments
Labels
bug Defect to be fixed.

Comments

@danesfeder
Copy link
Contributor

Found 🐛 in DualNavigationMapActivity during CI:

FATAL EXCEPTION: main
Process: com.mapbox.services.android.navigation.testapp, PID: 11145
java.lang.NullPointerException: Attempt to invoke virtual method 'void com.mapbox.services.android.navigation.ui.v5.route.NavigationMapRoute.addRoutes(java.util.List)' on a null object reference
	at com.mapbox.services.android.navigation.testapp.activity.navigationui.DualNavigationMapActivity.onResponse(DualNavigationMapActivity.java:121)
	at com.mapbox.api.directions.v5.MapboxDirections$1.onResponse(MapboxDirections.java:169)
	at retrofit2.ExecutorCallAdapterFactory$ExecutorCallbackCall$1$1.run(ExecutorCallAdapterFactory.java:70)
	at android.os.Handler.handleCallback(Handler.java:739)
	at android.os.Handler.dispatchMessage(Handler.java:95)
	at android.os.Looper.loop(Looper.java:135)
	at android.app.ActivityThread.main(ActivityThread.java:5254)
	at java.lang.reflect.Method.invoke(Native Method)
	at java.lang.reflect.Method.invoke(Method.java:372)
	at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:903)
	at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:698)

It looks like the route response is being returned before the map is ready and we are trying to add the routes via NavigationRoute#addRoutes.

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

No branches or pull requests

1 participant