Fixed
Status Update
Comments
wu...@google.com <wu...@google.com> #2
Project: platform/frameworks/support
Branch: androidx-main
commit 25369f983e26d758a8a027c84b21f20026637181
Author: Chris Craik <ccraik@google.com>
Date: Mon Jul 12 14:05:36 2021
Update JankCollectionHelper to support S gfxinfo
Fixes: 193260119
Relnote: Fixes FrameTimingMetric to work on Android S beta
Test: ./gradlew bench:integration-tests:macrobenchmark:connectedAndroidTest -P android.testInstrumentationRunnerArguments.class=androidx.benchmark.integration.macrobenchmark.TrivialListScrollBenchmark # On R + S
Still manually cherry-picking changes, as the platform copy of the
file triggers many lint warnings in AndroidX build.
Change-Id: Ib60ccf09fb2fa09f128374140c3657015626dd2c
M benchmark/macro/src/main/java/androidx/benchmark/macro/JankCollectionHelper.java
M benchmark/macro/src/main/java/androidx/benchmark/macro/Metric.kt
https://android-review.googlesource.com/1763870
Branch: androidx-main
commit 25369f983e26d758a8a027c84b21f20026637181
Author: Chris Craik <ccraik@google.com>
Date: Mon Jul 12 14:05:36 2021
Update JankCollectionHelper to support S gfxinfo
Fixes: 193260119
Relnote: Fixes FrameTimingMetric to work on Android S beta
Test: ./gradlew bench:integration-tests:macrobenchmark:connectedAndroidTest -P android.testInstrumentationRunnerArguments.class=androidx.benchmark.integration.macrobenchmark.TrivialListScrollBenchmark # On R + S
Still manually cherry-picking changes, as the platform copy of the
file triggers many lint warnings in AndroidX build.
Change-Id: Ib60ccf09fb2fa09f128374140c3657015626dd2c
M benchmark/macro/src/main/java/androidx/benchmark/macro/JankCollectionHelper.java
M benchmark/macro/src/main/java/androidx/benchmark/macro/Metric.kt
le...@google.com <le...@google.com>
le...@google.com <le...@google.com>
ap...@google.com <ap...@google.com> #3
Project: platform/frameworks/support
Branch: androidx-main
commit e69cb3cd8f98e47393cc1c51cd9d432f33589f10
Author: leo huang <leohuang@google.com>
Date: Fri Mar 17 09:39:37 2023
Fix a crash in DefaultSurfaceProcessor caused by race condition.
Root Cause:
There is a flow that will cause the GlExecutor to be shutdown but still post a Runnable.
(1) In GL thread, the SurfaceRequest is complete and run `checkReadyToRelease()`, which will first check the `mIsReleased` flag.
(2) In main thread, `release()` is called and change `mIsReleased` to true.
(3) Following (1) in `checkReadyToRelease()`, `mIsReleased` is true and release routine is executed including shutting down the GL thread.
(4) Following (2) in `release()`, post a runnable to `GlExecutor` and get `RejectedExecutionException`.
Solution:
* On GL thread, do not rely on a flag that can be changed on another thread. Create two release flags, `mIsReleaseRequested` and `mIsReleased`.
`mIsReleaseRequested` is an AtomicBoolean to know if release() is requested on a certain thread.
`mIsReleased` is a boolean and can only be accessed on GL thread. It indicates the release() request has been sent to GL thread.
So in step (3), the release routine will not be executed but after step (4).
* Also suppress the `RejectedExecutionException` with a log message to avoid crashing the application.
Relnote: "Fixed a RejectedExecutionException crash in DefaultSurfaceProcessor. The crash could happen when VideoCapture is bound and the activity is paused."
Bug: 273713906
Test: ./gradlew camera:camera-video:connectedAndroidTest; Manually simulate the issue flow and verify by fix.
Change-Id: Idb46a3791eafb3ca009a04333064d3501de1b2f5
M camera/camera-core/src/main/java/androidx/camera/core/processing/DefaultSurfaceProcessor.java
https://android-review.googlesource.com/2495678
Branch: androidx-main
commit e69cb3cd8f98e47393cc1c51cd9d432f33589f10
Author: leo huang <leohuang@google.com>
Date: Fri Mar 17 09:39:37 2023
Fix a crash in DefaultSurfaceProcessor caused by race condition.
Root Cause:
There is a flow that will cause the GlExecutor to be shutdown but still post a Runnable.
(1) In GL thread, the SurfaceRequest is complete and run `checkReadyToRelease()`, which will first check the `mIsReleased` flag.
(2) In main thread, `release()` is called and change `mIsReleased` to true.
(3) Following (1) in `checkReadyToRelease()`, `mIsReleased` is true and release routine is executed including shutting down the GL thread.
(4) Following (2) in `release()`, post a runnable to `GlExecutor` and get `RejectedExecutionException`.
Solution:
* On GL thread, do not rely on a flag that can be changed on another thread. Create two release flags, `mIsReleaseRequested` and `mIsReleased`.
`mIsReleaseRequested` is an AtomicBoolean to know if release() is requested on a certain thread.
`mIsReleased` is a boolean and can only be accessed on GL thread. It indicates the release() request has been sent to GL thread.
So in step (3), the release routine will not be executed but after step (4).
* Also suppress the `RejectedExecutionException` with a log message to avoid crashing the application.
Relnote: "Fixed a RejectedExecutionException crash in DefaultSurfaceProcessor. The crash could happen when VideoCapture is bound and the activity is paused."
Bug: 273713906
Test: ./gradlew camera:camera-video:connectedAndroidTest; Manually simulate the issue flow and verify by fix.
Change-Id: Idb46a3791eafb3ca009a04333064d3501de1b2f5
M camera/camera-core/src/main/java/androidx/camera/core/processing/DefaultSurfaceProcessor.java
pr...@google.com <pr...@google.com> #5
The following release(s) address this bug.It is possible this bug has only been partially addressed:
androidx.camera:camera-core:1.3.0-alpha06
Description
CAMERAX VERSION: 1.3.0-alpha03
CAMERA APPLICATION NAME AND VERSION: LinkedIn 4.1.793
ANDROID OS BUILD NUMBER: 8, 10, 11, 12, 13
DEVICE NAME: Several Samsung (A51, A11, A32..) and Xiaomi (Redmi 9) devices
DESCRIPTION:
Our crash monitoring reports a few instances of the following crash:
LIST ANY EXPERIMENTAL FEATURES: androidx.camera.view.video.ExperimentalVideo
ADDITIONAL INFORMATION: 8 external instances reported over the past week, no internal reports, not reproducible during our normal testing
CODE FRAGMENTS (this will help us troubleshoot your issues):