Status Update
Comments
ch...@google.com <ch...@google.com>
pe...@photomath.com <pe...@photomath.com> #2
Before I saw this ticket I created this change aosp/1292294 which basically improves the documentation and the sample.
Let me know what you think. But if you still prefer we remove the default from the modifier, I am ok with that too.
ch...@google.com <ch...@google.com> #3
Branch: androidx-master-dev
commit 6a6faa78e82977ba346a85d5f8d543645e2ba3e7
Author: Anastasia Soboleva <soboleva@google.com>
Date: Wed Apr 22 19:48:41 2020
TextField fills max width
Fixes: 154638552
Test: new tests and checked text field demos
Relnote: "TextField update - in horizontal dimension it will occupy all available space granted to it"
Change-Id: Ib08dfc0363c5a3521f68c750ba6dc490a25081d3
M ui/ui-foundation/api/0.1.0-dev10.txt
M ui/ui-foundation/api/current.txt
M ui/ui-foundation/api/public_plus_experimental_0.1.0-dev10.txt
M ui/ui-foundation/api/public_plus_experimental_current.txt
M ui/ui-foundation/api/restricted_0.1.0-dev10.txt
M ui/ui-foundation/api/restricted_current.txt
M ui/ui-foundation/src/androidTest/java/androidx/ui/foundation/TextFieldTest.kt
M ui/ui-foundation/src/main/java/androidx/ui/foundation/TextField.kt
yi...@google.com <yi...@google.com> #4
CTS mandates all devices must report non-null to getSupportedPreviewFpsRange API:
I think we need to reach out to partner engineering team to report those devices are shipping a build that doesn't pass CTS.
yi...@google.com <yi...@google.com> #5
Ross, it seems like there exist some devices clearly shipping builds that won't pass camera CTS tests. Do we have some procedures to handle this kind of issues?
yi...@google.com <yi...@google.com> #6
Charcoal, Can you grab a bugreport on devices failing this check? (One should be enough but it doesn't hurt to get one from all of them)
yi...@google.com <yi...@google.com> #7
Hi, Petar
Can you capture and upload a bugreport on one of those devices so we can investigate further?
Here is the instruction:
pe...@photomath.com <pe...@photomath.com> #8
Unfortunately I don't have access to those devices. Posted information is extracted from the Firebase Crashlytics. Is there some way to download the bugreport data from the Crashlytics?
yi...@google.com <yi...@google.com> #9
yi...@google.com <yi...@google.com> #10
I got a moto G6 device now and its supported FPS range list look alright to me, so I guess the problem only happens when the device ran into some bad state (maybe post crash?)
Is it possible for you to upload an APK and provide some instructions to reproduce the issue?
pe...@photomath.com <pe...@photomath.com> #11
I would also say it doesn't always happen, we have decent application ratings on those devices. It isn't in line with our company privacy policy to share APKs outside the company, but in this case I wouldn't say it would help either.
In our current Camera2 implementation, when CameraManager.getCameraCharacteristics()
fails we catch the error and then show appropriate message to our users. It would be of great use that instead of crashing the application we can catch the error and do the same with the CameraX library.
yi...@google.com <yi...@google.com> #12
I guess this would require covering a lot of code path that could fire AssertionError.
I will leave it for camerax folks to evaluate the possibility.
pe...@photomath.com <pe...@photomath.com> #13
If the crash isn't fixable because it is out of the scope of Android responsibility, I suppose the next best thing would be that it fails more gracefully with possibility of reacting to the error. This way our users can have better UX.
ap...@google.com <ap...@google.com> #14
Branch: androidx-master-dev
commit 02b6653370ed5e75d2c36205177958ea73ba32b2
Author: Xi Zhang <xizh@google.com>
Date: Mon Jul 20 16:14:38 2020
Retry CameraX initialization
Due to HAL issues, CameraX may face unexpected error. The most common scenario is when the camera stack is initalized. It could happen to any camera2 API. e.g. getCameraCharistics() for
Change:
- add recovery logic to retry CameraX initialization. The timeout is 3s (as before) and retry interval is 0.5s.
- Change CameraTest to LargetTest since the init failure now takes longer to return.
Bug: 158843205
Test: manual test and ./gradlew bOS
Change-Id: I65de4a96350332fd2de8176d5c10f42e2c3a943f
M camera/camera-core/src/androidTest/java/androidx/camera/core/CameraXTest.java
M camera/camera-core/src/main/java/androidx/camera/core/CameraX.java
xi...@google.com <xi...@google.com>
xi...@google.com <xi...@google.com>
ap...@google.com <ap...@google.com> #15
Branch: androidx-master-dev
commit 4b7ea1248e6ae7e25083d7ec0ca1f39c29b68b37
Author: charcoalchen <charcoalchen@google.com>
Date: Mon Aug 10 20:17:04 2020
Catch AssertionError when calling getCameraCharacteristics and throw a CameraAccessExceptionCompat to make the app be able to gracefully handle it.
Some devices may throw AssertionError when creating CameraCharacteristics and the supported FPS ranges are null.
relnote:"Throw an InitializationException to make the app be able to gracefully handle the AssertionError happened when creating CameraCharacteristics."
Bug: 160524721
Test: ./gradlew camera:camera-camera2:build && manual test
Change-Id: I89c8c2b05f77b1cc00c070f4815e12ed775d1181
M camera/camera-camera2/src/main/java/androidx/camera/camera2/internal/compat/CameraAccessExceptionCompat.java
M camera/camera-camera2/src/main/java/androidx/camera/camera2/internal/compat/CameraManagerCompat.java
ch...@google.com <ch...@google.com> #16
An InitializationException will be thrown to make the app be able to gracefully handle the AssertionError happened when creating CameraCharacteristics. The app could obtain an error cause as the following:
androidx.camera.core.InitializationException: androidx.camera.core.CameraUnavailableException: androidx.camera.camera2.internal.compat.CameraAccessExceptionCompat: CAMERA_CHARACTERISTICS_CREATION_ERROR (10002): Supported FPS ranges cannot be null.
CAMERA_CHARACTERISTICS_CREATION_ERROR (10002) is the customized error code that will be thrown if any AssertionError happens when creating CameraCharacteristics. The original AssertionError message is attached after the ":". The app is able to check it and then show an appropriate message to the end users.
[Deleted User] <[Deleted User]> #17
We are facing a similar crash on an Mi A2 device (Android 10) in the camera2 api.
This is occurring frequently on this particular device, but couldn't reproduce it as we don't have this device at the moment.
CameraX version - 1.0.0-rc03, CameraX view version - 1.0.0-alpha22
Device properties:
Brand:Xiaomi
Model:Mi A2
Orientation: Portrait
RAM free: 1.13 GB
Disk free: 12.95 GB
Version:10
Orientation: Portrait
Rooted:No
Logs:
Fatal Exception: java.lang.AssertionError: Supported FPS ranges cannot be null.
at android.hardware.camera2.legacy.LegacyMetadataMapper.mapControlAe(LegacyMetadataMapper.java:418)
at android.hardware.camera2.legacy.LegacyMetadataMapper.mapCharacteristicsFromParameters(LegacyMetadataMapper.java:190)
at android.hardware.camera2.legacy.LegacyMetadataMapper.createCharacteristics(LegacyMetadataMapper.java:157)
at android.hardware.camera2.CameraManager.getCameraCharacteristics(CameraManager.java:315)
at androidx.camera.camera2.internal.compat.CameraManagerCompatApi29Impl.getCameraCharacteristics(CameraManagerCompatApi29Impl.java:57)
at androidx.camera.camera2.internal.compat.CameraManagerCompat.getCameraCharacteristicsCompat(CameraManagerCompat.java:171)
at androidx.camera.camera2.internal.SupportedSurfaceCombination.<init>(SupportedSurfaceCombination.java:112)
at androidx.camera.camera2.internal.Camera2DeviceSurfaceManager.init(Camera2DeviceSurfaceManager.java:94)
at androidx.camera.camera2.internal.Camera2DeviceSurfaceManager.<init>(Camera2DeviceSurfaceManager.java:82)
at androidx.camera.camera2.internal.Camera2DeviceSurfaceManager.<init>(Camera2DeviceSurfaceManager.java:65)
at androidx.camera.camera2.Camera2Config.lambda$defaultConfig$0(Camera2Config.java:52)
at androidx.camera.camera2.-$$Lambda$Camera2Config$Yt_ZrzIFJvIGZRmltYJKT1v9ITo.newInstance(-.java)
at androidx.camera.core.CameraX.lambda$initAndRetryRecursively$9(CameraX.java:578)
at androidx.camera.core.-$$Lambda$CameraX$PyTMqE8rSnFsLpsANtL2ojEI5QI.run(-.java:10)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1167)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:641)
at java.lang.Thread.run(Thread.java:919)
Please help us identifying what went wrong, or any pointers could help.
mn...@gmail.com <mn...@gmail.com> #18
AssertionError: Supported FPS ranges cannot be null.
File "LegacyMetadataMapper.java", line 411, in mapControlAe
File "LegacyMetadataMapper.java", line 183, in mapCharacteristicsFromParameters
File "LegacyMetadataMapper.java", line 153, in createCharacteristics
File "CameraManager.java", line 277, in getCameraCharacteristics
8h...@gmail.com <8h...@gmail.com> #19
It happened for me for with Camera2 API as well for Samsung device - Samsung Galaxy S9+ (Android 10)
Fatal Exception: java.lang.AssertionError
Supported FPS ranges cannot be null.
android.hardware.camera2.legacy.LegacyMetadataMapper.mapControlAe (LegacyMetadataMapper.java:418)
android.hardware.camera2.CameraManager.getCameraCharacteristics (CameraManager.java:743)
ch...@google.com <ch...@google.com> #20
Mostly, this issue happens randomly and we can't know the root cause from the application level. When encountering such kind of problem, what we can do might be:
- Retry in a reasonable duration
- Cache the CameraCharacteristics when you obtain it successfully
These are also the ways that CameraX used to workaround this issue.
Description
This crash happens in production on the devices we don't own. Crash is connected to internal initialisation of the camera.
CAMERAX VERSION
DEVICE NAME:
ADDITIONAL INFORMATION: