Status Update
Comments
er...@google.com <er...@google.com>
tr...@google.com <tr...@google.com> #2
ma...@sensoriainc.com <ma...@sensoriainc.com> #3
Great! Thanks a lot, I'll look for the live updates soon!
ma...@sensoriainc.com <ma...@sensoriainc.com> #4
E/AndroidRuntime: FATAL EXCEPTION: main
Process: com.android.example.camera2.basic, PID: 9034
java.nio.BufferUnderflowException
at java.nio.Buffer.nextGetIndex(Buffer.java:515)
at java.nio.HeapByteBuffer.get(HeapByteBuffer.java:111)
at android.hardware.camera2.marshal.impl.MarshalQueryableBoolean$MarshalerBoolean.unmarshal(MarshalQueryableBoolean.java:45)
at android.hardware.camera2.marshal.impl.MarshalQueryableBoolean$MarshalerBoolean.unmarshal(MarshalQueryableBoolean.java:32)
at android.hardware.camera2.impl.CameraMetadataNative.getBase(CameraMetadataNative.java:532)
at android.hardware.camera2.impl.CameraMetadataNative.get(CameraMetadataNative.java:404)
at android.hardware.camera2.impl.CameraMetadataNative.get(CameraMetadataNative.java:373)
at android.hardware.camera2.CameraCharacteristics.get(CameraCharacteristics.java:223)
at com.example.android.camera2.basic.fragments.CameraFragment$initializeCamera$1.invokeSuspend(CameraFragment.kt:201)
at kotlin.coroutines.jvm.internal.BaseContinuationImpl.resumeWith(ContinuationImpl.kt:33)
at kotlinx.coroutines.DispatchedTask.run(DispatchedTask.kt:56)
at android.os.Handler.handleCallback(Handler.java:873)
at android.os.Handler.dispatchMessage(Handler.java:99)
at android.os.Looper.loop(Looper.java:193)
at android.app.ActivityThread.main(ActivityThread.java:6865)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:504)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:858)
tr...@google.com <tr...@google.com> #5
Thank you for trying that out. This seems to suggest there is a problem with the camera implementation on this device. If we can get a device in-hand, we may be able to put a workaround into CameraX.
ma...@sensoriainc.com <ma...@sensoriainc.com> #6
I can ship a loaner to you for repro and workaround.
Would that be feasible?
tr...@google.com <tr...@google.com> #7
Thanks for the offer. We're attempting to source a device from our side. We'll keep this bug updated with progress.
ma...@sensoriainc.com <ma...@sensoriainc.com> #8
tr...@google.com <tr...@google.com> #9
We have a device in-transit and should arrive soon.
In the mean time, do you happen to have any other LEMFO devices besides the LEMP? If so, have you seen similar issues with these devices?
ma...@sensoriainc.com <ma...@sensoriainc.com> #10
ma...@sensoriainc.com <ma...@sensoriainc.com> #11
tr...@google.com <tr...@google.com> #12
I just received the device today and have been able to reproduce the error. I'll keep this bug updated on progress of the workaround.
ap...@google.com <ap...@google.com> #13
Branch: androidx-main
commit 8873fdc0218c1440fc125cbd28403d385e365f7a
Author: Trevor McGuire <trevormcguire@google.com>
Date: Thu Feb 24 17:01:21 2022
Flash availability BufferUnderflowException quirk
Adds quirk and workaround for devices that throw a
BufferUnderflowExceptionwhile checking for flash availablility.
This allows the device to function without crashing when creating
TorchControl.
Relnote: "Workaround included for devices that crash when checking
availability of flash. These devices will not have torch available."
Bug: 216667482
Test: Manual testing of CameraXBasic and Core Test App with
problem/non-problem devices.
Change-Id: If26a3e436ce12dc82451f07ce49969ea237017c0
A camera/camera-camera2/src/main/java/androidx/camera/camera2/internal/compat/quirk/FlashAvailabilityBufferUnderflowQuirk.java
M camera/camera-camera2/src/main/java/androidx/camera/camera2/internal/TorchControl.java
M camera/camera-camera2/src/main/java/androidx/camera/camera2/internal/Camera2CameraInfoImpl.java
M camera/camera-camera2/src/main/java/androidx/camera/camera2/internal/compat/quirk/DeviceQuirksLoader.java
A camera/camera-camera2/src/main/java/androidx/camera/camera2/internal/compat/workaround/FlashAvailabilityChecker.java
tr...@google.com <tr...@google.com> #14
This is now fixed and should be part of the next release. If you'd like to try it out before the next release, you can use
ma...@sensoriainc.com <ma...@sensoriainc.com> #15
is there a log for when the expected release will be?
Description
Please note: This component is for the CameraX API used in Jetpack. Please DO NOT file Pixel Camera issues here.
Please describe your issue and include details such as the version of CameraX you are using and any relevant logs related to your issue.
// If at all possible, capture an Android logcat (
CAMERAX VERSION 1.1.0-beta01, cameraview:1.0.0-alpha27 (NOTE: repro also on previous versions per official
CAMERA APPLICATION NAME AND VERSION: CameraXSample
ANDROID OS BUILD NUMBER: (Settings > About > Build number) Android V9.1 / DM30_LEMP_V1.6_2021_0726
DEVICE NAME: (Nexus 5X, Samsung S6, etc) LEMP (an Android Smart Watch)
DESCRIPTION:
I can successfully run Camera2Basic
When I run CameraXBasic, I can observe a series of internal/managed exceptions up to this code:
/** Initialize CameraX, and prepare to bind the camera use cases */
private fun setUpCamera() {
val cameraProviderFuture = ProcessCameraProvider.getInstance(requireContext())
cameraProviderFuture.addListener(Runnable {
// CameraProvider
cameraProvider = cameraProviderFuture.get() <<<<<<<<<<
After this call, I get a java.lang.reflect.InvocationTargetException crashing the app.
See below for detailed logcat.
LIST ANY EXPERIMENTAL FEATURES: (As an example - @ExperimentalCamera2Interop)
None
STEPS TO REPRODUCE:
1. Launch CameraXBasic
OBSERVED RESULTS:
CRASH
EXPECTED RESULTS:
NOT TO CRASH :)
REPRODUCIBILITY: (5 of 5, 1 of 100, etc) 100%
ADDITIONAL INFORMATION:
Logcat in attachment. You can observe the set of internal exceptions up to before the call to cameraProvideFuture.get(), and the fatal crash.
CODE FRAGMENTS (this will help us troubleshoot your issues):
The crash happens at line 248 of CameraFragment.kt.
/** Initialize CameraX, and prepare to bind the camera use cases */
private fun setUpCamera() {
val cameraProviderFuture = ProcessCameraProvider.getInstance(requireContext())
cameraProviderFuture.addListener(Runnable {
// CameraProvider
cameraProvider = cameraProviderFuture.get()