Skip to content

java.lang.RuntimeException: Unable to create application com.edcast.EdCastApplication: android.database.sqlite.SQLiteDiskIOException: disk I/O error (code 4874 SQLITE_IOERR_SHMSIZE): , while compiling: PRAGMA journal_mode #25

Description

@morerohit86

Crashed on Android 9.0(API lev 28).
java.lang.RuntimeException: Unable to create application com.Application: android.database.sqlite.SQLiteDiskIOException: disk I/O error (code 4874 SQLITE_IOERR_SHMSIZE): , while compiling: PRAGMA journal_mode

android.app.ActivityThread.handleBindApplication(ActivityThread.java:5954)
android.app.ActivityThread.access$1200(ActivityThread.java:200)
android.app.ActivityThread$H.handleMessage(ActivityThread.java:1673)
android.os.Handler.dispatchMessage(Handler.java:106)
android.os.Looper.loop(Looper.java:201)
android.app.ActivityThread.main(ActivityThread.java:6810)
java.lang.reflect.Method.invoke(Native Method)
com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:547)
com.android.internal.os.ZygoteInit.main(ZygoteInit.java:873)

I have already tried setting WAL mode to enable and disable still facing the issue.

Here is the code which I have used in our project

public static DatabaseProvider sDatabaseProvider;

    public static DatabaseProvider getInstance(Context context) {
        if (sDatabaseProvider == null) {
            synchronized (DatabaseProvider.class) {
                if (sDatabaseProvider == null) {
                    sDatabaseProvider = new DatabaseProvider();
                }
            }
        }
        return sDatabaseProvider;
    }
// For enabling and disabling the WAL by increasing the database version so I can get the logs.
@Override
 protected void onUpgrade(SQLiteDatabase db, int oldVersion, int newVersion) {
   // to enable VAL setting 
   // db.enableWriteAheadLogging();
   // to disable VAL setting
     db.disableWriteAheadLogging();
   // And for testing val setting I have verified using 
  // to check WAL settings. 
   boolean isWriteAheadLoggingEnabled = db.isWriteAheadLoggingEnabled();
 }

I have already upgraded the to 1.1.0 which is the latest one.
// com.github.triplet.simpleprovider:simpleprovider:1.1.0

Is there any solution for such kind of crashes? Thanks in advanced

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions