Fixed
Status Update
Comments
ar...@gmail.com <ar...@gmail.com>
sc...@google.com <sc...@google.com>
ap...@google.com <ap...@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 ?
ar...@gmail.com <ar...@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%.
Description
I am using the CameraView which is causing issue specifically when focus is performed.
I have attached the steps to reproduce the error, please review and provide some solution could not fix that from my side even the camera class in final.
2020-05-20 11:10:31.033 14365-14626/
Process:
java.lang.NullPointerException: Attempt to invoke virtual method 'int java.lang.Integer.intValue()' on a null object reference
at androidx.camera.camera2.internal.FocusMeteringControl.lambda$executeMeteringAction$3$FocusMeteringControl(FocusMeteringControl.java:530)
at androidx.camera.camera2.internal.-$$Lambda$FocusMeteringControl$myFOvxwuOccCZDq-wHBp6yswlIg.onCaptureResult(Unknown Source:11)
at androidx.camera.camera2.internal.Camera2CameraControl$CameraControlSessionCallback.lambda$onCaptureCompleted$0$Camera2CameraControl$CameraControlSessionCallback(Camera2CameraControl.java:516)
at androidx.camera.camera2.internal.-$$Lambda$Camera2CameraControl$CameraControlSessionCallback$D22-IA_eQmzTWvkNwlgaZNWM8E8.run(Unknown Source:4)
at android.os.Handler.handleCallback(Handler.java:873)
at android.os.Handler.dispatchMessage(Handler.java:99)
at android.os.Looper.loop(Looper.java:201)
at android.os.HandlerThread.run(HandlerThread.java:65)
CAMERAX VERSION:
def camerax_version = "1.0.0-beta03"
implementation "androidx.camera:camera-core:${camerax_version}"
// CameraX Camera2 extensions
implementation "androidx.camera:camera-camera2:${camerax_version}"
// CameraX Lifecycle library
implementation "androidx.camera:camera-lifecycle:${camerax_version}"
// CameraX View class
implementation 'androidx.camera:camera-view:1.0.0-alpha10'
// If you want to additionally use the CameraX Extensions library
implementation "androidx.camera:camera-extensions:1.0.0-alpha10"
CAMERA APPLICATION NAME AND VERSION: Camera V: 3.0
ANDROID OS BUILD NUMBER: Android 9 PKQ1.181021.001
DEVICE NAME: Xiaomi Redmi 7
DESCRIPTION: Application crash when zoom and tap for focus using CameraView class
STEPS TO REPRODUCE:
1. Create demo App with CameraView
2. Pinch zoom atleast 1 or 2 steps
3. Touch/Tap to focus on screen
OBSERVED RESULTS: CRASH
EXPECTED RESULTS: Focus
REPRODUCIBILITY: 100 of 100
ADDITIONAL INFORMATION:
Used Fragment to implement CameraView.