Images are not shown reliably
See original GitHub issueDescribe the bug If I inflate a layout, add it to a parent view and load an image into image view (one from my resources) I do so empty images every now and then.
E.g. I do create a menu dialog and for simplicity, I do add menu entries manually into a parent list view like following:
// following happens in a loop:
val b = DialogAppItemBinding.inflate(layoutInflater, binding.llRoot, true)
b.ivIcon.loadAny(item.icon) // this is a resource id
Expected behavior The image should always be loaded.
To Reproduce I can’t reproduce it reliably, it happens every now and then… Like in 1-2%
Logs/Screenshots
Version 1.1.1
My used image loader setup looks like following:
fun init(context: Context) {
imageLoader = ImageLoader.Builder(context)
.crossfade(false)
.componentRegistry {
// Fetchers
add(AppIconFetcher(context))
//add(AppIconFetcher2(context))
// Decoders
// ...
}
.okHttpClient {
//val cacheDirectory = File(context.cacheDir, "image_cache").apply { mkdirs() }
//val cacheSize = 250L * 1024 * 1024 // 250MB
//val cache = Cache(cacheDirectory, cacheSize)
OkHttpClient.Builder()
.cache(CoilUtils.createDefaultCache(context))
.build()
}
.apply {
// Enable logging to the standard Android log if this is a debug build.
if (BuildConfig.DEBUG) {
//logger(DebugLogger(Log.VERBOSE))
}
}
// Workaround wegen issue: https://github.com/coil-kt/coil/issues/567
.bitmapPoolingEnabled(false)
//.launchInterceptorChainOnMainThread(false)
.build()
Coil.setImageLoader(imageLoader)
}
Issue Analytics
- State:
- Created 2 years ago
- Comments:10 (4 by maintainers)
Top Results From Across the Web
Images not showing up reliably in List on iOS 16 #1988
1), KFImage s frequently fail to show up when used inside List / ForEach . We're using them as part of a more...
Read more >Why Are My Images Not Showing Up in Figma?
There are a few potential reasons why Figma might not be displaying images correctly. First, ensure that the image is hosted on a...
Read more >If My Photo Stream isn't updating
Learn what to do if photos aren't showing up in My Photo Stream on your iPhone, iPad, iPod touch, Mac, or Apple TV....
Read more >Can't Upload Images to WordPress Media Library?
If your Media Library is loading but not showing images, there are two primary causes: an incompatible plugin, and improper file permissions ......
Read more >The Reliability of Image Representation - Spreadys.blog
Misunderstanding, incorrect handling, poor analysis and biased presentation will put innocent people behind bars. It's not CCTV's fault! Second.
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
I run my test project with 1.2.2 and it looks really good - I can’t reproduce the issue anymore in ~200 runs. Thanks
@MFlisar I just pushed
1.2.2
which includes a fix for a race condition that could cause this issue. Can you let me know if you’re still seeing the issue on the latest version?