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>
ni...@google.com <ni...@google.com> #3
Tested on Android 12 Emulator with custom executor, but cannot repro this issue.
er...@google.com <er...@google.com>
to...@google.com <to...@google.com>
wu...@google.com <wu...@google.com>
le...@google.com <le...@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.
ap...@google.com <ap...@google.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)
le...@google.com <le...@google.com>
[Deleted User] <[Deleted User]> #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!
le...@google.com <le...@google.com> #8
Thank you, I'll try it and check.
[Deleted User] <[Deleted User]> #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
Please describe your issue and include details such as the version of CameraX you are using and any relevant logs related to your issue.
# If at all possible, capture an Android logcat (
# the camera is still active.
CAMERAX VERSION (ex - 1.0.0-alpha09)
CAMERA APPLICATION NAME AND VERSION: (Settings > Apps > (app name) > version)
ANDROID OS BUILD NUMBER: (Settings > About > Build number)
Only happens on Android 9
DEVICE NAME: (Nexus 5X, Samsung S6, etc)
ZenFone 5 Lite (ZC600KL) (ASUS_X017D_2)
Nokia 3 (NE1)
Galaxy A9 (2018) (a9y18qlte)
Galaxy J8 (j8y18lte)
DESCRIPTION:
The issue happens when the user has turned on Do Not Disturb mode and tried to open the app. CameraX tries to initialise the camera on startup and within the library code it tries to `enableShutterSound` but fails because of DnD mode.
STEPS TO REPRODUCE:
1. Turn on DnD
2. Open app
3. Observe crash
OBSERVED RESULTS:
EXPECTED RESULTS:
REPRODUCIBILITY: (5 of out 5, 1 out of 100, etc)
For those devices it will happen everytime until the user manually turns of DnD mode and opens the app again.
ADDITIONAL INFORMATION:
Crashlog:
Caused by: java.lang.RuntimeException:
at android.hardware.Camera._enableShutterSound (Camera.java)
at android.hardware.Camera.updateAppOpsPlayAudio (Camera.java:1786)
at android.hardware.Camera.initAppOps (Camera.java:598)
at android.hardware.Camera.<init> (Camera.java:591)
at android.hardware.Camera.getEmptyParameters (Camera.java:2146)
at android.hardware.camera2.legacy.LegacyMetadataMapper.createCharacteristics (LegacyMetadataMapper.java:151)
at android.hardware.camera2.CameraManager.getCameraCharacteristics (CameraManager.java:347)
at androidx.camera.camera2.impl.SupportedSurfaceCombination.generateSupportedCombinationList (SupportedSurfaceCombination.java:1008)
at androidx.camera.camera2.impl.SupportedSurfaceCombination.init (SupportedSurfaceCombination.java:670)
at androidx.camera.camera2.impl.SupportedSurfaceCombination.<init> (SupportedSurfaceCombination.java:95)
at androidx.camera.camera2.impl.Camera2DeviceSurfaceManager.init (Camera2DeviceSurfaceManager.java:192)
at androidx.camera.camera2.impl.Camera2DeviceSurfaceManager.<init> (Camera2DeviceSurfaceManager.java:64)
at androidx.camera.camera2.Camera2AppConfig.create (Camera2AppConfig.java:58)
at androidx.camera.camera2.impl.Camera2Initializer.onCreate (Camera2Initializer.java:45)
at android.content.ContentProvider.attachInfo (ContentProvider.java:1940)
at android.content.ContentProvider.attachInfo (ContentProvider.java:1915)
at android.app.ActivityThread.installProvider (ActivityThread.java:6765)
at android.app.ActivityThread.installContentProviders (ActivityThread.java:6312)
at android.app.ActivityThread.handleBindApplication (ActivityThread.java:6227)
at android.app.ActivityThread.access$1200 (ActivityThread.java:237)
at android.app.ActivityThread$H.handleMessage (ActivityThread.java:1792)
at android.os.Handler.dispatchMessage (Handler.java:106)
at android.os.Looper.loop (Looper.java:214)
at android.app.ActivityThread.main (ActivityThread.java:7073)
at java.lang.reflect.Method.invoke (Method.java)
at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run (RuntimeInit.java:493)
at com.android.internal.os.ZygoteInit.main (ZygoteInit.java:964)
CODE FRAGMENTS (this will help us troubleshoot your issues):