Change theme
Help
Press space for more information.
Show links for this issue (Shortcut: i, l)
Copy issue ID
Previous Issue (Shortcut: k)
Next Issue (Shortcut: j)
Sign in to use full features.
Vote: I am impacted
Notification menu
Refresh (Shortcut: Shift+r)
Go home (Shortcut: u)
Pending code changes (auto-populated)
View issue level access limits(Press Alt + Right arrow for more information)
Unintended behavior
View staffing
Description
CAMERAX VERSION (ex - 1.0.0-alpha07)
CAMERA APPLICATION NAME AND VERSION: It is an application in development. I can if I am requested, create a demo repo and share it if you want me to.
ANDROID OS BUILD NUMBER: BP22250221.013(I have been seeing in all builds, the issue has been around for long time, so I think this info is kinda irrealevant).
DEVICE NAME: Pixel 6
DESCRIPTION: In Pixel 6, there are 2 rear lenses, one is Wide and the other one is UWide. If We use camera2 and select the rear lens, then set FPS to 15. This will work just fine(the Wide lens will be selected automatically and fps will indeed be set to 15, I was able to write a small PFS logger to tell me the current FPS and it works fine). Using config.setPhysicalCameraId(cameraId). If I use the cameraId for the UWide lens, this works fine, no problems at all, fps will be set to 15, I can see that using my fps logger. If I set the cameraId in config.setPhysicalCameraId(cameraId) to be the id of the Wide instead of the UWide lens, the app crashes and throws the following exception:
android.hardware.camera2.CameraAccessException: CAMERA_ERROR (3): The camera device has encountered a serious error
at android.hardware.camera2.impl.CameraDeviceImpl.checkIfCameraClosedOrInError(CameraDeviceImpl.java:2915)
at android.hardware.camera2.impl.CameraDeviceImpl.stopRepeating(CameraDeviceImpl.java:1686)
at android.hardware.camera2.impl.CameraCaptureSessionImpl.close(CameraCaptureSessionImpl.java:603)
at android.hardware.camera2.impl.CameraCaptureSessionImpl$2.onDisconnected(CameraCaptureSessionImpl.java:829)
at android.hardware.camera2.impl.CameraDeviceImpl$9.run(CameraDeviceImpl.java:331)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1156)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:651)
at java.lang.Thread.run(Thread.java:1119)
This is super wierd because it is causing the issue on the lens that was selected automatically without using the setPhysicalCameraId. So the lens is capable of doing that. Also when requesting the fps options with the id using the camera characterestics, it supports (15, 15). Please feel free to ask me to do anything even if you want me to make a quick camera setup project with camera2 and captureRequestBuilder.set(CaptureRequest.CONTROL_AE_TARGET_FPS_RANGE, Range(supportedFpsRange)) but it is really that simple, I have done nothing special. I have tried with another phone, Samsung S23U, it works fine on all lenses available when quering the physical lenses using cameraCharacteristics.physicalCameraIds.forEach{}
LIST ANY EXPERIMENTAL FEATURES:No experimental features
STEPS TO REPRODUCE: I have mentioned that above in the desc
OBSERVED RESULTS: freeze in video(camera stops with this mentioned error, the textureView shows the last frame sent to it before applying the fps)
EXPECTED RESULTS: Normal video with 15 fps
REPRODUCIBILITY: 100/100
ADDITIONAL INFORMATION: _
CODE FRAGMENTS (this will help us troubleshoot your issues):
1. to select the specific physical lens that replicates the issue: => config.setPhysicalCameraId(cameraId)
2. to set fps to 15 => captureRequestBuilder.set(CaptureRequest.CONTROL_AE_TARGET_FPS_RANGE, Range(supportedFpsRange) //where supportedFpsRange is brought from the charachterestics and not a random range.