iOS 嚴重問題解釋(crash)


問題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];
}


免責聲明!

本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。



 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM