They are the result of trying to reduce to a minimal amount of code. At first it was possible to delete whole files from the project while still being able to reproduce the crash. Only later on a simple removal of some unrelated file resulted in the crash to disappear suddenly.
Why does removing some of these UnrelatedClass....swift fix the crash?
No idea. But it's simple to "reproduce", just remove a few and execute ./test.sh.
There's other unrelated changes that magically fixes the issue, for example:
diff --git a/ECGMessageBox/Classes/Internal/ConversationListViewController.swift b/ECGMessageBox/Classes/Internal/ConversationListViewController.swift
index 0ab8986..f625306 100644
--- a/ECGMessageBox/Classes/Internal/ConversationListViewController.swift
+++ b/ECGMessageBox/Classes/Internal/ConversationListViewController.swift
@@ -1,11 +1,4 @@
import UIKit
class ConversationListViewController: UIViewController {
- init(messageBox: MessageBox) {
- super.init(nibName: nil, bundle: nil)
- }
-
- required init?(coder aDecoder: NSCoder) {
- fatalError("init(coder:) has not been implemented")
- }
}
It seems that switching to SWIFT_COMPILATION_MODE=wholemodule works around the issue. I have not verified this in the given example project, but in our "real" project.
Environment
Apple Swift version 5.0.1 (swiftlang-1001.0.82.4 clang-1001.0.46.5), Target: x86_64-apple-darwin18.5.0
MacBook Pro (15-inch, 2017)
Xcode 10.2.1, Build version 10E1001
iPhone X Simulator, 11.4
macOS Mojave, 10.14.4 (18E226)
Additional Detail from JIRA
md5: 1e61a629e5650d8fc01ee777878a07d5
Issue Description:
Description
The example project demonstrates some crash. Reason for the crash is unknown, could be a project misconfiguration, or a bug in the compiler.
The full example project can be found here: https://github.com/plu/SR-10622
Notes
What are these UnrelatedClass....swift?
They are the result of trying to reduce to a minimal amount of code. At first it was possible to delete whole files from the project while still being able to reproduce the crash. Only later on a simple removal of some unrelated file resulted in the crash to disappear suddenly.
Why does removing some of these UnrelatedClass....swift fix the crash?
No idea. But it's simple to "reproduce", just remove a few and execute
./test.sh
.There's other unrelated changes that magically fixes the issue, for example:
How to reproduce
Crash
The text was updated successfully, but these errors were encountered: