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

MapboxNavigation#getCameraEngine NullPointerException #1191

Closed
Guardiola31337 opened this issue Aug 6, 2018 · 0 comments
Closed

MapboxNavigation#getCameraEngine NullPointerException #1191

Guardiola31337 opened this issue Aug 6, 2018 · 0 comments
Labels
bug Defect to be fixed.
Milestone

Comments

@Guardiola31337
Copy link
Contributor

Found 🐛 in DualNavigationMapActivity during CI:

FATAL EXCEPTION: ControllerMessenger
Process: com.mapbox.services.android.navigation.testapp, PID: 25332
java.lang.RuntimeException: Unable to destroy activity {com.mapbox.services.android.navigation.testapp/com.mapbox.services.android.navigation.testapp.activity.navigationui.EndNavigationActivity}: java.lang.NullPointerException: Attempt to invoke virtual method 'com.mapbox.services.android.navigation.v5.navigation.camera.Camera com.mapbox.services.android.navigation.v5.navigation.MapboxNavigation.getCameraEngine()' on a null object reference
	at android.app.ActivityThread.performDestroyActivity(ActivityThread.java:3706)
	at android.app.ActivityThread.handleDestroyActivity(ActivityThread.java:3724)
	at android.app.ActivityThread.handleRelaunchActivity(ActivityThread.java:3924)
	at android.app.ActivityThread.access$900(ActivityThread.java:151)
	at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1309)
	at android.os.Handler.dispatchMessage(Handler.java:102)
	at androidx.test.espresso.base.Interrogator.a(Interrogator.java:19)
	at androidx.test.espresso.base.UiControllerImpl.a(UiControllerImpl.java:142)
	at androidx.test.espresso.base.UiControllerImpl.a(UiControllerImpl.java:134)
	at androidx.test.espresso.base.UiControllerImpl.a(UiControllerImpl.java:34)
	at androidx.test.espresso.action.MotionEvents.a(MotionEvents.java:74)
	at androidx.test.espresso.action.MotionEvents.a(MotionEvents.java:52)
	at androidx.test.espresso.action.Tap.c(Tap.java:9)
	at androidx.test.espresso.action.Tap.a(Tap.java:19)
	at androidx.test.espresso.action.Tap$1.b(Tap.java:2)
	at androidx.test.espresso.action.GeneralClickAction.perform(GeneralClickAction.java:22)
	at androidx.test.espresso.ViewInteraction$SingleExecutionViewAction.perform(ViewInteraction.java:9)
	at androidx.test.espresso.ViewInteraction.a(ViewInteraction.java:78)
	at androidx.test.espresso.ViewInteraction.a(ViewInteraction.java:94)
	at androidx.test.espresso.ViewInteraction$1.call(ViewInteraction.java:3)
	at java.util.concurrent.FutureTask.run(FutureTask.java:237)
	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)
Caused by: java.lang.NullPointerException: Attempt to invoke virtual method 'com.mapbox.services.android.navigation.v5.navigation.camera.Camera com.mapbox.services.android.navigation.v5.navigation.MapboxNavigation.getCameraEngine()' on a null object reference
	at com.mapbox.services.android.navigation.ui.v5.NavigationViewModel.onDestroy(NavigationViewModel.java:102)
	at com.mapbox.services.android.navigation.ui.v5.NavigationView.shutdown(NavigationView.java:571)
	at com.mapbox.services.android.navigation.ui.v5.NavigationView.onDestroy(NavigationView.java:165)
	at com.mapbox.services.android.navigation.testapp.activity.navigationui.EndNavigationActivity.onDestroy(EndNavigationActivity.java:250)
	at android.app.Activity.performDestroy(Activity.java:6169)
	at android.app.Instrumentation.callActivityOnDestroy(Instrumentation.java:1141)
	at androidx.test.runner.MonitoringInstrumentation.callActivityOnDestroy(MonitoringInstrumentation.java:208)
	at android.app.ActivityThread.performDestroyActivity(ActivityThread.java:3693)
	... 28 more

Pretty easy to reproduce opening and closing DualNavigationMapActivity from the test app.

I think a regression from #1167

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