Xcode 4.2 SIGABRT Error

天大地大妈咪最大 提交于 2019-11-27 09:06:15

The line UIApplicationMain(argc, argv, nil, NSStringFromClass([AppDelegate class])); just means that an exception was thrown during the running of your program. This could range from a memory problem, to a simple runtime error. Look in the target debugger console; it will tell you where the error occurred.

Edited due to edited question: I have solved this question before by restoring the iOS simulator to factory defaults (Open "iOS Simulator" Menu in the upper left -> Reset Content and Settings). Then quit the iOS simulator and Xcode, and then restart your computer. This will get rid of the other instance of the process.

I just ran into the same issue (wasted about 2 hours on it, in fact!). There was no exception thrown. Ultimately I stumbled across an answer like this one. Resetting and restarting the simulator and XCode didn't clear it up for me, but a reboot did.

So, if you see this, and there is NOT something about exceptions in the backtrace, then I think a restart of your machine is likely to fix it.

I did all above, including restarting my computer, resetting the simulator but nothing worked so I ended up having to copy all files into a separate folder, create a new project and rebuild my nib file and then copy and paste from the files in my separate folder into my new project. Really quite nasty. If nothing works for you guys and you app isn't too complex, this may be an alternative. Maybe not the best but a water proof working one.

I've had very similar problems and found that if I switch from the LLDB debugger to GDB (from the Product / Scheme / Edit Scheme menu) the problem goes away. Worth a try.

In my case I had some code in viewDidLayoutSubviews, that updated layout and caused viewDidLayoutSubviews to be called again going into an infinite loop. Moving this code solved this error.

I suppose any infinite loops on the main thread end up being an uncaught exception.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!