启动时出现EXC_BAD_ACCESS,随机错误 [英] EXC_BAD_ACCESS on lauching, random bug
本文介绍了启动时出现EXC_BAD_ACCESS,随机错误的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我几乎已经完成了我的第一个应用程序,但是我得到的怪异的EXC_BAD_ACCESS几乎一直都在发生.
I've nearly finished my first App but i'm getting a weird EXC_BAD_ACCESS that nearly happens all the time.
这是痕迹:
#0 0x02adba93 in objc_msgSend
#1 0x07022e00 in ??
#2 0x028bcbcd in _CFAutoreleasePoolPop
#3 0x0003999f in -[NSAutoreleasePool release]
#4 0x002e9f84 in _UIApplicationHandleEvent
#5 0x0310dafa in PurpleEventCallback
#6 0x02961dc4 in __CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE1_PERFORM_FUNCTION__
#7 0x028c2737 in __CFRunLoopDoSource1
#8 0x028bf9c3 in __CFRunLoopRun
#9 0x028bf280 in CFRunLoopRunSpecific
#10 0x028bf1a1 in CFRunLoopRunInMode
#11 0x002e2226 in -[UIApplication _run]
#12 0x002edb58 in UIApplicationMain
#13 0x0000282e in main at main.m:14
奇怪的是,有时候App可以正常启动,所以我真的不了解发生了什么,并且会有很大的帮助:)
The weird thing is that some times the App start normally, so i really don't understant what's going on and some help would be great :)
推荐答案
您已经释放了一个对象,因此当清除自动释放池时,这是无效的操作.
You've over-released an object, so when the autorelease pool gets cleared, it's an invalid operation.
使用僵尸对其进行调试:
Debug it with zombies:
- 双击可执行文件可执行的http://cl.ly/180aaa2cf72e9ce55717/content
- 选择参数并添加值为YES的NSZombieEnabled僵尸!http://cl.ly/70cd173026d600545d3b/content
然后再次运行您的应用程序,并检查控制台-它应该告诉您哪些对象被过度释放.
Then run your app again, and check the console — it should tell you what object is being over-released.
这篇关于启动时出现EXC_BAD_ACCESS,随机错误的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文