App shutdown with EXC_RESOURCE, WAKEUPS exception on iOS 8 GM

前端 未结 3 1763
醉话见心
醉话见心 2021-01-30 08:53

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

=== from crash report ===

Exception Type: EXC_RESOURCE
Exception Subtype: WAKEUPS
Exception Mes         


        
3条回答
  •  时光说笑
    2021-01-30 09:12

    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.

    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

提交回复
热议问题