You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Getting random crashes due to database lock, even when I' writing only once in a bucket on a activity
Crash Log
android.database.sqlite.SQLiteDatabaseLockedException: database is locked (code 5) at android.database.sqlite.SQLiteConnection.nativeExecuteForLastInsertedRowId(Native Method) at android.database.sqlite.SQLiteConnection.executeForLastInsertedRowId(SQLiteConnection.java:780) at android.database.sqlite.SQLiteSession.executeForLastInsertedRowId(SQLiteSession.java:788) at android.database.sqlite.SQLiteStatement.executeInsert(SQLiteStatement.java:86) at android.database.sqlite.SQLiteDatabase.insertWithOnConflict(SQLiteDatabase.java:1473) at com.colintmiller.simplenosql.db.SimpleNoSQLDBHelper.saveEntity(SimpleNoSQLDBHelper.java:70) at com.colintmiller.simplenosql.threading.DataDispatcher.save(DataDispatcher.java:96) at com.colintmiller.simplenosql.threading.DataDispatcher.run(DataDispatcher.java:77)
The text was updated successfully, but these errors were encountered:
I would recommend setting the threads to one for now. I haven't had time to update the threading and storage logic. However running single threaded should still be fine unless you're doing a large amount of transactions. Even then it's a problem that SQLite will give you by default.
I'm using it for e-commerce application to store data fetched from network, I tried changing the threads but while running again it gives random crashes so don't know why it worked last time not now
Getting random crashes due to database lock, even when I' writing only once in a bucket on a activity
Crash Log
android.database.sqlite.SQLiteDatabaseLockedException: database is locked (code 5) at android.database.sqlite.SQLiteConnection.nativeExecuteForLastInsertedRowId(Native Method) at android.database.sqlite.SQLiteConnection.executeForLastInsertedRowId(SQLiteConnection.java:780) at android.database.sqlite.SQLiteSession.executeForLastInsertedRowId(SQLiteSession.java:788) at android.database.sqlite.SQLiteStatement.executeInsert(SQLiteStatement.java:86) at android.database.sqlite.SQLiteDatabase.insertWithOnConflict(SQLiteDatabase.java:1473) at com.colintmiller.simplenosql.db.SimpleNoSQLDBHelper.saveEntity(SimpleNoSQLDBHelper.java:70) at com.colintmiller.simplenosql.threading.DataDispatcher.save(DataDispatcher.java:96) at com.colintmiller.simplenosql.threading.DataDispatcher.run(DataDispatcher.java:77)
The text was updated successfully, but these errors were encountered: