有关iOS8应用退到后台频繁闪退的问题

来源:互联网 发布:淘宝网买剃须刀片 编辑:程序博客网 时间:2024/04/29 11:26

在我们做的有关地图的app时,当我频繁在进入后台与开启应用间进行切换时,程序大概在进行3到5次间就会闪退。后来查看Window-Devices-View Device Logs,发现如下的崩溃信息。这里写图片描述
注意框内,我的系统是iOS8.4,查看exception message,在stack overflow上发现这样一段话:
Your app is sending a wakeup command to a particular thread in the app quite often - apparently an average of 206 times a second. 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.

Without seeing your code, my recommendation is that you check your C++ algorithms for sleep/wake calls, or multithread the background process to start new threads each cycle.
意思就是说,对于iOS8,系统会对唤起应用的频率做强制的限定,出现这样一个高的唤起频次时,一般是因为你自己的线程管理出了问题。
总之是唤起频次太大造成了这样一个频繁崩溃的现象。

0 0
原创粉丝点击