iPhone应用程式仅在3G的释放模式中崩溃 [英] iPhone app crashes only in Release mode on 3G

查看:121
本文介绍了iPhone应用程式仅在3G的释放模式中崩溃的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个应用程序,我写的当崩溃当我调用addSubview在UIScrollView与EXC_BAD_ACCESS。它只在iPhone 3G的释放模式和只在设备上这样做。我在所有其他配置下工作正常:

I have an app I'm writing that crashes when I call addSubview on a UIScrollView with "EXC_BAD_ACCESS". It only does this on iPhone 3G in release mode and only on the device. I works fine in all these other configurations:

iPhone 3G - 调试模式
iPhone 3GS - 调试和发布模式
iPhone 4 - 调试和发布模式
模拟器 - 全部。

iPhone 3G - Debug mode iPhone 3GS - Debug AND Release Mode iPhone 4 - Debug AND Release Mode Simulator - all.

此外,没有理由说明为什么会发生这种情况。我的对象不是我的任何代码。

Furthermore, there is no rational reason why this should be happening. My object is not released by any of my code.

推荐答案

我最近有同样的问题,但我不完全确定原因是一样的。我可以告诉你,虽然是解决了我的问题(虽然我仍然不完全满意的解决方案)。

I had the exact same problem recently, however I am not entirely sure the cause is the same. What I can tell you though is what resolved the issue for me (although I'm still not entirely satisfied with the solution).

最后,它看起来像一个编译器问题,这可能确认其他人说关于编译器优化。
我使用Xcode 4.0(build 4A304a)。问题是LLVM编译器2.0代码生成。一个关键特别:优化级别

In the end, it seems like a compiler issue, and this might confirm what others have said about compiler optimization. I am using Xcode 4.0 (build 4A304a). The issue was with LLVM compiler 2.0 Code Generation. One key in particular: "Optimization Level"

调试设置为无。
发布设置为最快,最小

Debug was set to "None". Release was set to "Fastest, Smallest"

将发布更改为无修复了崩溃(类似地,将调试更改为最快,最小应用程序在启动时崩溃)。

Changing Release to "None" fixed the crash (and similarly changing Debug to "Fastest, Smallest" caused the app the crash on launch).

这篇关于iPhone应用程式仅在3G的释放模式中崩溃的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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