Fixed
Status Update
Comments
er...@google.com <er...@google.com>
tr...@google.com <tr...@google.com> #2
This is fixed internally and will be available in alpha02
ma...@sensoriainc.com <ma...@sensoriainc.com> #3
I've modified the build.gradle file (of the attached "MyAppplication" project) to the latest iteration (alpha2) to test the changes. When I pass through the same flow twice (shown in attached screen recording) I get an exception (listed below). Should I initiate a new issue for it?
--------- beginning of crash
E/AndroidRuntime: FATAL EXCEPTION: main
Process: com.example.myapplication, PID: 3799
java.util.NoSuchElementException
at java.util.ArrayDeque.removeLast(ArrayDeque.java:274)
at androidx.navigation.fragment.FragmentNavigator.popBackStack(FragmentNavigator.java:87)
at androidx.navigation.NavController.popBackStack(NavController.java:280)
at androidx.navigation.NavController.navigate(NavController.java:642)
at androidx.navigation.NavController.navigate(NavController.java:592)
at androidx.navigation.Navigation$1.onClick(Navigation.java:118)
at android.view.View.performClick(View.java:6294)
at android.view.View$PerformClick.run(View.java:24770)
at android.os.Handler.handleCallback(Handler.java:790)
at android.os.Handler.dispatchMessage(Handler.java:99)
at android.os.Looper.loop(Looper.java:164)
at android.app.ActivityThread.main(ActivityThread.java:6494)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:438)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:807)
--------- beginning of crash
E/AndroidRuntime: FATAL EXCEPTION: main
Process: com.example.myapplication, PID: 3799
java.util.NoSuchElementException
at java.util.ArrayDeque.removeLast(ArrayDeque.java:274)
at androidx.navigation.fragment.FragmentNavigator.popBackStack(FragmentNavigator.java:87)
at androidx.navigation.NavController.popBackStack(NavController.java:280)
at androidx.navigation.NavController.navigate(NavController.java:642)
at androidx.navigation.NavController.navigate(NavController.java:592)
at androidx.navigation.Navigation$1.onClick(Navigation.java:118)
at android.view.View.performClick(View.java:6294)
at android.view.View$PerformClick.run(View.java:24770)
at android.os.Handler.handleCallback(Handler.java:790)
at android.os.Handler.dispatchMessage(Handler.java:99)
at android.os.Looper.loop(Looper.java:164)
at android.app.ActivityThread.main(ActivityThread.java:6494)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:438)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:807)
ma...@sensoriainc.com <ma...@sensoriainc.com> #4
The alternative paths shown in the attached recordings also lead to the aforementioned exception.
tr...@google.com <tr...@google.com> #5
ma...@sensoriainc.com <ma...@sensoriainc.com> #6
Thanks for the feedback.
I can ship a loaner to you for repro and workaround.
Would that be feasible?
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
do you have an update? Again, I can provide a loaner device.
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
I don't have other types of LEMFO devices at hand
ma...@sensoriainc.com <ma...@sensoriainc.com> #11
Hello. were you able to get the device in hand?
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
Project: platform/frameworks/support
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
https://android-review.googlesource.com/2000430
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
Thanks Trevor.
is there a log for when the expected release will be?
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()