Status Update
Comments
da...@gmail.com <da...@gmail.com> #2
This is with the latest CameraX 1.1.0-beta03.
wu...@google.com <wu...@google.com> #3
Thanks for reporting the issue. We will look into the bug and update here soon.
sc...@google.com <sc...@google.com> #4
Hi Shuzen
We've got this public issue from developers where querying CameraCharacteristics.CONTROL_ZOOM_RATIO_RANGE seems to cause crash on some cheap devices in India.
Is this because these cheap devices do not pass CTS ?
sh...@google.com <sh...@google.com> #5
Is it possible to get a bugreport from those devices?
da...@gmail.com <da...@gmail.com> #6
One of our project members can potentially get their hands on one of these devices but we currently don't have access to one. It's probably a lot easier for you folks to get one since we can't really afford to buy phones.
Ideally you could get some of these cheap Indian/Chinese phones for the CameraX device lab.
This Jio device is Google certified but in my experience most non-Pixel phones are pretty far from genuinely passing the CTS and have a lot of failures that aren't just flaky tests. I'm not sure how they get their devices certified but apparently there are waivers. Google doesn't do the certification but rather third parties do, and it's possible they're simply cutting corners or acting in a corrupt way. Usually there are a lot of failing CTS Camera tests. It doesn't help that a lot of those CTS Camera tests are super flaky without a high quality device and a proper testing setup with proper lightning, etc. They can still fail from flakiness even with that setup. Probably why they can so easily skip meeting these requirements, since the certification companies are used to flaky / failing tests and aren't really doing their job properly.
da...@gmail.com <da...@gmail.com> #7
We have a project member in India who could buy one of these phones and since they're so cheap (around $80 or something) I could cover that but in general I don't really want to be buying phones we don't really need.
sc...@google.com <sc...@google.com> #8
Thanks for the informations. You are right, it's possible that the devices are not genuinely passing the CTS.
Regardless, we will fix this in CameraX. (Thanks for letting us know BTW)
We will also try to get one of these device to test if there are other issues.
Scott
tr...@google.com <tr...@google.com> #9
This crash looks similar to the one in
sc...@google.com <sc...@google.com> #10
1) Fix it generally
2) Have a quirk for this, only enable the fix when device has this quirk.
The problem with the quirk is that it is too easy to miss some other devices that have this issue too.
Having a general fallback that works reasonably can fix the issue for all problematic devices.
(In these two cases, they are both reasonable to return false if the key access failed)
But I do think it has benefits to have a quirk so that we know exactly what workaround we handled in CameraX.
Maybe , we can have a type of quirk or workaround that we apply generally for all devices ?
WDYT?
mi...@google.com <mi...@google.com> #11
I had similar considerations while adding the try-catch code (aosp/2092403). I want to have a quirk to document the workaround we made, but it would be a little weird that the quirk should always return true on the device quirk check. I was wondering if it is possible to have another type of quirk, e.g. a function with comment in quirk format.
ap...@google.com <ap...@google.com> #12
Branch: androidx-main
commit 874ef5abba7929d0110fd54392ae9d8ee91003f0
Author: mingdatsai <mingdatsai@google.com>
Date: Mon May 09 20:32:42 2022
Catch CameraCharacteristicsBaseImpl exceptions
Some devices may throw AssertionError, which is not the expected
behavior, when failed to get CameraCharacteristic. When that happens,
we catch the error and return null to workaround it.
Bug: 231701345
Test: ZoomControlTest, ZoomControlDeviceTest &
Camera2CameraControlImplDeviceTest
Change-Id: Ia248ae5580b9d4a0949f4448ccbafcedd1ba7b9b
M camera/camera-camera2/src/test/java/androidx/camera/camera2/internal/ZoomControlTest.java
M camera/camera-camera2/src/main/java/androidx/camera/camera2/internal/ZoomControl.java
M camera/camera-camera2/src/androidTest/java/androidx/camera/camera2/internal/Camera2CameraControlImplDeviceTest.java
M camera/camera-camera2/src/androidTest/java/androidx/camera/camera2/internal/ZoomControlDeviceTest.java
mi...@google.com <mi...@google.com> #13
We have tested both Android 11 and Android 12 versions on JioPhone Next and couldn't reproduce the bug. I'm guessing it might have be fixed in an earlier device update. The code to handle the AsserionError has been merged, and will be included in a following release.
da...@gmail.com <da...@gmail.com> #14
That makes sense since we're not seeing enough of the errors for it to be impacting all of them. Play Store doesn't provide more than the major version though and we don't have any of our own crash reporting.
mi...@google.com <mi...@google.com> #15
Thanks for the information, it seems match with the guess.
ju...@google.com <ju...@google.com> #16
The following release(s) address this bug.It is possible this bug has only been partially addressed:
androidx.camera:camera-camera2:1.2.0
Description
We're receiving these crash reports for our app on the Play Store (https://play.google.com/store/apps/details?id=app.grapheneos.camera.play ). I'm unsure why it's happening, but perhaps you can get one of these devices and reproduce it. Ideally, CameraX could at least start catching this exception and turning it into an error surfaced to the app.
We're mostly seeing these crashes from the Jio JioPhone Next which is a very widely used, very cheap device in India. The crash traceback is nearly identical across the around 5 device models where we've seen it with only minor variations in Camera2 implementation line numbers. All of the impacted devices are Android 11.