Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
morerohit86 opened this issue Sep 20, 2019 · 0 comments

Comments

@morerohit86
Copy link

morerohit86 commented Sep 20, 2019

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant