SQLiteDatabaseLockedException

Bug #1332733 reported by pjv on 2014-06-20
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Collectionista
Low
pjv

Bug Description

android.database.sqlite.SQLiteDatabaseLockedException: database is locked (code 5)

Bugsense: https://www.bugsense.com/dashboard/project/98c9e403/errors/947318068

java.lang.RuntimeException: An error occured while executing doInBackground()
at android.support.v4.content.ModernAsyncTask$3.void done()(Collectionista:137)
at java.util.concurrent.FutureTask$Sync.innerSetException(FutureTask.java:273)
at java.util.concurrent.FutureTask.setException(FutureTask.java:124)
at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:307)
at java.util.concurrent.FutureTask.run(FutureTask.java:137)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1076)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:569)
at java.lang.Thread.run(Thread.java:856)Caused by: android.database.sqlite.SQLiteDatabaseLockedException: database is locked (code 5)
at android.database.sqlite.SQLiteConnection.nativeExecuteForChangedRowCount(Native Method)
at android.database.sqlite.SQLiteConnection.executeForChangedRowCount(SQLiteConnection.java:738)
at android.database.sqlite.SQLiteSession.executeForChangedRowCount(SQLiteSession.java:754)
at android.database.sqlite.SQLiteStatement.executeUpdateDelete(SQLiteStatement.java:64)
at android.database.sqlite.SQLiteDatabase.executeSql(SQLiteDatabase.java:1665)
at android.database.sqlite.SQLiteDatabase.execSQL(SQLiteDatabase.java:1594)
at net.lp.collectionista.providers.ProductContentProvider$ProductDatabaseHelper.void createTableInternal(android.database.sqlite.SQLiteDatabase,java.lang.String)(Collectionista:77)
at net.lp.collectionista.providers.ProductContentProvider$ProductDatabaseHelper.a(Collectionista:68)
at net.lp.collectionista.providers.ProductContentProvider$ProductDatabaseHelper.void onOpen(android.database.sqlite.SQLiteDatabase)(Collectionista:99)
at android.database.sqlite.SQLiteOpenHelper.getDatabaseLocked(SQLiteOpenHelper.java:267)
at android.database.sqlite.SQLiteOpenHelper.getReadableDatabase(SQLiteOpenHelper.java:188)
at net.lp.collectionista.providers.ProductContentProvider.android.database.Cursor query(android.net.Uri,java.lang.String[],java.lang.String,java.lang.String[],java.lang.String)(Collectionista:724)
at android.content.ContentProvider.query(ContentProvider.java:652)
at android.content.ContentProvider$Transport.query(ContentProvider.java:189)
at android.content.ContentResolver.query(ContentResolver.java:370)
at android.content.ContentResolver.query(ContentResolver.java:313)
at net.lp.collectionista.providers.FacadeContentProvider.android.database.Cursor query(android.net.Uri,java.lang.String[],java.lang.String,java.lang.String[],java.lang.String)(Collectionista:650)
at android.content.ContentProvider.query(ContentProvider.java:652)
at android.content.ContentProvider$Transport.query(ContentProvider.java:189)
at android.content.ContentResolver.query(ContentResolver.java:370)
at android.content.ContentResolver.query(ContentResolver.java:313)
at android.support.v4.content.CursorLoader.android.database.Cursor loadInBackground()(Collectionista:49)
at android.support.v4.content.CursorLoader.java.lang.Object loadInBackground()(Collectionista:35)
at android.support.v4.content.AsyncTaskLoader.java.lang.Object onLoadInBackground()(Collectionista:242)
at android.support.v4.content.AsyncTaskLoader$LoadTask.java.lang.Object doInBackground(java.lang.Void[])(Collectionista:51)
at android.support.v4.content.AsyncTaskLoader$LoadTask.java.lang.Object doInBackground(java.lang.Object[])(Collectionista:40)
at android.support.v4.content.ModernAsyncTask$2.java.lang.Object call()(Collectionista:123)
at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:305)
... 4 more

pjv (pjv) wrote :

Probably a timeout because of the "synchronized" code (critical section) around createTable and createTableInternal. Could be that on this weird device it takes extra long for the backup/restore to occur for example. Not solved yet.

pjv (pjv) wrote :

Perhaps hard to solve.

Changed in collectionista:
status: New → Incomplete
importance: Undecided → Low
assignee: nobody → pjv (pjv)
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers