CTCallCenter query leads to large number of stuck CallKit threads.

Originator:larry.brunet
Number:rdar://28828675 Date Originated:18-Oct-2016
Status:Closed Resolved:19-Oct-2016
Product:iOS SDK Product Version:9.3
Classification: Reproducible:Sometimes
 
Summary:
Our VoIP App (Avaya Equinox) is built against the iOS 9 SDK and uses CTCallCenter to monitor for cellular calls. 
Whenever our app comes to the foreground, we alloc a new CTCallCenter instance to check for any cellular calls.
Running on iOS 10 (10.0.2), the application occasionally hangs with what looks like a deadlock with large number of CallKit threads.
(See attached decoded crash log).
It's not clear how exactly to reproduce this, I'm hoping the crash logs will give enough information ot determine what's causing the deadlock.
Frequency of occurrence is 2-3 times a day when testing VoIP calling.

Steps to Reproduce:
See Description

Expected Results:
See Description

Actual Results:
See Description

Version:
iOS 10.0.2

Notes:


Configuration:
iPhone 6

Comments

Apple Developer Relations19-Oct-2016 05:41 PM

Engineering has the following feedback for you:

We recommend a couple things:

  • Don’t create multiple CTCallCenter instances, just create one and retain it for as long as your app requires it. Or if memory becomes low, release that single instance and create a new one when needed again. But ensure you have a maximum of one instance at a time.

  • Switch to CallKit’s CXCallObserver class instead of CTCallCenter. The new CallKit class is the replacement API, and CTCallCenter is deprecated.

Please send this bug back to us if you continue to hit issues with only using a single CXCallObserver (or a single CTCallCenter).

We are now closing this bug report.

If you have questions or comments about the resolution, please update your bug report with that information so we can respond.

By larry.brunet at Oct. 20, 2016, 12:47 p.m. (reply...)

Please note: Reports posted here will not necessarily be seen by Apple. All problems should be submitted at bugreport.apple.com before they are posted here. Please only post information for Radars that you have filed yourself, and please do not include Apple confidential information in your posts. Thank you!