[SR-11604] Crash with EXC_BAD_INSTRUCTION on Xcode 11.2 beta & beta 2 with SPM #54011
Labels
bug
A deviation from expected or documented behavior. Also: expected but undesirable behavior.
crash
Bug: A crash, i.e., an abnormal termination of software
regression
run-time crash
Bug → crash: Swift code crashed during execution
swift 5.1
Additional Detail from JIRA
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:
onevcat/Kingfisher#1306
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.
The text was updated successfully, but these errors were encountered: