[SR-10828] Xcode 10.2.1 + Swift 4: NSForwarding object of class does not implement doesNotRecognizeSelector: #53218
Labels
bug
A deviation from expected or documented behavior. Also: expected but undesirable behavior.
compiler
The Swift compiler in itself
crash
Bug: A crash, i.e., an abnormal termination of software
run-time crash
Bug → crash: Swift code crashed during execution
runtime
The Swift Runtime
Attachment: Download
Environment
macOS 10.4.5
Xcode 10.2.1 (10E1001)
SWIFT_VERSION = 4
Working configuration:
Xcode 10.1 (10B61)
SWIFT_VERSION = 4
Additional Detail from JIRA
md5: e4a26fee88012b07c118102624815b26
Issue Description:
After migrating our code base to Xcode 10.2.1, I've started experiencing a crash on app start. Interestingly, if I build the same codebase using Xcode 10.1, app does not crash.
A complete stacktrace is available here: https://gist.github.com/beefon/3141c8e2c6857ef5a8f0207be6f22e14
A topmost frame's `register read` provides the following contents: https://gist.github.com/beefon/224f0b6638476d3ad92a08994f5157f3
If I choose `CALLING_SOME_+initialize_METHOD` frame and inspect registers, I can find an address of an object being messaged with `+initialize`. And if I `po (BOOL)[0x0bjectAddress respondsToSelector:@selector(initialize)`, it prints YES: https://gist.github.com/beefon/cdc4ef98de64a7bdcb6db0dcc6d84ea2
By remembering ObjC, I assume it attempts to call +initialize, and then it attempts to forward that invocation.
lldb does not print any logs, but if I understand correctly, the message says that TextFieldInputView class does not implement doesNotRecognizeSelector:. The problem is that TextFieldInputView subclasses WrapperView<T>, which in turn is actually UIView.
How could I debug this and make my app not crash on start?
The text was updated successfully, but these errors were encountered: