Status Update
Comments
wu...@google.com <wu...@google.com> #2
Thanks for reporting. We will look into the issue and update the status here.
sc...@google.com <sc...@google.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 ?
jo...@gmail.com <jo...@gmail.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%.
sc...@google.com <sc...@google.com> #5
Thanks for the information! We will look into this.
sc...@google.com <sc...@google.com>
jo...@gmail.com <jo...@gmail.com> #6
Any updates on this?
sc...@google.com <sc...@google.com> #7
ap...@google.com <ap...@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
sc...@google.com <sc...@google.com>
na...@google.com <na...@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
Description
CAMERAX VERSION 1.4.0-alpha01
ANDROID OS BUILD NUMBER: Android 12 and Android 13 DEVICE NAME: Samsung A52
DESCRIPTION:
On some Samsung A52 devices the image capture request does not succeed. It seems that it cant proccess the image because of missing metadata. This behaviour is only observed when using jpeg as output format. YUV format is working fine.
STEPS TO REPRODUCE:
OBSERVED RESULTS:
EXPECTED RESULTS: onCaptureSuccess Callback is called
REPRODUCIBILITY: 1 of 5