gpt4 book ai didi

ios - 命令因信号 : Segmentation fault: 11? 而失败

转载 作者:行者123 更新时间:2023-11-28 08:57:43 27 4
gpt4 key购买 nike

我收到 command failed due to signal: Segmentation fault: 11? 错误,但我不太清楚这是为什么?它确实在调试器中提供了以下响应,但指向以下代码:

1.  While type-checking 'textFieldShouldEndEditing' at /Users/macbookair1/Documents/programming/MyApp/MyApp/SignUpViewController.swift:224:5
2. While type-checking expression at [/Users/macbookair1/Documents/programming/MyApp/MyApp/SignUpViewController.swift:231:9 - line:252:11] RangeText="query.findObjectsInBackgroundWithBlock {
(objects: [AnyObject]?, error: NSError?) in
if error == nil {
if (objects!.count > 0){


if (UIApplication.sharedApplication().delegate as! AppDelegate).signUpOn {
let myAlert = SCLAlertView().showError("Woah There", subTitle: "username \(textField.text!) is already taken", closeButtonTitle: "Got It")
myAlert.alertview.contentView.backgroundColor = UIColor(red:1.0, green:0.18, blue:0.18, alpha:1.0)
myAlert.alertview.circleBG.backgroundColor = UIColor(red:1.0, green:0.18, blue:0.18, alpha:1.0)
myAlert.alertview.labelTitle.textColor = UIColor.whiteColor()
myAlert.alertview.contentView.layer.borderColor = UIColor(red:1.0, green:0.18, blue:0.18, alpha:1.0).CGColor
myAlert.alertview.viewText.textColor = UIColor.whiteColor()
myAlert.alertview.viewText.backgroundColor = UIColor(red:1.0, green:0.18, blue:0.18, alpha:1.0)
}
} else {
print("Username is available.")
}
} else {
print("error")
}
}"

另一个指向这段代码:

1.  While type-checking 'loadBooks' at /Users/macbookair1/Documents/programming/MyApp/MyApp/ThirdCollectionViewController.swift:103:5
2. While type-checking expression at [/Users/macbookair1/Documents/programming/MyApp/MyApp/ThirdCollectionViewController.swift:108:9 - line:127:9] RangeText="query.findObjectsInBackgroundWithBlock { (objects: [AnyObject]?, error: NSError?) -> Void in
if error == nil {
self.books.removeAll()
let bookObjects = objects as! [PFObject]
for (_, object) in bookObjects.enumerate() {
self.books.append(Book(pfBook: object))
}
}else if let secondMessage = error?.userInfo["error"] as? String
where secondMessage == "The Internet connection appears to be offline." {
self.failedMessage(secondMessage)
self.activityIndicator.hidden = true
self.activityIndicator.stopAnimating()
}
dispatch_async(dispatch_get_main_queue()){

self.collectionView!.reloadData()
self.refreshControl.endRefreshing()
self.activityIndicator.stopAnimating()
}
}"

如何摆脱这个错误?

最佳答案

这是一种在编译 swift 时 LLVM 本身可能发生的错误。尝试使用替代表达式或使用更新版本的 swift(例如写作时的 2.0),我遇到过这种情况,某些时候表达式只会导致崩溃,而拆分分配甚至使用 objective-c 都不会导致崩溃.

关于ios - 命令因信号 : Segmentation fault: 11? 而失败,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/32661880/

27 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com