Kingfisher: app crashs on iOS 14 when use Kingfisher in List
Hello
yes I know iOS 14 is still in beta but maybe it helps you 😉
I use kingfisher in a SwiftUI List to load pictures from urls.
The initial state is shown as expected, but when I start scrolling the app crashs with a Bad Access- Error.
If I delete the KFImage everything working well.
If I use the same url for every cell it also works fine.
Maybe there is some problem when SwiftUI tries to reuse the Cell and can’t load the image somehow.
Does anybody has an idea what to do ?
About this issue
- Original URL
- State: closed
- Created 4 years ago
- Reactions: 2
- Comments: 26 (12 by maintainers)
5.15.1 was released for this.
@onevcat MANY THANKS ! Your fix from the master branch is working well in my app !
I’ve sent feedback to Apple for this issue. I will leave it open for a while at least until the GM version comes out. Then we can check if there is a real solution for it.
That makes sense.
I dig into it a bit deeper, and now I can have a minimal reproducible example as below:
This crash happens when embedding any view that can change in an
HStackand around byNavigationLink. Obviously, it is not an issue in Kingfisher (as the example above has nothing to do with Kingfisher or any other complicate logic). It is a regression of SwiftUI shipped on iOS 14 beta.I will try to see if I can give a workaround for it now. But I guess it is more important to report it through feedback/radar (I will do it later today) and expect Apple has a fix on it in the final release.