Fixed
Status Update
Comments
er...@google.com <er...@google.com> #2
Hi Ed, Thank you so much for these suggestions. I've been reviewing them and merging them in. Hopefully it should be live. I've included a thank you note too in the article.
er...@google.com <er...@google.com> #3
Great! Thanks a lot, I'll look for the live updates soon!
ap...@google.com <ap...@google.com> #5
Project: platform/frameworks/support
Branch: androidx-master-dev
commit 404aab04fc5ede6314fa93ff7b62431f9646e0e9
Author: Trevor McGuire <trevormcguire@google.com>
Date: Mon Apr 20 15:49:47 2020
Switch "Failed to set already detached use case online" to debug log
This can occur if the use case is detached before the camera's thread
has a chance to add the use case to the capture session. This should
not affect normal operation, so this error log message can be changed
to a debug log.
Relnote: "Converted error log related to detached use case to a debug log on Camera2CameraImpl."
Test: ./gradlew bOS
Bug: 154422490
Change-Id: I1a565e55af6e63792287221f8cbd9e7747fd6875
M camera/camera-camera2/src/main/java/androidx/camera/camera2/internal/Camera2CameraImpl.java
https://android-review.googlesource.com/1291317
Branch: androidx-master-dev
commit 404aab04fc5ede6314fa93ff7b62431f9646e0e9
Author: Trevor McGuire <trevormcguire@google.com>
Date: Mon Apr 20 15:49:47 2020
Switch "Failed to set already detached use case online" to debug log
This can occur if the use case is detached before the camera's thread
has a chance to add the use case to the capture session. This should
not affect normal operation, so this error log message can be changed
to a debug log.
Relnote: "Converted error log related to detached use case to a debug log on Camera2CameraImpl."
Test: ./gradlew bOS
Bug: 154422490
Change-Id: I1a565e55af6e63792287221f8cbd9e7747fd6875
M camera/camera-camera2/src/main/java/androidx/camera/camera2/internal/Camera2CameraImpl.java
ab...@gmail.com <ab...@gmail.com> #6
Can this log error message also be safely ignored?
Failed to set already detached use case online
ab...@gmail.com <ab...@gmail.com> #7
Sorry, I meant this one:
Failed to set already detached use case active
tr...@google.com <tr...@google.com> #8
Yes, it can be safely ignored. I will switch it to a debug log as well.
ap...@google.com <ap...@google.com> #9
Project: platform/frameworks/support
Branch: androidx-master-dev
commit 0cff18a13097a05812b60c8bfb7968baf79464b4
Author: Trevor McGuire <trevormcguire@google.com>
Date: Mon Apr 27 11:52:06 2020
Switch "Failed to set already detached use case active" to debug log
This can occur if the use case is detached before the camera's thread
has a chance react to the use case being marked active. This should
not affect normal operation, so this error log message can be changed
to a debug log.
Bug: 154422490
Test: ./gradlew bOS
Change-Id: I2a99128be65c03af955753c230cb798789f8769f
M camera/camera-camera2/src/main/java/androidx/camera/camera2/internal/Camera2CameraImpl.java
https://android-review.googlesource.com/1296396
Branch: androidx-master-dev
commit 0cff18a13097a05812b60c8bfb7968baf79464b4
Author: Trevor McGuire <trevormcguire@google.com>
Date: Mon Apr 27 11:52:06 2020
Switch "Failed to set already detached use case active" to debug log
This can occur if the use case is detached before the camera's thread
has a chance react to the use case being marked active. This should
not affect normal operation, so this error log message can be changed
to a debug log.
Bug: 154422490
Test: ./gradlew bOS
Change-Id: I2a99128be65c03af955753c230cb798789f8769f
M camera/camera-camera2/src/main/java/androidx/camera/camera2/internal/Camera2CameraImpl.java
Description
cameraXVersion = "1.0.0-beta02" cameraViewVersion = "1.0.0-alpha08"
Android Version: 6.0 Device Name: Moto G (2nd Generation)
DESCRIPTION: Using Camerax with Firebase Barcode Scanner. Use case: A fragment which scans the first QR code it detects and navigates to a different fragment.
Error:
E/Camera: Failed to set already detached use case online E/Camera: Failed to set already detached use case online
Getting the above error message when navigating to the fragment (Except first time) The app is not crashing.
REPRODUCIBILITY: 100%
Created a Stack Overflow question with more details:
https://stackoverflow.com/questions/61323012/error-camera-failed-to-set-already-detached-use-case-active
Complete Stack trace : D/Camera: Use cases [Preview:androidx.camera.core.Preview-2b628f3b-651e-4185-8816-bacd182d7739, ImageAnalysis:androidx.camera.core.ImageAnalysis-16478fc0-c1ff-4cac-9fa0-46e218202cee] now ONLINE for camera 0 D/UseCaseAttachState: Active and online use case: [] for camera: 0 D/Camera: Resetting Capture Session
D/Camera: releasing session in state INITIALIZED
D/Camera: Transitioning camera internal state: INITIALIZED -- OPENING
D/Camera: Opening camera: 0
D/UseCaseAttachState: All use case: [androidx.camera.core.ImageAnalysis-16478fc0-c1ff-4cac-9fa0-46e218202cee, androidx.camera.core.Preview-2b628f3b-651e-4185-8816-bacd182d7739] for camera: 0
I/CameraManager: Using legacy camera HAL.
I/art: Background partial concurrent mark sweep GC freed 26391(1116KB) AllocSpace objects, 27(17MB) LOS objects, 40% free, 20MB/33MB, paused 7.112ms total 172.514ms
D/Camera: Use case ImageAnalysis:androidx.camera.core.ImageAnalysis-16478fc0-c1ff-4cac-9fa0-46e218202cee ACTIVE for camera 0
E/Camera: Failed to set already detached use case active
D/Camera: Use case Preview:androidx.camera.core.Preview-2b628f3b-651e-4185-8816-bacd182d7739 ACTIVE for camera 0
E/Camera: Failed to set already detached use case active
D/Camera: Use cases [ImageAnalysis:androidx.camera.core.ImageAnalysis-16478fc0-c1ff-4cac-9fa0-46e218202cee] now OFFLINE for camera 0
D/UseCaseAttachState: Active and online use case: [] for camera: 0
D/Camera: Resetting Capture Session
D/Camera: releasing session in state OPENING
D/Camera: Use case Preview:androidx.camera.core.Preview-2b628f3b-651e-4185-8816-bacd182d7739 INACTIVE for camera 0
D/UseCaseAttachState: Active and online use case: [] for camera: 0
D/Camera: Use cases [Preview:androidx.camera.core.Preview-2b628f3b-651e-4185-8816-bacd182d7739] now OFFLINE for camera 0
D/Camera: Resetting Capture Session
D/Camera: releasing session in state OPENING
D/Camera: Closing camera: 0
D/Camera: Transitioning camera internal state: OPENING -- CLOSING
D/UseCaseAttachState: Active and online use case: [] for camera: 0
D/UseCaseAttachState: Active and online use case: [] for camera: 0
D/Camera: Use cases [ImageAnalysis:androidx.camera.core.ImageAnalysis-e1f008e1-b782-4a19-940a-e75166d230a5, Preview:androidx.camera.core.Preview-4021921f-00eb-46dd-bce5-fb77d209bd34] now ONLINE for camera 0
D/UseCaseAttachState: Active and online use case: [] for camera: 0
D/Camera: Resetting Capture Session
D/Camera: releasing session in state CLOSING
D/Camera: Transitioning camera internal state: CLOSING -- REOPENING
D/Camera: Use case ImageAnalysis:androidx.camera.core.ImageAnalysis-e1f008e1-b782-4a19-940a-e75166d230a5 ACTIVE for camera 0
D/UseCaseAttachState: Active and online use case: [androidx.camera.core.ImageAnalysis-e1f008e1-b782-4a19-940a-e75166d230a5] for camera: 0
D/Camera: Use case Preview:androidx.camera.core.Preview-4021921f-00eb-46dd-bce5-fb77d209bd34 ACTIVE for camera 0
D/UseCaseAttachState: Active and online use case: [androidx.camera.core.Preview-4021921f-00eb-46dd-bce5-fb77d209bd34, androidx.camera.core.ImageAnalysis-e1f008e1-b782-4a19-940a-e75166d230a5] for camera: 0
D/Camera: CameraDevice.onOpened(): 0
D/Camera: Transitioning camera internal state: REOPENING -- OPENED
D/UseCaseAttachState: All use case: [androidx.camera.core.Preview-4021921f-00eb-46dd-bce5-fb77d209bd34, androidx.camera.core.ImageAnalysis-e1f008e1-b782-4a19-940a-e75166d230a5] for camera: 0
D/CaptureSession: Opening capture session.
I/CameraDeviceState: Legacy camera service transitioning to state CONFIGURING
I/RequestThread-0: Configure outputs: 2 surfaces configured.
D/Camera: app passed NULL surface
I/CameraDeviceState: Legacy camera service transitioning to state IDLE
D/CaptureSession: Attempting to send capture request onConfigured
D/CaptureSession: Issuing request for session.
I/RequestQueue: Repeating capture request set.
D/CaptureSession: CameraCaptureSession.onConfigured() mState=OPENED
D/CaptureSession: CameraCaptureSession.onReady() OPENED
W/LegacyRequestMapper: convertRequestMetadata - control.awbRegions setting is not supported, ignoring value
W/LegacyRequestMapper: Only received metering rectangles with weight 0.
W/LegacyRequestMapper: Only received metering rectangles with weight 0.
I/art: Background partial concurrent mark sweep GC freed 12590(707KB) AllocSpace objects, 1(608KB) LOS objects, 40% free, 20MB/34MB, paused 2.229ms total 165.276ms
I/CameraDeviceState: Legacy camera service transitioning to state CAPTURING