Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
566 views
in Technique[技术] by (71.8m points)

ios - Xcode: EXC_BREAKPOINT (EXC_ARM_BREAKPOINT, subcode=0xe7ffdefe)

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.

See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Reply

0 votes
by (71.8m points)

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.


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
OGeek|极客中国-欢迎来到极客的世界,一个免费开放的程序员编程交流平台!开放,进步,分享!让技术改变生活,让极客改变未来! Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...