iOS 严重问题解释(crash)

来源:互联网 发布:网络舆情监控论文 编辑:程序博客网 时间:2024/06/04 20:13

转载自:http://www.cnblogs.com/wfwenchao/p/5420160.html


问题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内没有启动,系统的时间狗就会将程序杀死。也就会说应用启动超时。(注意:程序在真机调试的时候超时,时间狗是不起作用的)


Exception Type:  00000020
Exception Codes: 0x000000008badf00d
Exception Note:  SIMULATED (this is NOT a crash)
Highlighted by Thread:  6
Application Specific Information:
com.wwc.test1 failed to scene-update after 10.00s


看下面的回答:http://stackoverflow.com/questions/36838146/what-does-simulated-this-is-not-a-crash-mean-in-ios-crash-report

According to Apple (see the Tech Notes under Other Exception Types), the exception code 8badf00d means

the application took too long to launch, terminate, or respond to system events.

Also it is suggested that whatever is on Thread 0 should be moved to a background thread.

Now in regards to Exception Note: SIMULATED (this is NOT a crash), iOS won't crash your app if you're running with a debugger and/or in a simulator, therefore it gives you the hint that the app is running SIMULATED and this is NOT a crash. But you should review the part that causes the warning as your app will most likely be terminated if it blocks the main thread for too long.





 

问题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]; 
}

0 0
原创粉丝点击