no I use a singleton pattern to manage the database.
Sometime i receive also an error when i try to create a new table.
I don’t know if this information can help us to find a solution.
It may be beneficial to review the SQL commands you were previously executing prior to receiving that error. Can you show all the queries that are being executed prior to that? Are you able to create a reproducible test in the SQLCipher for Android test suite? We would be happy to look into that further. Thanks!
I/Database: CREATE TABLE IF NOT EXISTS "ClaudioPicturesList" ("Picture" TEXT DEFAULT "","Description" TEXT DEFAULT "","More" TEXT DEFAULT "",SystemID TEXT PRIMARY KEY, UpdatedBy INTEGER DEFAULT NULL, UpdateDate INTEGER DEFAULT NULL, DataVersion INTEGER DEFAULT NULL, NormalSynchroDate INTEGER DEFAULT NULL, HighSynchroDate INTEGER DEFAULT NULL, IsArchival INTEGER);
I/Database: sqlite returned: error code = 17, msg = statement aborts at 26: [INSERT OR REPLACE INTO dataobjects(activities, name, syncOrder, priority, relationships, fileColumns) VALUES(?, ?, ?, ?, ?, ?);] database schema has changed
After receive also this error
Finalizing a Cursor that has not been deactivated or closed. database = /storage/emulated/0/Android/data/com.xxxx/files/Users/4785/Databases/encdb, table = applications, query = SELECT * FROM applications WHERE id=11235
net.sqlcipher.database.DatabaseObjectNotClosedException: Application did not close the cursor or database object that was opened here
I used the test suite and all working fine, but also with the test suite i can see in the log the error above.
It is difficult to say what the cause is without seeing all of the code that is operating on the database leading up to the error. Are you able to create a new test within the test suite that reproduces it?