Status Update
Comments
su...@google.com <su...@google.com> #2
1. Have you saw crash in real device or only in simulators?
2. Do you use dynamic feature for language ID?
ka...@gmail.com <ka...@gmail.com> #3
Tested on Android 12 Emulator with custom executor, but cannot repro this issue.
su...@google.com <su...@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.
ka...@gmail.com <ka...@gmail.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.
[Deleted User] <[Deleted User]> #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)
su...@google.com <su...@google.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!
ka...@gmail.com <ka...@gmail.com> #8
Thank you, I'll try it and check.
su...@google.com <su...@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
Version used: 1.0.0-rc01
Devices/Android versions reproduced on: We've seen it on 4.4.4 and 4.4.2
We haven't been able to reproduce this ourselves, but we're seeing it show up in our tracking. There's a StackOverflowError caused somewhere inside WorkManager. Here's the stack trace we get:
Fatal Exception: java.lang.StackOverflowError
at java.util.HashMap.secondaryHash(HashMap.java:350)
at java.util.LinkedHashMap.get(LinkedHashMap.java:251)
at android.util.LruCache.get(LruCache.java:118)
at android.database.sqlite.SQLiteConnection.acquirePreparedStatement(SQLiteConnection.java:1100)
at android.database.sqlite.SQLiteConnection.prepare(SQLiteConnection.java:689)
at android.database.sqlite.SQLiteSession.prepare(SQLiteSession.java:588)
at android.database.sqlite.SQLiteProgram.(SQLiteProgram.java:58)
at android.database.sqlite.SQLiteQuery.(SQLiteQuery.java:37)
at android.database.sqlite.SQLiteDirectCursorDriver.query(SQLiteDirectCursorDriver.java:44)
at android.database.sqlite.SQLiteDatabase.rawQueryWithFactory(SQLiteDatabase.java:1433)
at android.database.sqlite.SQLiteDatabase.rawQueryWithFactory(SQLiteDatabase.java:1408)
at android.arch.persistence.db.framework.FrameworkSQLiteDatabase.query(myapp:161)
at android.arch.persistence.room.RoomDatabase.query(myapp:233)
at androidx.work.impl.model.DependencyDao_Impl.getDependentWorkIds(myapp:117)
at androidx.work.impl.WorkerWrapper.recursivelyFailWorkAndDependents(myapp:503)
<snip ~50 recursive frames>
at androidx.work.impl.WorkerWrapper.recursivelyFailWorkAndDependents(myapp:503)
at androidx.work.impl.WorkerWrapper.setFailedAndResolve(myapp:488)
at androidx.work.impl.WorkerWrapper.runWorker(myapp:242)
at androidx.work.impl.WorkerWrapper.run(myapp:127)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1112)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:587)
at java.lang.Thread.run(Thread.java:841)
#0. Crashed: WorkManager-WorkManagerTaskExecutor-thread-0
at java.util.HashMap.secondaryHash(HashMap.java:350)
at java.util.LinkedHashMap.get(LinkedHashMap.java:251)
at android.util.LruCache.get(LruCache.java:118)
at android.database.sqlite.SQLiteConnection.acquirePreparedStatement(SQLiteConnection.java:1100)
at android.database.sqlite.SQLiteConnection.prepare(SQLiteConnection.java:689)
at android.database.sqlite.SQLiteSession.prepare(SQLiteSession.java:588)
at android.database.sqlite.SQLiteProgram.(SQLiteProgram.java:58)
at android.database.sqlite.SQLiteQuery.(SQLiteQuery.java:37)
at android.database.sqlite.SQLiteDirectCursorDriver.query(SQLiteDirectCursorDriver.java:44)
at android.database.sqlite.SQLiteDatabase.rawQueryWithFactory(SQLiteDatabase.java:1433)
at android.database.sqlite.SQLiteDatabase.rawQueryWithFactory(SQLiteDatabase.java:1408)
at android.arch.persistence.db.framework.FrameworkSQLiteDatabase.query(myapp:161)
at android.arch.persistence.room.RoomDatabase.query(myapp:233)