ExoPlayer icon indicating copy to clipboard operation
ExoPlayer copied to clipboard

SQLiteDiskIOException disk I/O error (code 4874 SQLITE_IOERR_SHMSIZE)

Open tuesda opened this issue 4 years ago • 3 comments

  • Clear reproduction steps including observed and expected behavior

    • reproduction steps:

      • when device receive 'DEVICE_STORAGE_LOW' event
      • create SimpleCache object
    • expected:

      • no crash
  • Output of running "adb bugreport" in the console shortly after encountering

SQLiteDiskIOException
disk I/O error (code 4874 SQLITE_IOERR_SHMSIZE)
android.database.sqlite.SQLiteConnection in nativeExecuteForLong
android.database.sqlite.SQLiteConnection in executeForLong at line 655
android.database.sqlite.SQLiteSession in executeForLong at line 652
android.database.sqlite.SQLiteStatement in simpleQueryForLong at line 107
android.database.DatabaseUtils in longForQuery at line 842
android.database.DatabaseUtils in longForQuery at line 830
android.database.sqlite.SQLiteDatabase in getVersion at line 956
android.database.sqlite.SQLiteOpenHelper in getDatabaseLocked at line 371
android.database.sqlite.SQLiteOpenHelper in getReadableDatabase at line 322
com.google.android.exoplayer2.upstream.cache.CachedContentIndex$DatabaseStorage in exists at line 799
com.google.android.exoplayer2.upstream.cache.CachedContentIndex in initialize at line 202
com.google.android.exoplayer2.upstream.cache.SimpleCache in initialize at line 582
com.google.android.exoplayer2.upstream.cache.SimpleCache in access$000 at line 49
com.google.android.exoplayer2.upstream.cache.SimpleCache$1 in run at line 268
  • ExoPlayer version number: 2.14.0
  • Android version: Android 9
  • Android device: Meizu 16T

tuesda avatar Nov 16 '21 08:11 tuesda

Seems like it crashes when opening the database for reading in case of a disk full. Seems like that the error thrown shouldn't be a SQLiteDiskIOException in the first place. This would result in a playback failure which can be handled in a more graceful way.

Thanks for reporting!

marcbaechinger avatar Nov 19 '21 16:11 marcbaechinger

same here

android.database.sqlite.SQLiteDiskIOException

disk I/O error (code 4874 SQLITE_IOERR_SHMSIZE)
android.database.sqlite.SQLiteConnection.nativeExecuteForLong(Native Method)
android.database.sqlite.SQLiteConnection.executeForLong(SQLiteConnection.java:612)
android.database.sqlite.SQLiteSession.executeForLong(SQLiteSession.java:652)
android.database.sqlite.SQLiteStatement.simpleQueryForLong(SQLiteStatement.java:107)
android.database.DatabaseUtils.longForQuery(DatabaseUtils.java:842)
android.database.DatabaseUtils.longForQuery(DatabaseUtils.java:830)
android.database.sqlite.SQLiteDatabase.getVersion(SQLiteDatabase.java:956)
android.database.sqlite.SQLiteOpenHelper.getDatabaseLocked(SQLiteOpenHelper.java:371)
android.database.sqlite.SQLiteOpenHelper.getReadableDatabase(SQLiteOpenHelper.java:322)
z60$a.exists(SourceFile:2)
z60.initialize(SourceFile:4)
com.google.android.exoplayer2.upstream.cache.c.initialize(SourceFile:13)
com.google.android.exoplayer2.upstream.cache.c.a(SourceFile:1)
com.google.android.exoplayer2.upstream.cache.c$a.run(SourceFile:3)

ExoPlayer version number: 2.16.0 Android version: Android 9 Android device: XiaoMi Note 3

https://www.sqlite.org/rescode.html#ioerr_shmsize

y4n9b0 avatar Aug 02 '22 02:08 y4n9b0