正在制作图像库,使我可以从收藏视图中选择多个图像,当我有趣时,我的代码避免是好的,但是当我按下选择按钮时,这个错误会发生"EXC_BAD_INSTRUCTION(code=EXC_1386_INVOP,subcode=0x0)“。
这是select按钮代码
@IBAction func Select(sender: AnyObject) {
var ckeck = AssetCell() as? AssetCell
ckeck!.CheckMarkView1.hidden = false // here it shows an error which is "T
Alamofire.request(.POST, endpoint, parameters: params)
.responseJSON { request, response, result in
switch result {
case .Success(let json):
var customerData:[String:AnyObject] = [String:AnyObject]()
// throws: Thread 1:EXC_BAD_INSTRUCTION (code=EXC_I386_
当我的应用程序尝试使用以下代码解压cookie数据时,它总是崩溃。
if cookieData.length > 0 {
let cookies: [NSHTTPCookie] = NSKeyedUnarchiver.unarchiveObjectWithData(cookieData) as! [NSHTTPCookie]
for cookie: NSHTTPCookie in cookies {
NSHTTPCookieStorage.sharedHTTPCookieStorage().setCookie(cookie)
}
}
我得到
我正在尝试使用CoreData,但每当我尝试存储对象时,都会收到EXC_BAD_INSTRUCTION (code=EXC_I386_INVOP,subcode=0x0)错误。可能导致此错误的原因是什么?顺便说一句,我最初创建项目时并不打算使用CoreData,所以后来我将CoreData添加到了我的项目中(我不知道这是否是导致问题的原因)。
lazy var managedObjectModel: NSManagedObjectModel = {
// The managed object model for the application. This propert
class ViewController: UIViewController {
override func viewDidLoad() {
// Do any additional setup after loading the view.
DispatchQueue.main.sync { //this line crashes with Thread 1 : EXC_BAD_INSTRUCTION (code=EXC_I386_INVOP, subcode=0x0)
print("Rohit Kumar")
执行被中断,原因:
EXC_BAD_INSTRUCTION (code=EXC_I386_INVOP,subcode=0x0)。
进程在被中断的地方留下,使用thread return -x返回表达式计算之前的状态。
import UIKit
func numberWhosePrimeFactorIsNeeded(_ number : Int) {
var a = 1
for primefactor in 2...600851475143 where number % primefactor == 0 {
let c = a * primefacto
import UIKit
var b = 3
assert(b <= 0, "this is impossible")
Xcode显示:“exc_bad_instruction (code=exc_i386_invop subcode=0x0)",有人有主意吗?!,我的Xcode有问题吗?有人知道设置操场优化级别在哪里吗?
当我编写case 2841001 ... 393200 :时调用了以下错误--我发现了我的错误(在第一个数字中有一个额外的数字,复制粘贴错误),但是我想学习如何使用“线程返回-x",在哪里配置它呢?
Playground execution aborted: Execution was interrupted, reason: EXC_BAD_INSTRUCTION (code=EXC_I386_INVOP, subcode=0x0).
The process has been left at the point where it was interrupted, use "t
在Xcode 9 Beta中试用Swift 4。
由于某些原因,当在NSObject上使用键值访问器时,我会崩溃。
有什么想法吗?
import Cocoa
class Person: NSObject {
var name = ""
var age = 0
}
let alpha = Person()
alpha.name = "Robert"
alpha.age = 53
alpha.value(forKey: "name")
// error: Execution was interrupted, reason: EX