Status Update
Comments
kr...@tomtom.com <kr...@tomtom.com> #2
It seems that there was an executor added that cause call rebound when service is being unbound.
When service is being unbound at
runOnMain(() -> {
// Destroy the session
if (mCurrentSession != null) {
CarContext carContext = mCurrentSession.getCarContext();
// Stop any active navigation
carContext.getCarService(NavigationManager.class).onStopNavigation();
// Destroy all screens in the stack
carContext.getCarService(ScreenManager.class).destroyAndClearScreenStack();
// Remove binders to the host
carContext.resetHosts();
((LifecycleRegistry) mCurrentSession.getLifecycle()).handleLifecycleEvent(
Event.ON_DESTROY);
}
mCurrentSession = null;
});
Due to running via an additional executor in
li...@tomtom.com <li...@tomtom.com> #3
We are seeing similar crash. See logs
Objects.java:220 java.util.Objects.requireNonNull
NavigationManager.java:285 androidx.car.app.navigation.NavigationManager.lambda$onStopNavigation$3$NavigationManager
Unknown:2 androidx.car.app.navigation.-$$Lambda$NavigationManager$zqLKz70Zaz8Uc9Ya7K69PxjfMYg.run
Handler.java:938 android.os.Handler.handleCallback
Handler.java:99 android.os.Handler.dispatchMessage
Looper.java:223 android.os.Looper.loop
ActivityThread.java:7660 android.app.ActivityThread.main
Method.java:-2 java.lang.reflect.Method.invoke
RuntimeInit.java:592 com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run
ZygoteInit.java:947 com.android.internal.os.ZygoteInit.main
li...@google.com <li...@google.com>
li...@google.com <li...@google.com> #4
Thanks for filing this bug, we are looking into fixing it in the next release
li...@google.com <li...@google.com>
li...@google.com <li...@google.com> #5
This is now fixed and should be available in a following release of the AndroidX library
ap...@google.com <ap...@google.com> #6
Branch: androidx-main
commit 507107531e87d9543f74b998b23ee6bdd9fdbd4c
Author: Rafael Lima <therafael@google.com>
Date: Tue Mar 09 18:46:21 2021
Fixed a `NullPointerException` that was thrown when the app receives a `stopNavigation` call when it has already removed a callback
Relnote: Fixed a `NullPointerException` that was thrown when the app receives a `stopNavigation` call when it has already removed a callback
Bug: 181143772
Test: Unit Test
Change-Id: Ib8b89f43bd5891ef9f8b53944b5ef00979d8e607
M car/app/app/src/main/java/androidx/car/app/navigation/NavigationManager.java
M car/app/app/src/test/java/androidx/car/app/navigation/NavigationManagerTest.java
li...@google.com <li...@google.com>
li...@google.com <li...@google.com> #8
Thanks for pointing this out, working on a fix now
ap...@google.com <ap...@google.com> #9
Branch: androidx-main
commit 19a4e804b650056de0ecb54a2470e98fcb076727
Author: Rafael Lima <therafael@google.com>
Date: Wed Mar 17 21:46:05 2021
Do not callback `NavigationManagerCallback#onStopNavigation` if the callback is cleared before the executor executes
Relnote: Do not callback `NavigationManagerCallback#onStopNavigation` if the callback is cleared before the executor executes
Bug: 181143772
Test: Unit tests
Change-Id: I7fc5ebe1f371b0530f084f76236ab058f71f2a5c
M car/app/app/src/main/java/androidx/car/app/navigation/NavigationManager.java
M car/app/app/src/test/java/androidx/car/app/navigation/NavigationManagerTest.java
li...@google.com <li...@google.com>
kr...@tomtom.com <kr...@tomtom.com> #10
Thanks a lot for fixing it! Is there any ETA for new library release?
Description
Library version used: 1.0.0-beta01
Devices/Android versions reproduced on: Any
Android Auto version reproduced on: 6.1.6105
Crash when disconnecting from headunit when navigation is started. Simply start the app, start navigating, disconnect/close dhu. After Android Auto service gets destroyed - this is where we clear
NavigationManager
callback, this crash occurs.It seems that
NavigationManager
tries to callonStopNavigation
in the callback even though the service is no longer created.