Using bluetooth headphones causes coreaudiod to hang at 100% cpu usage and causes the iOS simulator and anything that depends on coreaudiod to deadlock.

Originator:jaddyman
Number:rdar://18610241 Date Originated:10-Oct-2014 04:05 PM
Status:Open Resolved:
Product:Developer Tools Product Version:6.0.1
Classification:Crash/Hang Reproducible:Always
 
Summary:
I have bluetooth headphones (Phillips SHB7000) connected to my iMac and set as the default system audio output device. iTunes, Skype and other audio applications work perfectly fine with these headphones.

Working on an app that uses Core Audio and running it in the iOS Simulator causes the coreaudiod process to hang at 100% CPU usage, and also causes anything that depends on the coreaudiod process to deadlock, (sound prefence pane in System prefs, skype, other apps that use core audio, etc).

I have attached Apple's iPhoneMixerEQGraphTest sample project that uses CoreAudio and I was able to reproduce this issue using this test project.

I have also attached a sample dump of the coreaudiod process.

Finally, these messages are seen in the console output from the application running in the simulator:

15:51:18.164 WARNING:   139: The default output device's sample rate was changed.
15:51:18.169 WARNING:   256: Audio device's sample rate changed. You may need to restart the simulator.
15:51:28.818 ERROR:     56: Start: Mach message timeout. Apparently deadlocked. Aborting now.

Steps to Reproduce:
Connect bluetooth headphones
Set the headphones as the default system audio output device
Run an app that uses Core Audio in the iOS simulator

Expected Results:
Audio should play through bluetooth headphones.

Actual Results:
coreaudiod process hangs and uses 100% CPU
other applications that use core audio are deadlocked

Version:
Xcode 6.0.1 and Xcode 6.1 GM
Mac OS X 10.9.5 and Mac OS X 10.10 GM 3
iOS SDK 7.x and 8.x

Notes:
In order to get around this, I must disconnect the headphones, turn bluetooth off, force quit coreaudiod and restart the iOS Simulator before any Core Audio based things will work again.

Configuration:
I do not know if this happens with other bluetooth headphones or not.

I am using an iMac 27", late 2013
Phillips SHB7000 bluetooth wireless headphones

Comments

coreaudio-sample.txt: http://d.pr/f/1j2pS

core audio example project: http://d.pr/f/1jUnO


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!