You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The database is not closed and if you use StrictMode on Android it crashes with:
StrictMode policy violation: android.os.strictmode.LeakedClosableViolation: A resource was acquired at attached stack trace but never released. See java.io.Closeable for information on avoiding resource leaks. (Ask Gemini)
at android.os.StrictMode$AndroidCloseGuardReporter.report(StrictMode.java:2009)
at dalvik.system.CloseGuard.warnIfOpen(CloseGuard.java:336)
at android.database.sqlite.SQLiteDatabase.dispose(SQLiteDatabase.java:544)
at android.database.sqlite.SQLiteDatabase.finalize(SQLiteDatabase.java:528)
at java.lang.Daemons$FinalizerDaemon.doFinalize(Daemons.java:370)
at java.lang.Daemons$FinalizerDaemon.processReference(Daemons.java:350)
at java.lang.Daemons$FinalizerDaemon.runInternal(Daemons.java:322)
at java.lang.Daemons$Daemon.run(Daemons.java:131)
at java.lang.Thread.run(Thread.java:1012)
Caused by: java.lang.Throwable: Explicit termination method 'close' not called
at dalvik.system.CloseGuard.openWithCallSite(CloseGuard.java:288)
at dalvik.system.CloseGuard.open(CloseGuard.java:257)
at android.database.sqlite.SQLiteDatabase.openInner(SQLiteDatabase.java:1192)
at android.database.sqlite.SQLiteDatabase.open(SQLiteDatabase.java:1171)
at android.database.sqlite.SQLiteDatabase.openDatabase(SQLiteDatabase.java:1035)
at android.database.sqlite.SQLiteDatabase.openDatabase(SQLiteDatabase.java:1024)
at android.database.sqlite.SQLiteOpenHelper.getDatabaseLocked(SQLiteOpenHelper.java:373)
at android.database.sqlite.SQLiteOpenHelper.getReadableDatabase(SQLiteOpenHelper.java:340)
at androidx.media3.datasource.cache.CachedContentIndex$DatabaseStorage.exists(CachedContentIndex.java:788)
at androidx.media3.datasource.cache.CachedContentIndex.initialize(CachedContentIndex.java:203)
at androidx.media3.datasource.cache.SimpleCache.initialize(SimpleCache.java:549)
at androidx.media3.datasource.cache.SimpleCache.access$000(SimpleCache.java:51)
at androidx.media3.datasource.cache.SimpleCache$1.run(SimpleCache.java:235)
From a quick check of the code, this is actually true, plenty of call to get database, but no close anywhere.
Expected result
Databases are closed and resources freed.
Actual result
They are not
Media
N/A
Bug Report
You will email the zip file produced by adb bugreport to [email protected] after filing this issue.
The text was updated successfully, but these errors were encountered:
Version
Media3 main branch
More version details
No response
Devices that reproduce the issue
All
Devices that do not reproduce the issue
No response
Reproducible in the demo app?
Not tested
Reproduction steps
Create a SimpleCache instance:
use it.
call
.release()
on it.The database is not closed and if you use StrictMode on Android it crashes with:
From a quick check of the code, this is actually true, plenty of call to get database, but no close anywhere.
Expected result
Databases are closed and resources freed.
Actual result
They are not
Media
N/A
Bug Report
adb bugreport
to [email protected] after filing this issue.The text was updated successfully, but these errors were encountered: