android x86 disk io,java - Android SQLiteDiskIOException disk I/O error (code 522) - Stack Overflow

Yesterday from Crashlytics I noticed disk I/O error (code 522) while opening the database. Problem is that this crashed already has been reported from 16 users 36 times. Sadly I can't reproduce this error. Here's the code fragment where error occurs

SessionDbManager(Context context, String tripDbFileName) {

this.context = context;

this.tripDbFileName = tripDbFileName;

this.tripDbHelper = new SessionDbHelper(this.context, tripDbFileName);

SQLiteDatabase database = null;

int attempt = 1;

while (database == null) {

try {

database = this.tripDbHelper.getWritableDatabase(); // here's the error

} catch (android.database.sqlite.SQLiteException e) {

Crashlytics.logException(e);

XLog.e("Failed to load history data from database ", e);

if (attempt == 5) throw e;

}

attempt++;

}

db = database;

}

And here's the stack trace

Fatal Exception: android.database.sqlite.SQLiteDiskIOException: disk I/O error (code 522): , while compiling: PRAGMA journal_mode

at android.database.sqlite.SQLiteConnection.nativePrepareStatement(SQLiteConnection.java)

at android.database.sqlite.SQLiteConnection.acquirePreparedStatement(SQLiteConnection.java:932)

at android.database.sqlite.SQLiteConnection.executeForString(SQLiteConnection.java:677)

at android.database.sqlite.SQLiteConnection.setJournalMode(SQLiteConnection.java:363)

at android.database.sqlite.SQLiteConnection.setWalModeFromConfiguration(SQLiteConnection.java:337)

at android.database.sqlite.SQLiteConnection.open(SQLiteConnection.java:251)

at android.database.sqlite.SQLiteConnection.open(SQLiteConnection.java:195)

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:808)

at android.database.sqlite.SQLiteDatabase.open(SQLiteDatabase.java:793)

at android.database.sqlite.SQLiteDatabase.openDatabase(SQLiteDatabase.java:696)

at android.app.ContextImpl.openOrCreateDatabase(ContextImpl.java:737)

at android.content.ContextWrapper.openOrCreateDatabase(ContextWrapper.java:289)

at android.database.sqlite.SQLiteOpenHelper.getDatabaseLocked(SQLiteOpenHelper.java:223)

at android.database.sqlite.SQLiteOpenHelper.getWritableDatabase(SQLiteOpenHelper.java:163)

at eu.fishingapp.data.sql.session.SessionDbManager.(SourceFile:51)

at eu.fishingapp.data.sql.session.SessionContentProvider.update(SourceFile:753)

at android.content.ContentProvider$Transport.update(ContentProvider.java:384)

at android.content.ContentResolver.update(ContentResolver.java:1412)

at eu.fishingapp.data.sql.session.SessionDbHelper.renameSessionDb(SourceFile:584)

at eu.fishingapp.data.network.synchronization.FileSyncServiceImpl.uploadFile(SourceFile:462)

at eu.fishingapp.data.network.synchronization.FileSyncServiceImpl.uploadSessions(SourceFile:221)

at eu.fishingapp.data.network.synchronization.FileSyncServiceImpl.uploadSessionsFiles(SourceFile:243)

at eu.fishingapp.data.network.synchronization.FileSyncIntentService.onHandleIntent(SourceFile:116)

at android.app.IntentService$ServiceHandler.handleMessage(IntentService.java:67)

at android.os.Handler.dispatchMessage(Handler.java:102)

at android.os.Looper.loop(Looper.java:154)

at android.os.HandlerThread.run(HandlerThread.java:61)

I have read about I/O error and found two possible answers I was thinking that this is because users ran out of free space on their devices. But here's some images from two app users

A48x3.png

W2Hqm.png

So this is definitely not storage issue :( Any ideas how to solve this problem?

EDIT: targetSdk version 22

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值