简体   繁体   English

应用程序在iOS 4.2.1 3G iPhone上崩溃,基本SDK = 4.3,iOS部署目标= 4.0

[英]App crashing on iOS 4.2.1 3G iPhone with Base SDK = 4.3 and iOS Deployment Target = 4.0

I have an iOS app that is crashing on my iOS 4.2.1 iPhone 3G test device. 我有一个iOS应用程序崩溃在我的iOS 4.2.1 iPhone 3G测试设备上。 My build is set to a Base SDK of 4.3 and an iOS Deployment Target of 4.0. 我的构建设置为4.3的基本SDK和4.0的iOS部署目标。 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 异常类型:EXC_BAD_ACCESS(SIGBUS)异常代码:KERN_PROTECTION_FAILURE at 0x00c22e00 Crashed Thread:0

I understand that this means that the code is probably calling a 4.3 API method. 我知道这意味着代码可能正在调用4.3 API方法。 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. 有趣的是,当我将设备连接到Xcode 4并作为开发设备部署时,Xcode 4在方案下拉列表中说“4.2.1将Base SDK覆盖到4.3”。 When connected as a development device in this way, the 4.2.1 iPhone 3G test device runs the app fine. 当以这种方式连接为开发设备时,4.2.1 iPhone 3G测试设备运行应用程序正常。

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) 经过硬调试后,我发现程序实际上是指一个不存在的内存(崩溃是在NSURLConnection的回调中)

So i decided it's a bug in 4.3 or Apple wants to bury 3G devices..whatever 所以我认为这是4.3中的一个错误,或者Apple希望埋葬3G设备......无论如何

I had installed XCode 3.2.1 with iOS 4.1 SDK. 我用iOS 4.1 SDK安装了XCode 3.2.1。 Rebuilt. 重修。 And my app works. 我的应用程序工作。

Turns out that my app was not crashing on a API method call. 事实证明我的应用程序没有崩溃API方法调用。 It was crashing because of a Core Data memory issue. 由于核心数据内存问题,它崩溃了。

将XCode Base SDK更改为4.2.1并查看它未编译的位置 - 您正在进行的4.3调用应标记为错误。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM