-
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 after close (terminatem, exit) navigation from notification bar #842
Comments
Hey @siavashabdoli, thanks for bringing this to us. Are you using the |
Hi @danesfeder actually that's all from fabric I'll try to reproduce it from a debuggable device or add a correct versioning and add mapping file to fabric to check if I can get a better stacktrace. |
@danesfeder ok I reproduce that with the Mapbox NavigationActivity in simulate mode :)
at some specific time this would be happened if you quit navigation from notification bar. |
@siavashabdoli Can you share your code for |
@danesfeder sorry for delay. there is no difference between all method that exist in the link and my NavigationActivity.I checked it again.did you get the scenario? as fabric reported and as I see the application is in the foreground and maybe onPuase is not invoked and it's correct. the application is in foreground I swipe down the notifications ( it does not lead to invoke onPause) and terminate the navigation from that notification. where is the mechanism to unsubscribe that handler? I can't find anything. why you think maybe it's related to lifecycle? |
@siavashabdoli I haven't been able to reproduce this on my side with the SDK |
I'm getting a few of these reports as well and I have a fully custom implementation. It maybe some sort of race condition that we are missing |
**Android API:6
**Mapbox Navigation SDK version:13.0.0-snapshot
Steps to trigger behavior
Actual behavior
I have fabric but because I tested lots of different version with same versioning number the last part of stacktrace is not correct:
Fatal Exception: java.lang.NullPointerException: Attempt to invoke virtual method 'com.mapbox.geojson.Point com.mapbox.services.android.navigation.v5.navigation.x.x.x(com.mapbox.services.android.navigation.v5.navigation.a.c)' on a null object reference at com.mapbox.services.android.navigation.ui.v5.camera.NavigationCamera.initialize(Unknown Source) at com.mapbox.services.android.navigation.ui.v5.camera.NavigationCamera.initialize(Unknown Source) at com.mapbox.services.android.navigation.ui.v5.camera.NavigationCamera$1.onProgressChange(Unknown Source) at com.mapbox.services.android.navigation.v5.navigation.NavigationEventDispatcher.addMilestoneEventListener(Unknown Source) at com.mapbox.services.android.navigation.v5.navigation.NavigationService.onNewRouteProgress(Unknown Source) at com.mapbox.services.android.navigation.v5.navigation.NavigationEngine$1.run(Unknown Source) at android.os.Handler.handleCallback(Handler.java:739) at android.os.Handler.dispatchMessage(Handler.java:95) at android.os.Looper.loop(Looper.java:148) at android.app.ActivityThread.main(ActivityThread.java:5417) at java.lang.reflect.Method.invoke(Method.java) at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:726) at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:616)
so because of that wrong stack trace on initialize I try to find the real stack trace and seems the problem is with navigationCamera-animateCameraFromLocation method:
Point targetPoint = cameraEngine.target(routeInformation);
that make sense because of input and output part of method. btw seems the camera is null because of termination from notification bar but there is a running thread in background that should be canceled or put some check before every call to changing camera
The text was updated successfully, but these errors were encountered: