-
Notifications
You must be signed in to change notification settings - Fork 25
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Concurrent modification exception in Disk Cache #75
Comments
related to #66 |
try |
[versions]
kamel = "0.9.0"
[libraries]
kamel = { module = "media.kamel:kamel-image", version.ref = "kamel" }
Same issue @luca992 even in LazyColumn/Row/Grid |
I guess it won't be an easy fix, as clearly stately isn't helping. If you can fork and modify the sample project in the project with an example that causes it in a somewhat reproducible way, that would be a big help. |
Just add a random LazyColumn/Row/Grid with lots of elements that contain images and try to scroll really fast, it'll crash all the time. I'll try to add a sample. |
Yes, the problem is still reproducible with the following stack trace: But I guess that issue already exist: touchlab/Stately#105 |
The Stately's implementation does not work properly on JVM targets causing ConcurrentModificationException touchlab/Stately#105 Kamel-Media#75
released update |
I'm using KamelImage in LazyColumn, and this crash in release versions 0.9.1 and 0.9.2 still exist. Previous version that i use in our project 0.7.0 is ok.
|
@1Avalanche 😓 might have to drop use of cache4k for the LruCache as it also is using stately and this issue hasn't been resolved |
@1Avalanche try lmk how it goes. |
I'm using KamelImage in LazyVerticalGrid and encountering this crash when I try to scroll very quickly.
FATAL EXCEPTION: DefaultDispatcher-worker-25
java.util.ConcurrentModificationException
at java.util.LinkedHashMap$LinkedHashIterator.nextNode(LinkedHashMap.java:760)
at java.util.LinkedHashMap$LinkedValueIterator.next(LinkedHashMap.java:787)
at io.kamel.core.cache.disk.DiskLruCache.removeOldestEntry(DiskLruCache.kt:613)
at io.kamel.core.cache.disk.DiskLruCache.trimToSize(DiskLruCache.kt:606)
at io.kamel.core.cache.disk.DiskLruCache.access$trimToSize(DiskLruCache.kt:91)
at io.kamel.core.cache.disk.DiskLruCache$launchCleanup$1$1.invokeSuspend(DiskLruCache.kt:652)
at kotlin.coroutines.jvm.internal.BaseContinuationImpl.resumeWith(ContinuationImpl.kt:33)
at kotlinx.coroutines.DispatchedTask.run(DispatchedTask.kt:108)
at kotlinx.coroutines.internal.LimitedDispatcher$Worker.run(LimitedDispatcher.kt:115)
at kotlinx.coroutines.scheduling.TaskImpl.run(Tasks.kt:103)
at kotlinx.coroutines.scheduling.CoroutineScheduler.runSafely(CoroutineScheduler.kt:584)
at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.executeTask(CoroutineScheduler.kt:793)
at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.runWorker(CoroutineScheduler.kt:697)
at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.run(CoroutineScheduler.kt:684)
Suppressed: kotlinx.coroutines.internal.DiagnosticCoroutineContextException: [StandaloneCoroutine{Cancelling}@dfa9a16, Dispatchers.IO]
The text was updated successfully, but these errors were encountered: