Open latsson opened 4 days ago
Hmm it's weird that coil is returning a null entry from its disk cache despite reporting a non-null disk cache key. https://github.com/saket/telephoto/blob/dd794df0fb8a007d8e92abab9707bb54071e592b/zoomable-image/coil/src/main/kotlin/me/saket/telephoto/zoomable/coil/CoilImageSource.kt#L181-L189
@latsson Are there any other useful breadcrumbs left by your error reporting service?
@colinrtwhite are there any other edge cases related to disk caching that I might be missing?
This is probably another example of why I wish Coil had a public API for downloading images to disk.
Hmm it's weird that coil is returning a null entry from its disk cache despite reporting a non-null disk cache key.
@latsson Are there any other useful breadcrumbs left by your error reporting service?
Sadly nothing other of interest 😐 It's just twice as common as the other 2 I wrote about.
@saket I think there's a couple potential cases where result.diskCacheKey
could be non-null by the time openSnapshot
is called:
openSnapshot
is called. Coil's DiskCache
doesn't allow simultaneous reads + writes as it's not possible since it exposes the underlying file path.openSnapshot
is called. The system can do this at any time, though I believe it won't delete files with an open source
/sink
(not 100% on this).I think what Telefoto is looking for is an atomic API that writes the image data to disk then immediately opens a source
for the file. That way we avoid the race condition between writing the image data and calling openSnapshot
.
Could you open a feature request on Coil's tracker so we can track? 🙏🏻
Hey!
Thanks for a really nice library. This is the only one I found in Compose that keeps the quality of the image while zooming.
When rolling this out in a large app we have noticed a bunch of crashes. This seems to happen for all devices on all OS versions. No idea how to reproduce it though.
My code (inside a HorizontalPager)
Version used:
telephotoZoomableImageCoil = { module = "me.saket.telephoto:zoomable-image-coil", version = "0.13.0" }