Closed greese closed 3 years ago
Hey, thank you for reporting. This looks like thread explosion, what explains why you encounter it when there are many images. Which device/OS version you running?
tvOS, both in simulator and on device (Apple 4k for both). It's a free app in the App Store called Sparq Festival Platform if it helps to look at it.
It does load a lot of images. Basically, it's a streaming platform and we have rows of lazyhstacks forming a carousel of content on each page.
Hey, version 2.2.5 limits number of concurrent operations with disk cache. This should solve the problem.
Thank you!
— George Reese @.*** +1.612.991.4446
On Wednesday, Apr 28, 2021 at 13:41, Dmytro Anokhin @. @.)> wrote:
Hey, version 2.2.5 limits number of concurrent operations with disk cache. This should solve the problem.
— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub (https://github.com/dmytro-anokhin/url-image/issues/146#issuecomment-828691007), or unsubscribe (https://github.com/notifications/unsubscribe-auth/AABZI5WKH72V4CUWO7NZUE3TLBJGJANCNFSM43NUBYLQ).
I think there's a bug in here in ImageDecoder.swift:
... case .asynchronous: // Don't consider the subsamplingLevel when comparing the image native size with sizeForDrawing. guard var size = frameSize(at: index) else { return nil }
...
I am getting an occasional crash here and it appears to occur when there is reloading images from the cache. If I felt more confident in my Swift, I'd wrap that bolded line in a DispatchQueue.main.async { } block as I think what is happening is that it's trying to update the UI from outside the main queue. Maybe?
In particular, it seems this code is running inside the DiskCache decode queue.
As with any async bug based on reloading junk from cache, this is a pain to actually make happen. But the most common scenario is when I am navigating from one view to a previously viewed view with a lot of images in it.