jeudi 24 septembre 2015

SQLiteDiskIOException: disk I/O error (code 3850)

I get above mentioned error on some devices (very rarely, 2 times until now only):

android.database.sqlite.SQLiteDiskIOException: disk I/O error (code 3850)
    at android.database.sqlite.SQLiteConnection.nativeExecuteForString(Native Method)
    at android.database.sqlite.SQLiteConnection.executeForString(SQLiteConnection.java:679)
    at android.database.sqlite.SQLiteConnection.setJournalMode(SQLiteConnection.java:361)
    at android.database.sqlite.SQLiteConnection.open(SQLiteConnection.java:236)
    at android.database.sqlite.SQLiteConnection.open(SQLiteConnection.java:200)
    at android.database.sqlite.SQLiteConnectionPool.openConnectionLocked(SQLiteConnectionPool.java:463)
    at android.database.sqlite.SQLiteConnectionPool.open(SQLiteConnectionPool.java:185)
    at android.database.sqlite.SQLiteConnectionPool.open(SQLiteConnectionPool.java:177)
    at android.database.sqlite.SQLiteDatabase.openInner(SQLiteDatabase.java:806)
    at android.database.sqlite.SQLiteDatabase.open(SQLiteDatabase.java:791)
    at android.database.sqlite.SQLiteDatabase.openDatabase(SQLiteDatabase.java:694)
    at android.database.sqlite.SQLiteDatabase.openDatabase(SQLiteDatabase.java:669)
    at ***.a(***.java:115)

The line 115 in my code is following:

// here the exception occurs
SQLiteDatabase db = SQLiteDatabase.openDatabase(pathApp, null, SQLiteDatabase.OPEN_READONLY); 
// ...
db.close();

Story

What I do is following:

  • app has root rights
  • it copies the database from another app into it's own directory
  • it tries to open this database and read some data
  • it close the file again

That's all. This is working on thousands of devices. My app for sure only accesses the database at on place, I'm completely sure about that

Question

Does anyone know what could cause this problem?

Maybe interesting facts

  • the 2 devices are a OnePlus2
  • one guy told me that the problem occurred after updating to Oxygen 2.1

Aucun commentaire:

Enregistrer un commentaire