I have an iOS app that is crashing on my iOS 4.2.1 iPhone 3G test device. My build is set to a Base SDK of 4.3 and an iOS Deployment Target of 4.0. When I inspect the device log I see this:
开发者_运维问答Exception Type: EXC_BAD_ACCESS (SIGBUS) Exception Codes: KERN_PROTECTION_FAILURE at 0x00c22e00 Crashed Thread: 0
I understand that this means that the code is probably calling a 4.3 API method. How do I determine where this is happening?
Interestingly, when I connect the device to Xcode 4 and deploy as a development device, Xcode 4 says "4.2.1 overriding Base SDK to 4.3" in the scheme drop down. When connected as a development device in this way, the 4.2.1 iPhone 3G test device runs the app fine.
Thanks in advance!
I had the same problem. After hard debugging i found the program actually refers to a nonexistent memory (crash was in the callback of NSURLConnection)
So i decided it's a bug in 4.3 or Apple wants to bury 3G devices..whatever
I had installed XCode 3.2.1 with iOS 4.1 SDK. Rebuilt. And my app works.
Change XCode Base SDK to 4.2.1 and see where it doesn't compile - the 4.3 call you're making should be marked as an error.
Turns out that my app was not crashing on a API method call. It was crashing because of a Core Data memory issue.
精彩评论