-
Notifications
You must be signed in to change notification settings - Fork 641
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
Native ANR when decoding bitmap #1810
Comments
Unfortunately the crash still happens with this Maybe this can help you. In this stacktrace there are a few calls to your sdk.
|
What API levels does this occur on? Is there a subset of devices that this occurs on? |
@colinrtwhite It happens mainly (99%) on Pixel 7, Pixel 7a and Pixel 7 Pro Devices. So the API is fixed to 33. I tested some other Image Loading libraries (e.g. Glide). And the issue does not appear here. So it seams to be a really strange bug in the coil library. If i can try some things to give you more information please let me know. we definitly love your library and don´t want to change to another one. |
@Bodo1981 It looks like the ANR is occurring inside the Unfortunately it's tough for me to figure out the issue without a sample that reproduces it. |
@colinrtwhite The crash still exists if i remove the DiskCache. But I was able to create a sample where you can reproduce it: You can checkout this sample and when you open it on a Pixel 7 device (e.g. i tried it on Pixel 7 Pro) and you scroll through the list of images and webviews you get the crash. it does not always crash immediatelly but it definitly crashes. you should also not scroll to fast so that every image gets loaded. it would be great if you can check it out and tell me if you can also reproduce the crash |
@Bodo1981 Thanks for the repro. Unfortunately I don't have access to a Pixel 7, but once I get access to one I'll circle back and take a look. |
For visibility, the same issue has been reported in the Android Public Tracker (by the same author). We also use Coil and WebViews in a |
@esnaultdev Thx for jumping into this issue too. I reased it here and at google because i recently talked to a google developer and he told me that it is better to have both sides (webview = google and coil = here) informed about the issue. @colinrtwhite do you know when you have a chance to get hands on the new devices to check this or maybe can i help you directly? PS: for all others please vote for this issue to get it fixed faster. thanks |
Any progress on this issue. Let me know if i can help you with further informations. This task is really important for our company so it would be great if you can have a look at it. |
@Bodo1981 I haven't had a chance to look into this. If you're able to track down the issue locally, I'd accept a PR that patches the issue. Unfortunately this sounds like a device-specific issue, which are generally tough to work around. Have you tried disabling hardware bitmaps with |
@Bodo1981 Still facing the issue ? |
Describe the bug
We have a very big app with a lot of background threads. The codebase is mixed Java / Kotlin and the Layout Framework too (View / Compose). That´s why we use your library for image loading. Unfortunately we get a lot of ANR when trying to decode bitmaps. Especially on the new Google Pixel 7(a) Pro Devices. But sometimes on others too. This ANR seems only to happen, when webviews (e.g. Ads) and imageloading happens on the same screen. If we disable webviews OR imageloading everything is fine. I know it sounds weird but this really happens.
We find a workaround which seems to work. If i set
ImageLoader.decoderDispatchers(Dispatchers.Main.Immediate)
it works much better and at the moment we don´t get this ANR.To Reproduce
Very fast scroll a recyclerview in a screen with webviews and other views with images and the default decoderDispatchers. Unfortunatelly I can´t provide a sample because I can not reproduce it with a sample. And I can´t share this app because I am not allowed to. But maybe this information helps you finding the bug. If you have any question I will definitly try to answer you and help you finding this weird bug.
Logs/Screenshots
I am not allowed to share this.
Version
I am using the version 2.4.0
The text was updated successfully, but these errors were encountered: