使用 Xcode 4 时的 EXC_BAD_ACCESS

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/5224063/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me): StackOverFlow

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-09-14 20:24:12  来源:igfitidea点击:

EXC_BAD_ACCESS when using Xcode 4

xcodeios4

提问by learner2010

I upgraded to Xcode 4 last week and I am trying to run a program which I developed in Xcode 3...

我上周升级到 Xcode 4,我正在尝试运行我在 Xcode 3 中开发的程序......

In my app, I have a navigation toolbar with a table. when i click any cell of the table, it takes me to my next view and in the navigation bar a button comes up which should take me to my previous page. When i press that button to go to the previous page, the following error pops up..

在我的应用程序中,我有一个带有表格的导航工具栏。当我单击表格的任何单元格时,它会将我带到下一个视图,并且在导航栏中会出现一个按钮,该按钮应将我带到上一页。当我按下那个按钮转到上一页时,会弹出以下错误..

int retVal = UIApplicationMain(argc, argv, nil, nil); where the error is Thread 1: Program received signal : "EXC_BAD_ACCESS".

int retVal = UIApplicationMain(argc, argv, nil, nil); 其中错误是线程 1:程序收到信号:“EXC_BAD_ACCESS”。

it works perfectly when i run it on xcode 3 but shows this error on xcode 4..

当我在 xcode 3 上运行它时它运行良好,但在 xcode 4 上显示此错误..

would someone be able to help me out?

有人能帮我吗?

Thanks...

谢谢...

回答by Yogesh

Make sure that you don't have any memory leak. To verify if you have memory leak or not in xcode 4 go to the Product menu and click on the analyze and check if there are any memory leak warning and if there are fix them, hopefully that should solve your problem

确保您没有任何内存泄漏。要验证您在 xcode 4 中是否有内存泄漏,请转到产品菜单并单击分析并检查是否有任何内存泄漏警告以及是否有修复它们,希望这应该可以解决您的问题

回答by nayaab

Turn off Correction in the Inspector.

在检查器中关闭更正。

I had the same problem, and it has something to do with the autocorrection within the simulator.

我有同样的问题,它与模拟器中的自动更正有关。