admin管理员组文章数量:1279089
We've recently encountered this crash but haven't been able to identify the root cause, as the error appears to be coming from WorkManager.
Workmanager version: androidx.work:work-runtime-ktx:2.7.0
The crash mostly occurs on Oppo, Vivo, and Samsung devices running Android 11, with 95% of the cases happening in the background.
Fatal Exception: android.database.sqlite.SQLiteDatabaseLockedException
database is locked (code 5 SQLITE_BUSY)
android.database.sqlite.SQLiteConnection.nativeExecute (SQLiteConnection.java)
android.database.sqlite.SQLiteConnection.execute (SQLiteConnection.java:717)
android.database.sqlite.SQLiteSession.beginTransactionUnchecked (SQLiteSession.java:321)
android.database.sqlite.SQLiteSession.beginTransaction (SQLiteSession.java:300)
android.database.sqlite.SQLiteDatabase.beginTransaction (SQLiteDatabase.java:575)
android.database.sqlite.SQLiteDatabase.beginTransactionNonExclusive (SQLiteDatabase.java:509)
androidx.sqlite.db.framework.FrameworkSQLiteDatabase.beginTransactionNonExclusive (FrameworkSQLiteDatabase.java:74)
androidx.room.RoomDatabase.internalBeginTransaction (RoomDatabase.java:570)
androidx.room.RoomDatabase.beginTransaction (RoomDatabase.java:555)
androidx.work.impl.Schedulers.schedule (Schedulers.java:71)
androidx.work.impl.WorkerWrapper.onWorkFinished (WorkerWrapper.java:375)
androidx.work.impl.WorkerWrapper$2.run (WorkerWrapper.java:331)
androidx.work.impl.utils.SerialExecutor$Task.run (SerialExecutor.java:91)
java.util.concurrent.ThreadPoolExecutor.runWorker (ThreadPoolExecutor.java:1167)
java.util.concurrent.ThreadPoolExecutor$Worker.run (ThreadPoolExecutor.java:641)
java.lang.Thread.run (Thread.java:923)
I'm not sure where to look because the error doesn't specify which database is causing the issue. Additionally, I'm unable to reproduce the issue on either an emulator or the real devices I currently have.
本文标签: androidSQLiteDatabaseLockedException crash on WorkManagerStack Overflow
版权声明:本文标题:android - SQLiteDatabaseLockedException crash on WorkManager - Stack Overflow 内容由网友自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:http://www.betaflare.com/web/1741211432a2359199.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。
发表评论