Kingfisher crashes when rendering a KFImage in SwiftUI

Created on 6 Oct 2019  路  8Comments  路  Source: onevcat/Kingfisher

Issue Description

I'm rendering a pretty basic KFImage with:

KFImage(URL(string: 'https://blah.com/some-image.jpg'))

and when I'm compiling the app, I'm getting this error:
Screen Shot 2019-10-05 at 10 10 44 PM

I'm a bit new to swift development, so pardon any ignorance on my end, but I have no idea how to solve this problem and I think it could possibly be an issue with this library? I'm using it correctly as far as I can tell

Reproduce

I think this should happen on any SwiftUI app. I installed KingfisherSwiftUI with the swift package manager and have tried 5.8.1 and 5.8.2. I had everything working fine on 5.8.1 and with ios 13.1.1, but I upgraded to ios 13.2 and I think that may be the cause of the crash.

Other Comment

Thanks for the great library! As someone that hasn't done much iOS dev yet, this has made it way easier with downloading images + displaying them.

Most helpful comment

I believe it is a bug of current Xcode 11.2 beta. There is no clue why this happens and I suggest wait for another beta version. Until then, you can use Xcode 11.0 or 11.1 GM, in which it should work fine.

All 8 comments

I believe it is a bug of current Xcode 11.2 beta. There is no clue why this happens and I suggest wait for another beta version. Until then, you can use Xcode 11.0 or 11.1 GM, in which it should work fine.

Sounds good, thank you! Yeah I downgraded to 11.1 and it's working again

Anyone know any workarounds for this? If I downgrade to 11.1 I get a compiler error somewhere else in SwiftUI 馃槃

There is no workaround, the only thing would report this to Apple and wait for another beta.

I downgrade to 11.1 I get a compiler error somewhere else in SwiftUI

It should not happen. Maybe it is related to some ambiguous. I suggest you check #1305 to see whether it could help.

The same issue still happens in Xcode 11.2 beta 2. I created an issue in Swift bug tracking system: https://bugs.swift.org/browse/SR-11604

I am reopening it for better tracking of this issue. Please comment there if there is any new information.

Any update on this?

I've just ran across the same issue with Xcode 11.2 beta.

1330 contains more detail on this issue, so it is tracked there instead.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

jacowu picture jacowu  路  4Comments

iLucas97 picture iLucas97  路  5Comments

sindresorhus picture sindresorhus  路  3Comments

Tarpsvo picture Tarpsvo  路  5Comments

sadeghgoo picture sadeghgoo  路  4Comments