Status Update
Comments
li...@google.com <li...@google.com> #2
Thanks for filing this, we will take a look
li...@google.com <li...@google.com> #3
This does seem to be during teardown, where Android Auto is tearing down it's process. Can you reproduce this issue reliably? Was it a one off? Or does this happen consistently?
Thanks for filing the bug once again
kr...@tomtom.com <kr...@tomtom.com> #4
This happens soon after android auto service is destroyed. Sometimes we see android.intent.action.ACTION_POWER_DISCONNECTED
event being received between service destruction and crash - I recon that user has detached phone from head unit when the app was running.
kr...@tomtom.com <kr...@tomtom.com> #5
Another related case is that we sometimes do get this onSurfaceDestroyed
but the service was already destroyed. This causes a bit of mayhem and requires to use additional guards against this case.
li...@google.com <li...@google.com> #6
I am looking into mitigating these shutdown race conditions in a future release.
li...@google.com <li...@google.com>
kr...@tomtom.com <kr...@tomtom.com> #7
Still happens with new androidx car app library
at androidx.car.app.utils.RemoteUtils$SurfaceCallbackStub.lambda$onSurfaceDestroyed$3(RemoteUtils:209)
at androidx.car.app.utils.RemoteUtils$SurfaceCallbackStub.lambda$onSurfaceDestroyed$3$RemoteUtils$SurfaceCallbackStub(RemoteUtils:3)
at i0.d.a.k0.c.a(Unknown:4)
at androidx.car.app.utils.RemoteUtils.lambda$dispatchHostCall$0(RemoteUtils:115)
at androidx.car.app.utils.-$$Lambda$RemoteUtils$hqdRHUgQFt6LDam0B8zarqtlYt0.run(-:1)
at android.os.Handler.handleCallback(Handler.java:873)
at android.os.Handler.dispatchMessage(Handler.java:99
li...@google.com <li...@google.com> #8
We have fixed the issue now and it will be available in a following release
ap...@google.com <ap...@google.com> #9
Branch: androidx-main
commit 076857f2f01e8e30f8186cad44ce22192438073a
Author: Rafael Lima <therafael@google.com>
Date: Thu Feb 25 23:28:48 2021
Improvements to shutdown scenarios
1. Do not send calls to app level callbacks if the app is not at least
in created state
2. Do not crash the app if the host is dead while trying to send an IPC
Follow up review will stop dispatching calls from template related
callbacks (i.e. onClick, etc)
Relnote: "Improvements to not dispatch calls to app if its lifecycle is
not at least in a created state"
Test: Unit tests
Bug:180530156
Bug:179800224
Bug:177921120
Bug:178516889
Change-Id: I8696503d1a9859411c4a52fa73d2852c8b3383d9
M car/app/app-testing/src/main/java/androidx/car/app/testing/TestAppManager.java
M car/app/app-testing/src/main/java/androidx/car/app/testing/TestCarContext.java
M car/app/app-testing/src/main/java/androidx/car/app/testing/navigation/TestNavigationManager.java
M car/app/app/src/main/java/androidx/car/app/AppManager.java
M car/app/app/src/main/java/androidx/car/app/CarAppService.java
M car/app/app/src/main/java/androidx/car/app/CarContext.java
M car/app/app/src/main/java/androidx/car/app/HostDispatcher.java
M car/app/app/src/main/java/androidx/car/app/ScreenManager.java
M car/app/app/src/main/java/androidx/car/app/model/OnCheckedChangeDelegateImpl.java
M car/app/app/src/main/java/androidx/car/app/model/OnClickDelegateImpl.java
M car/app/app/src/main/java/androidx/car/app/model/OnItemVisibilityChangedDelegateImpl.java
M car/app/app/src/main/java/androidx/car/app/model/OnSelectedDelegateImpl.java
M car/app/app/src/main/java/androidx/car/app/model/SearchCallbackDelegateImpl.java
M car/app/app/src/main/java/androidx/car/app/navigation/NavigationManager.java
M car/app/app/src/main/java/androidx/car/app/utils/LogTags.java
M car/app/app/src/main/java/androidx/car/app/utils/RemoteUtils.java
M car/app/app/src/test/java/androidx/car/app/AppManagerTest.java
M car/app/app/src/test/java/androidx/car/app/CarAppServiceTest.java
M car/app/app/src/test/java/androidx/car/app/CarContextTest.java
M car/app/app/src/test/java/androidx/car/app/HostDispatcherTest.java
M car/app/app/src/test/java/androidx/car/app/navigation/NavigationManagerTest.java
Description
Library version used: 1.0.0-beta.1
Devices/Android versions reproduced on: Galaxy S10e (SM-G9700) / Galaxy M51 (SM-M515F) / Galaxy S9+ (SM-G965F)
Android Auto version reproduced on: 6.0.615334-release
Sample project to trigger the issue.
The issue reported by end users and we see in crashlytics breadcrumbs that it occurs on AndroidAuto Service shutdown.
The issue could be related tohttps://issuetracker.google.com/u/1/issues/178107274 where
CarSurfaceListener
could not be set to null during the shutdown.A bug report.