首页 诗词 字典 板报 句子 名言 友答 励志 学校 网站地图
当前位置: 首页 > 教程频道 > 数据库 > Access >

查看EXC_BAD_ACCESS或SIGABRT的步骤

2012-11-05 
查看EXC_BAD_ACCESS或SIGABRT的方法本文出自:http://blog.csdn.net/linhanmin/article/details/81178081.

查看EXC_BAD_ACCESS或SIGABRT的方法

本文出自:http://blog.csdn.net/linhanmin/article/details/8117808


1.打开XCode -> Product -> Edit Scheme 

2.选择Arguements的Environment Varibles中添加NSZombieEnabled YES


测试代码

UILabel *label = [[UILabelalloc]initWithFrame:CGRectMake(0,0,102,102)];

[label release];

[self.view addSubview:label];


使用前结果:

-[NSPathStore2 frame]: unrecognized selector sent to instance 0x1f55eff0

 Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '-[NSPathStore2 frame]: unrecognized selector sent to instance 0x1f55eff0'

代码跳回main函数


使用后:

 -[UILabel superview]: message sent to deallocated instance 0x1fd30540




热点排行