Closed siarhei-luskanau closed 9 months ago
Does it still occur if you set this to false?
I have tried to add the .addLastModifiedToFileCacheKey(false)
in my pet project, but the DiskReadViolation
still occur
@siarhei-luskanau I'm not able to reproduce the strict mode violation in this sample. Can you post the full exception? Strict mode should print the callsite in the logs before the exception posted above.
From your callsite it looks like it's triggered by Android and is unrelated to Coil:
at java.io.File.exists(File.java:813)
at com.android.server.locales.LocaleManagerService.getOverrideLocaleConfig(LocaleManagerService.java:766)
at com.android.server.locales.LocaleManagerService$LocaleManagerBinderService.getOverrideLocaleConfig(LocaleManagerService.java:215)
at android.app.ILocaleManager$Stub.onTransact(ILocaleManager.java:175)
Closing this out since the strict mode warning appears to be caused by LocaleManagerService
.
@siarhei-luskanau I'm not able to reproduce the strict mode violation in this sample. Can you post the full exception? Strict mode should print the callsite in the logs before the exception posted above.
From your callsite it looks like it's triggered by Android and is unrelated to Coil:
at java.io.File.exists(File.java:813) at com.android.server.locales.LocaleManagerService.getOverrideLocaleConfig(LocaleManagerService.java:766) at com.android.server.locales.LocaleManagerService$LocaleManagerBinderService.getOverrideLocaleConfig(LocaleManagerService.java:215) at android.app.ILocaleManager$Stub.onTransact(ILocaleManager.java:175)
@colinrtwhite My pet project in main branch uses io.github.qdsfdhvh:image-loader
image loader library. In that case I have no any issue with Android StrictMode.
In coin branch I have migrated to coil3
image library and faced with Android StrictMode issue.
I see that stacktrace doesn't mentioned the coil3
. Anyway I'm sure that Android StrictMode issue appear due adding coil3
image library.
I think there might be a strict mode failure in the sample related to a leaked closable - not file system access on the main thread. Let's reopen to track.
Closing as fixed by Compose 1.6.0-alpha01
. https://github.com/coil-kt/coil/pull/2093#issue-2111048894
Android StrictMode causes crashes with DiskReadViolation Coil version is 3.0.0-alpha01
To Reproduce:
samples/compose/src/androidMain/kotlin/sample/compose/MainActivity.kt
. Or checkout the3.x_StrictMode
branch https://github.com/siarhei-luskanau/coil/tree/3.x_StrictModesamples.compose
application and see the app crashStacktrace:
Expected result: No crashes with Android StrictMode