Fixed
Status Update
Comments
an...@google.com <an...@google.com> #2
Hi camerax-bugs@google.com, Can you please update this P3 bug?
er...@google.com <er...@google.com> #3
Right now there isn't an update. It's a p3 bug marked on our known issues and backlog.
hu...@gmail.com <hu...@gmail.com> #4
In case it helps, my issue of
an...@google.com <an...@google.com> #5
Hi camerax-bugs@google.com, This is a high priority bug. Can you please take a look and respond by tomorrow (or let us know if this should be assigned to someone else)? Thank you.
ni...@google.com <ni...@google.com>
ni...@google.com <ni...@google.com>
ap...@google.com <ap...@google.com> #6
Project: platform/frameworks/support
Branch: androidx-master-dev
commit e8c0fe0ed7331933c1277535245d9de33c2303c1
Author: Franklin Wu <nilknarfuw@google.com>
Date: Tue May 12 15:29:25 2020
Fixed issue where ImageProxyReader in ImageAnalysis is closed prematurely
Added the SafeCloseImageReaderProxy which provides a method to wait
until all acquired ImageProxy are closed before finally closing the
underlying ImageReaderProxy.
Switched ImageAnalysis to use SafeCloseImageReaderProxy and also cleaned
up ImageAnalysis to using lambdas.
Relnote: "Fixes crash in ImageAnalysis where the ImageProxy is accessed
after the ImageReaderProxy has been closed. This also makes it so that
all ImageProxy received by the Analyzer must be closed before the
ImageReaderProxy will be closed."
Bug: b/145956416 , b/154155377 , b/156357269
Test: androidx.camera.camera2.ImageAnalysisTest
androidx.camera.core.ImageAnalysisTest
Change-Id: I4b29996bcaf7549df6ababf080ea367326ba0dd3
A camera/camera-core/src/androidTest/java/androidx/camera/core/SafeCloseImageReaderProxyTest.java
M camera/camera-core/src/main/java/androidx/camera/core/ImageAnalysis.java
A camera/camera-core/src/main/java/androidx/camera/core/SafeCloseImageReaderProxy.java
M camera/camera-testing/src/main/java/androidx/camera/testing/fakes/FakeImageReaderProxy.java
https://android-review.googlesource.com/1309661
Branch: androidx-master-dev
commit e8c0fe0ed7331933c1277535245d9de33c2303c1
Author: Franklin Wu <nilknarfuw@google.com>
Date: Tue May 12 15:29:25 2020
Fixed issue where ImageProxyReader in ImageAnalysis is closed prematurely
Added the SafeCloseImageReaderProxy which provides a method to wait
until all acquired ImageProxy are closed before finally closing the
underlying ImageReaderProxy.
Switched ImageAnalysis to use SafeCloseImageReaderProxy and also cleaned
up ImageAnalysis to using lambdas.
Relnote: "Fixes crash in ImageAnalysis where the ImageProxy is accessed
after the ImageReaderProxy has been closed. This also makes it so that
all ImageProxy received by the Analyzer must be closed before the
ImageReaderProxy will be closed."
Bug:
Test: androidx.camera.camera2.ImageAnalysisTest
androidx.camera.core.ImageAnalysisTest
Change-Id: I4b29996bcaf7549df6ababf080ea367326ba0dd3
A camera/camera-core/src/androidTest/java/androidx/camera/core/SafeCloseImageReaderProxyTest.java
M camera/camera-core/src/main/java/androidx/camera/core/ImageAnalysis.java
A camera/camera-core/src/main/java/androidx/camera/core/SafeCloseImageReaderProxy.java
M camera/camera-testing/src/main/java/androidx/camera/testing/fakes/FakeImageReaderProxy.java
hu...@gmail.com <hu...@gmail.com> #7
Confirming this as fixed having been applied to my builds and tested. Thanks for attending to it!
ap...@google.com <ap...@google.com> #8
Project: platform/frameworks/support
Branch: androidx-master-dev
commit d30c289675deea190f654bfba3aa91e5e1ffdeb6
Author: Franklin Wu <nilknarfuw@google.com>
Date: Tue Jun 23 18:14:00 2020
Make the ImageProxy acquired from ImageCapture safe
Safely close the ImageReaderProxy in ImageCapture, by waiting for the
ImageProxy which has been sent out via OnImageCapturedCallback to be
closed before closing the ImageReaderProxy.
Bug: b/145956416
Test: camera-* unit/robolectric tests
Change-Id: I2b2d31fceecc9c270fdee11dfead77da5bb281e9
M camera/camera-core/src/main/java/androidx/camera/core/ImageCapture.java
M camera/camera-core/src/test/java/androidx/camera/core/ImageCaptureTest.kt
M camera/camera-testing/src/main/java/androidx/camera/testing/fakes/FakeImageProxy.java
M camera/camera-testing/src/main/java/androidx/camera/testing/fakes/FakeImageReaderProxy.java
https://android-review.googlesource.com/1346752
Branch: androidx-master-dev
commit d30c289675deea190f654bfba3aa91e5e1ffdeb6
Author: Franklin Wu <nilknarfuw@google.com>
Date: Tue Jun 23 18:14:00 2020
Make the ImageProxy acquired from ImageCapture safe
Safely close the ImageReaderProxy in ImageCapture, by waiting for the
ImageProxy which has been sent out via OnImageCapturedCallback to be
closed before closing the ImageReaderProxy.
Bug:
Test: camera-* unit/robolectric tests
Change-Id: I2b2d31fceecc9c270fdee11dfead77da5bb281e9
M camera/camera-core/src/main/java/androidx/camera/core/ImageCapture.java
M camera/camera-core/src/test/java/androidx/camera/core/ImageCaptureTest.kt
M camera/camera-testing/src/main/java/androidx/camera/testing/fakes/FakeImageProxy.java
M camera/camera-testing/src/main/java/androidx/camera/testing/fakes/FakeImageReaderProxy.java
ni...@google.com <ni...@google.com> #9
Preview which uses ProcessingSurface is safe since the ImageProxy is always closed after processing is done and the ImageProxy usage is synchronized with closing of ImageReaderProxy. So all UseCases are addressed.
Description
However, if there are outstanding Images which have not yet been closed (for example given out by ImageCapture or ImageAnalysis) then they will become invalid. This will cause problems for users of the public API.
This also affects OEM extensions because they access the Image via the CaptureProcessor.
In ImageCapture, ImageAnalysis, and Preview the ImageReaderProxy can only be closed after the ImageProxy have been return to CameraX ownership before we can safely close the ImageReaderProxy.