Status Update
Comments
ra...@google.com <ra...@google.com>
ma...@google.com <ma...@google.com> #2
Thanks for reporting. We will look into the issue and update the status here.
sc...@gmail.com <sc...@gmail.com> #3
Hi Thanks for reporting the issue. To have more context, can you help provide the following information ?
-
Can you show us how you configure the ImageCapture in the codes ?
-
Did you enable CameraX Extensions ?
-
so the occurrence rate is like 20%, right ?
ma...@google.com <ma...@google.com> #4
Thanks for your response.
Sure. I can provide more data.
1.
ImageCapture.Builder builder = new ImageCapture.Builder();
builder.setCaptureMode(ImageCapture.CAPTURE_MODE_MINIMIZE_LATENCY);
if (!extensionAvailable) {
builder.setBufferFormat(ImageFormat.YUV_420_888);
}
imageCapture = builder.build();
UseCaseGroup useCaseGroup = new UseCaseGroup.Builder()
.addUseCase(preview)
.addUseCase(imageCapture)
.setViewPort(viewPort)
.build();
cameraProvider.unbindAll();
camera = cameraProvider.bindToLifecycle(this, cameraSelector, useCaseGroup);
-
Yes, Extensions are enabled, which means that the code is not configuring the buffer format and therefore will use the JPEG format. If I disable the extensions, than the error disapears. But I think its more a jpeg format issue then an extension problem.
-
Yes, occurrence rate is 20%.
af...@gmail.com <af...@gmail.com> #5
Thanks for the information! We will look into this.
la...@team.bumble.com <la...@team.bumble.com> #6
ma...@google.com <ma...@google.com> #7
ma...@google.com <ma...@google.com> #8
Branch: androidx-main
commit 366c0b3e157615a4eb7f4597166bf30e0f1c9bdd
Author: Scott Nien <scottnien@google.com>
Date: Thu Dec 14 17:52:42 2023
Fixed the issue when takePicture with Extensions is interruped by lifecycle stop and it can't takePicture anymore after lifecyce start.
1. Handling the image of aborted request in CaptureNode
- When request is aborted, clear the pending request in NoMetadataImageReader
to avoid crash when next request is available.
- When incoming image has null stageId, close the image instead
of crash since this is the case when aborted request
still produce image.
2. Run the CaptureProcessorImpl.process() in non-camera thread instead.
to avoid it from blocking the camera thread which will freeze the preview.
Bug: 306202751
Test: CaptureNodeTest, extensions/ImageCaptureTest
Relnote: "Fixed the crash that happens when lifecycle is stopped before
takePicture request is completed"
Change-Id: Idf017ef3ec1400955066433dd8446f94728b8a1a
M camera/camera-core/src/main/java/androidx/camera/core/imagecapture/CaptureNode.java
M camera/camera-core/src/main/java/androidx/camera/core/imagecapture/NoMetadataImageReader.java
M camera/camera-core/src/test/java/androidx/camera/core/imagecapture/CaptureNodeTest.kt
M camera/camera-extensions/src/androidTest/java/androidx/camera/extensions/ImageCaptureTest.kt
M camera/camera-extensions/src/main/java/androidx/camera/extensions/internal/AdvancedVendorExtender.java
M camera/camera-extensions/src/main/java/androidx/camera/extensions/internal/BasicVendorExtender.java
M camera/camera-extensions/src/main/java/androidx/camera/extensions/internal/sessionprocessor/BasicExtenderSessionProcessor.java
M camera/camera-extensions/src/main/java/androidx/camera/extensions/internal/sessionprocessor/StillCaptureProcessor.java
M camera/camera-testing/src/main/java/androidx/camera/testing/impl/fakes/FakeImageReaderProxy.java
M camera/camera-testlib-extensions/src/main/java/androidx/camera/extensions/impl/NightImageCaptureExtenderImpl.java
M camera/camera-testlib-extensions/src/main/java/androidx/camera/extensions/impl/advanced/LongCaptureAdvancedExtenderImpl.java
ap...@google.com <ap...@google.com> #9
The following release(s) address this bug.It is possible this bug has only been partially addressed:
androidx.camera:camera-core:1.4.0-alpha04
androidx.camera:camera-extensions:1.4.0-alpha04
na...@google.com <na...@google.com> #10
The following release(s) address this bug.It is possible this bug has only been partially addressed:
androidx.benchmark:benchmark-macro:1.2.0-alpha14
Description
Hi!
For the following setup:
Component used:
androidx.benchmark:benchmark-macro-junit4
Version used:
1.2.0-alpha09
Devices/Android versions reproduced on: Zenfone 9 (Android 13) / Pixel 3A (Android 12)
IDE: Android Studio Giraffe + AGP 7.4.1
Gradle 7.6
I keep getting the following exception randomly during test execution:
Happens on both of my devices. It was also present in
1.2.0-alpha07
which I tested some time ago.It seems that this occurs at a random time - sometime just at the beginning of a test or in the middle of it. Happens for both builds with and without baseline profile.
Going back to version 1.1.1 resolves the issue.