Xcode:EXC_BREAKPOINT(EXC_ARM_BREAKPOINT,子代码= 0xe7ffdefe) [英] Xcode: EXC_BREAKPOINT (EXC_ARM_BREAKPOINT, subcode=0xe7ffdefe)

查看:613
本文介绍了Xcode:EXC_BREAKPOINT(EXC_ARM_BREAKPOINT,子代码= 0xe7ffdefe)的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在iOS7设备上运行我的应用时收到EXC_BREAKPOINT(EXC_ARM_BREAKPOINT,子码= 0xe7ffdefe)错误。
问题是,它在iOS7模拟器上运行顺畅。



通过使用断点,我发现错误发生在第6行。

 必需init(编码器aDecoder:NSCoder){
personPicker = ABPeoplePickerNavigationController()
super.init(编码器:aDecoder)
personPicker.peoplePickerDelegate = self
}
/ * error line * / @IBAction func BPressed(sender:AnyObject){
self.presentViewController(personPicker,animated:true,completion:nil )
}

此错误是新的,直到我才出现在我的设备上已将这些行添加到代码中;

  let url = NSURL(string:urlPath)
let request = NSURLRequest (URL:url!)
NSURLConnection.sendAsynchronousRequest(request,queue:NSOperationQueue.mainQueue()){b(b,响应,数据,错误)
println(NSString(data:data,encoding:NSUTF8StringEncoding))
}

此外;调试器将错误指向此行:

  0x16a7f0:陷阱

并在控制台中提供此输出:


致命错误:尝试从空指针创建一个非托管实例


即使我在故事板中没有更改任何内容,此错误也会导致设备出现黑屏。 / p>

感谢您抽出宝贵时间。



编辑:此错误显示搜索引擎没有结果,但我认为它可能与obj-c有关。

解决方案

今天我在针对旧iPad 2测试一些Swift代码时遇到了这个问题(我认为它是iPad 2 - 它的型号为MD368LL / A),运行iOS 8.1.3。事实证明,问题出现在我所谓的地方:

  Int(arc4random()%< someInt>) 

这适用于以后的iPad,iPhone5S,iPhone6等。通过将代码更改为:

  Int(UInt32(arc4random())%UInt32(< someInt>))

我认为这是旧硬件上的寄存器溢出。


I'm getting an EXC_BREAKPOINT (EXC_ARM_BREAKPOINT, subcode=0xe7ffdefe) error while running my app on a iOS7 device. The thing is, it runs smoothly on iOS7 simulator.

By using breakpoints, I've found the error occurs in line 6.

required init(coder aDecoder: NSCoder) {
    personPicker = ABPeoplePickerNavigationController()
    super.init(coder: aDecoder)
    personPicker.peoplePickerDelegate = self
}
 /*error line*/ @IBAction func BPressed(sender: AnyObject) {
 self.presentViewController(personPicker, animated: true, completion: nil)
}

This error is new, and didn't appeared on my device until I've added these lines into the code;

        let url = NSURL(string: urlPath)
        let request = NSURLRequest(URL: url!)
        NSURLConnection.sendAsynchronousRequest(request, queue: NSOperationQueue.mainQueue()) {(response, data, error) in
            println(NSString(data: data, encoding: NSUTF8StringEncoding))
        }

Also; the debugger points the error to this line:

0x16a7f0:  trap 

And gives this output in the console:

fatal error: attempt to create an Unmanaged instance from a null pointer

This error causes a black screen on device even though I've changed nothing in storyboard.

Thank you for taking your time.

Edit: This error showed no result in search engines, but I think it may be related to obj-c.

解决方案

I ran across this issue today when testing some Swift code against an old iPad 2 (I think it's an iPad 2 -- it's model MD368LL/A), running iOS 8.1.3. It turned out that the problem existed everywhere that I was calling something like:

Int(arc4random() % <someInt>)

This worked fine on later iPads, iPhone5S, iPhone6, etc. Fixed by changing code to:

Int(UInt32(arc4random()) % UInt32(<someInt>))

I think it was a register overflow on the older hardware.

这篇关于Xcode:EXC_BREAKPOINT(EXC_ARM_BREAKPOINT,子代码= 0xe7ffdefe)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆