您的位置:首页 > 移动开发 > IOS开发

iOS 严重问题解释(crash)

2016-04-22 10:05 393 查看
问题1:Exception Type: 00000020 Exception Codes: 0x000000008badf00d Exception Note: SIMULATED (this is NOT a crash) Application Specific Information:com.wwc.test1 failed to scene-create after 19.94s (launch took 0.06s of total time limit 20.00s)

解答:app如果在20s内没有启动,系统的时间狗就会将程序杀死。也就会说应用启动超时。(注意:程序在真机调试的时候超时,时间狗是不起作用的)

问题2:Exception Type: 00000020 Exception Codes: 0x000000008badf00d Exception Note: SIMULATED (this is NOT a crash) Highlighted by Thread: 11 Application Specific Information:
<BKNewProcess: 0x12f623190; com.sina.weibo; pid: 10924; hostpid: -1> has active assertions beyond permitted time:
{(
<BKProcessAssertion: 0x12f653f20> id: 10924-F212D20C-B907-46DA-88BB-23E9BF606091 name: Called by UIKit, from <redacted> process: <BKNewProcess: 0x12f623190; com.sina.weibo; pid: 10924; hostpid: -1> permittedBackgroundDuration: 180.000000 reason: finishTask owner pid:10924 preventSuspend preventIdleSleep preventSuspendOnSleep
)}

解答:The result is that when we go into the background, the watchdog process sees that the app is behaving badly and kills it summarily.(程序退出到后台后,在某一时刻被时间狗杀死)

问题3:Exception Type: EXC_RESOURCE Exception Subtype: WAKEUPS Exception Message: (Limit 150/sec) Observed 435/sec over 300 secs Exception Note: NON-FATAL CONDITION (this is NOT a crash)

解答:Background threads in iOS 8 have a hard limit on how many times you can run a sleep/wake cycle on each thread per second, and having a high count here is usually an indication that something is wrong / inefficient in your thread management.(后台线程的睡眠唤起次数是有限制的 150次)

问题4:EXC_BAD_ACCESS一般是内存管理引起的,且在控制台不会输出错误信息(因为访问的内部不确定从什么时候已被损坏),在手动管理内存的情况先可能经常见到;在ARC下出现的概率降低,但是有时也会出现。(访问损坏的内存地址),有时候报错EXC_BAD_ACCESS(SIGSEGV),SIGSEGV是当一个进程执行了一个无效的内存引用

解答:1.设置NSZombie(僵尸对象)调试程序 2.对程序做Analyze分析

问题5:SIGABRT 当异常终止一个进程。中止当前进程,返回一个错误代码。该函数产生SIGABRT信号并发送给自己。实际就是系统发现操作异常,调用发送SIGABRT(abort()函数)信号,杀死进程。

解答:这种异常,系统会知道程序在什么地方有不合法的操作,会在控制台输出异常信息。例如:向一个对象发送它无法识别的消息。

-(BOOL) respondsToSelector:(SEL)aSelector {
printf("SELECTOR: %s\n", [NSStringFromSelector(aSelector) UTF8String]);
return [super respondsToSelector:aSelector];
}
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: