Status Update
Comments
er...@google.com <er...@google.com> #2
1. Have you saw crash in real device or only in simulators?
2. Do you use dynamic feature for language ID?
er...@google.com <er...@google.com> #3
Tested on Android 12 Emulator with custom executor, but cannot repro this issue.
er...@google.com <er...@google.com> #4
-
Second crash in the description is from a real device. Experienced it myself on two different Xiaomi phones, plus lots of crashes from users in the Google Play console.
-
Dynamic features are not used in the application.
As a wild guess, I have downgraded build tools from 31.0.0 to 30.0.3, compileSdk from 31 to 30, and moved all work with Language ID to the service in a separate process (just to be sure that crash can kill secondary process instead of main). This combination is in beta for 2 days by now and I don't see any SIGSEGV crashes.
ap...@google.com <ap...@google.com> #5
Hmm, I feel the crash might be something related to separate/secondary process.
I also changed compileSdk and targetSDK to 31 but still cannot repro this issue.
ab...@gmail.com <ab...@gmail.com> #6
On the contrary, there was no separate process before, when crashes started.
In the new build (with the aforementioned changes) I can see SIGSEGV crash, but only one instead of dozens and it has a bit different backtrace:
signal 11 (SIGSEGV), code 1 (SEGV_MAPERR)
liblanguage_id_jni.so (offset 0x11e000)
backtrace:
#00 pc 000000000003c7c0 /data/app/azagroup.reedy-mF7zTu2bv_ELlbFArwNgqA==/split_config.arm64_v8a.apk!lib/arm64-v8a/liblanguage_id_jni.so (offset 0x11e000)
#00 pc 000000000003b960 /data/app/azagroup.reedy-mF7zTu2bv_ELlbFArwNgqA==/split_config.arm64_v8a.apk!lib/arm64-v8a/liblanguage_id_jni.so (offset 0x11e000)
#00 pc 000000000003bb48 /data/app/azagroup.reedy-mF7zTu2bv_ELlbFArwNgqA==/split_config.arm64_v8a.apk!lib/arm64-v8a/liblanguage_id_jni.so (offset 0x11e000)
#00 pc 000000000003bafc /data/app/azagroup.reedy-mF7zTu2bv_ELlbFArwNgqA==/split_config.arm64_v8a.apk!lib/arm64-v8a/liblanguage_id_jni.so (offset 0x11e000)
#00 pc 0000000000036c98 /data/app/azagroup.reedy-mF7zTu2bv_ELlbFArwNgqA==/split_config.arm64_v8a.apk!lib/arm64-v8a/liblanguage_id_jni.so (offset 0x11e000)
#00 pc 0000000000032714 /data/app/azagroup.reedy-mF7zTu2bv_ELlbFArwNgqA==/split_config.arm64_v8a.apk!lib/arm64-v8a/liblanguage_id_jni.so (offset 0x11e000)
#00 pc 0000000000031cac /data/app/azagroup.reedy-mF7zTu2bv_ELlbFArwNgqA==/split_config.arm64_v8a.apk!lib/arm64-v8a/liblanguage_id_jni.so (offset 0x11e000)
#00 pc 0000000000057438 /data/app/azagroup.reedy-mF7zTu2bv_ELlbFArwNgqA==/oat/arm64/base.odex (offset 0x57000)
ab...@gmail.com <ab...@gmail.com> #7
FYI, ML Kit launched a new language ID SDK in the latest release, which uses a new language ID model.
Could you try the new SDK version(17.0.0) to check if you can still repro this native crash? Thanks!
ap...@google.com <ap...@google.com> #9
Hello. I have similar experience.
- I'm using mlkit-language 16.1.1
- I didnot meet this error until using AGP 4.2
- I can get this error since using AGP 7.0
- This error raised on Release build only(minimized by R8)
- This error raised without obfuscation.
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