Description
Previous ID | SR-11604 |
Radar | rdar://problem/56255388 |
Original Reporter | @onevcat |
Type | Bug |
Additional Detail from JIRA
Votes | 5 |
Component/s | |
Labels | Bug, 5.1Regression, RunTimeCrash |
Assignee | None |
Priority | Medium |
md5: d36a13569622b21b1974997a6856dfa0
Issue Description:
What
A crash happens in the package code when used as a Swift Package Manager dependency.
This only happens only in Xcode 11.2 beta 1 & beta 2. The same code / project works well in Xcode 11.0 and Xcode 11.1. So I believe it is a regression of either Swift compiler or Swift Package Manager (or build system).
It says EXC_BAD_INSTRUCTION but there is no other clue. I have no idea on the reason.
How
Sample repo:
https://github.com/onevcat/Kingfisher-Crash
It is a SwiftUI project, with Kingfisher imported by Swift Package Manager. The ContentView just uses KFImage to load an image from Internet.
Expected
The image loaded and a cat image shown in the middle of the screen.
Actual
The app crashes inside some initializer code in Kingfisher.
Screenshot of the crash:
https://user-images.githubusercontent.com/1019875/66711980-a9d80d80-edd0-11e9-95c8-5d221d0c548c.png
Notes
The same project and integration way works fine on Xcode 11.0 and Xcode 11.1.
With Xcode 11.2 beta / beta 2, the app crashes not only on iOS 13.2 beta, but also crashes on iOS 13.1. So I guess it is more likely a compiler or build system issue?
There is also a related issue reported by Kingfisher community:
Thanks and I appreciate it if you have a chance to look into it! Let me know if you need more information or have any progress on it.