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
Probably a timeout because of the "synchronized" code (critical section) around createTable and createTableInte rnal. Could be that on this weird device it takes extra long for the backup/restore to occur for example. Not solved yet.