Skip to content

App is crashing on launch #527

Description

@arifur-chefling

Expected Behavior

App shouldn't crash

Actual Behavior

App is crashing

Steps to Reproduce

Do the migration from plain text to SQLCipher using https://stackoverflow.com/questions/60204898/migrating-from-existing-room-database-to-sqlcipher
Launch the app

SQLCipher version (can be identified by executing PRAGMA cipher_version;):
4.4.1 community
SQLCipher for Android version:
4.4.1

java.lang.IllegalStateException: database not open
at net.sqlcipher.database.SQLiteDatabase.endTransaction(SQLiteDatabase.java:24)
at com.commonsware.cwac.saferoom.Database.endTransaction(Database.java:1)
at androidx.room.InvalidationTracker$1.run(InvalidationTracker.java:16)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1167)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:641)
at java.lang.Thread.run(Thread.java:919)
2020-11-24 12:26:51.899 21301-22356/? E/AndroidRuntime: FATAL EXCEPTION: arch_disk_io_0
Process: com.chefling.chefling.staging, PID: 21301
net.sqlcipher.database.SQLiteDatabaseCorruptException: database disk image is malformed
at net.sqlcipher.database.SQLiteQuery.native_fill_window(Native Method)
at net.sqlcipher.database.SQLiteQuery.fillWindow(SQLiteQuery.java:7)
at net.sqlcipher.database.SQLiteCursor.fillWindow(SQLiteCursor.java:13)
at net.sqlcipher.database.SQLiteCursor.getCount(SQLiteCursor.java:2)
at android.database.CursorWrapper.getCount(CursorWrapper.java:64)
at com.chefling.chefling.food.FoodDao_Impl$4.a(FoodDao_Impl.java:17)
at com.chefling.chefling.food.FoodDao_Impl$4.a(FoodDao_Impl.java:1)
at androidx.lifecycle.ComputableLiveData$2.run(ComputableLiveData.java:3)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1167)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:641)
at java.lang.Thread.run(Thread.java:919)

Metadata

Metadata

Assignees

No one assigned

    Labels

    staleThis issue lacks recent activity.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions