本文介绍了应用程序关闭与 EXC_RESOURCE,iOS 8 GM 上的 WAKEUPS 异常的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

有谁知道 iOS 8 上的这种异常是什么?

Does anyone know what this kind of exception is on iOS 8?

=== 来自崩溃报告 ===

=== from crash report ===

Exception Type: EXC_RESOURCE
Exception Subtype: WAKEUPS
Exception Message: (Limit 150/sec) Observed 206/sec over 300 secs
Triggered by Thread: 14

似乎只发生在 iOS 8 上...我们的应用程序会以任意间隔随机关闭,但此异常..

Seems to only happen on iOS 8... Our app is shut down quite randomly at arbitrary intervals with this exception..

欢迎提供任何线索.谢谢!

Any clues are welcome. Thanks!

推荐答案

您的应用经常向应用中的特定线程发送唤醒命令 - 显然平均每秒 206 次.iOS 8 中的后台线程对您每秒可以在每个线程上运行睡眠/唤醒周期的次数有硬性限制,此处的计数较高通常表明您的线程管理中有问题/效率低下.

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.

如果没有看到您的代码,我的建议是检查您的 C++ 算法是否有睡眠/唤醒调用,或者多线程后台进程以在每个周期启动新线程.

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.

Ray Wenderlich 有一个关于 Apple 多线程系统的精彩教程 Grand Central Dispactch,这对您来说可能也是一个很好的资源:http://www.raywenderlich.com/60749/grand-central-dispatch-in-depth-part-1

Ray Wenderlich has a fantastic tutorial on Apple's system for multithreading, Grand Central Dispactch, which might also be a good resource for you: http://www.raywenderlich.com/60749/grand-central-dispatch-in-depth-part-1

这篇关于应用程序关闭与 EXC_RESOURCE,iOS 8 GM 上的 WAKEUPS 异常的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

07-25 07:56