Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[SR-12481] Forgetting SnapKit import leads to Segmentation Fault #54921

Closed
swift-ci opened this issue Apr 1, 2020 · 0 comments
Closed

[SR-12481] Forgetting SnapKit import leads to Segmentation Fault #54921

swift-ci opened this issue Apr 1, 2020 · 0 comments
Labels
bug A deviation from expected or documented behavior. Also: expected but undesirable behavior. compiler The Swift compiler in itself

Comments

@swift-ci
Copy link
Collaborator

swift-ci commented Apr 1, 2020

Previous ID SR-12481
Radar None
Original Reporter skhillon (JIRA User)
Type Bug
Status Closed
Resolution Invalid

Attachment: Download

Environment

Apple Swift version 5.2 (swiftlang-1103.0.32.1 clang-1103.0.32.29)
Target: x86_64-apple-darwin19.3.0

Xcode Version 11.4 (11E146)

Additional Detail from JIRA
Votes 0
Component/s Compiler
Labels Bug
Assignee None
Priority Medium

md5: 0f84016f3ea42d7561bec2c98825e722

Issue Description:

In one of my view controllers, I had the following code to layout a label using [SnapKit|http://snapkit.io/], but I had forgotten to actually `import SnapKit`:

noResultsLabel.snp.makeConstraints { make in
  make.center.equalToSuperview()
  make.left.right.equalToSuperview()
}

When I tried to build, I got "Segmentation Fault: 11". All I needed was a warning that I hadn't imported SnapKit, or just that the `snp` property was not defined in the current context.

I have attached the stack trace I received when the segmentation fault happened. I had forgotten to import SnapKit inside `ResultsViewController.swift`.

@swift-ci swift-ci transferred this issue from apple/swift-issues Apr 25, 2022
This issue was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug A deviation from expected or documented behavior. Also: expected but undesirable behavior. compiler The Swift compiler in itself
Projects
None yet
Development

No branches or pull requests

1 participant