10.6.3 Open File Dialog preview stalling AUHAL (AudioQueue <-> AUHal deadlock ?)
10.6.3 Open File Dialog preview stalling AUHAL (AudioQueue <-> AUHal deadlock ?)
- Subject: 10.6.3 Open File Dialog preview stalling AUHAL (AudioQueue <-> AUHal deadlock ?)
- From: "Ross Bencina" <email@hidden>
- Date: Mon, 19 Apr 2010 19:22:58 +1000
Hi Guys
On 10.6.3 I'm having a problem with intermittent AUHAL audio stalling when
the open file dialog is preparing it's preview pane for the selected sound
file. When this happens, the preview pane displays the circular-dash loader
animation instead of sound file details. I can reproduce this by getting my
app generating a stream of audio, opening an open file dialog in my app and
stepping through a bunch of sound files in a single directory with the arrow
keys. Within a minute or two audio stalls and I get the loader animation. I
can close the dialog, but then if I get my app to close the AUHAL stream the
main thread stalls too. My customers have reported the same problem on other
versions of SnowLeopard.
Looking at the (trimmed) SpinControl output below, it looks like a deadlock
on a
CoreAudio mutex.
Thread_53748 is my main thread trying to close down HAL
Thread_53927 is the ioproc thread which stalled after I selected a soundfile
in the open file dialog
I suspect Thread_57760 is a background thread the open file dialog launched
to prepare the preview information for the sound file selected in the
dialog -- certainly it's not one of mine.
Is this a known bug?
I notice I'm calling AudioDeviceGetProperty() from within the IOProc. I'm
not feeling too comfortable about that now, but my understanding is that
this is safe, isn't it? I'm using it to retrieve
kAudioDevicePropertyActualSampleRate and kAudioDevicePropertyLatency -- I'm
assuming these can vary from call to call, otherwise perhaps I can work
around this bug by moving them outside my IOProc.
Thanks!
Ross.
Call graph:
4078 Thread_53748 DispatchQueue_1: com.apple.main-thread (serial)
4078 0x89302444
4078 StopStream
4078 AudioOutputUnitStop
4078 CallComponentDispatch
4078 AUHALEntry
4078 AUGenericOutputEntry
4078 AUGenericOutputEntry
4078 AudioDeviceStop
4078 HALDevice::StopIOProc(long (*)(unsigned long,
AudioTimeStamp const*, AudioBufferList const*, AudioTimeStamp const*,
AudioBufferList*, AudioTimeStamp const*, void*))
4078 HALPlugIn::DeviceStopIOProc(HALObject const&,
long (*)(unsigned long, AudioTimeStamp const*, AudioBufferList const*,
AudioTimeStamp const*, AudioBufferList*, AudioTimeStamp const*, void*))
4078
HP_HardwarePlugIn_DeviceStop(AudioHardwarePlugInInterface**, unsigned long,
long (*)(unsigned long, AudioTimeStamp const*, AudioBufferList const*,
AudioTimeStamp const*, AudioBufferList*, AudioTimeStamp const*, void*))
4078 HP_Device::ExecuteCommand(HP_Command*)
4078 IOA_Device::StartCommandExecution(void**)
4078 CAMutex::Lock()
4078 pthread_mutex_lock
4078 semaphore_wait_signal_trap
4078 Thread_53927
4078 thread_start
4078 _pthread_start
4078 CAPThread::Entry(CAPThread*)
4078 HP_IOThread::ThreadEntry(HP_IOThread*)
4078 HP_IOThread::WorkLoop()
4078 HP_IOThread::PerformIO(AudioTimeStamp const&, double)
4078 IOA_Device::CallIOProcs(AudioTimeStamp const&,
AudioTimeStamp const&, AudioTimeStamp const&)
4078 HP_IOProc::Call(AudioTimeStamp const&,
AudioTimeStamp const&, AudioBufferList const*, AudioTimeStamp const&,
AudioBufferList*)
4078 AUGenericOutputEntry
4078 0x700057c3
4078 0x70006b64
4078 0x7000814d
4078 0x70008c2f
4078 AudioIOProc
4078 AudioDeviceGetProperty
4078
HALDevice::HasProperty(AudioObjectPropertyAddress const&) const
4078
HALObject::HasProperty(AudioObjectPropertyAddress const&) const
4078
HALPlugIn::ObjectHasProperty(HALObject const&, AudioObjectPropertyAddress
const&) const
4078
HP_HardwarePlugIn_ObjectHasProperty(AudioHardwarePlugInInterface**, unsigned
long, AudioObjectPropertyAddress const*)
4078 CAMutex::Lock()
4078 pthread_mutex_lock
4078
semaphore_wait_signal_trap
4078 Thread_57760
4078 thread_start
4078 _pthread_start
4078 __NSThread__main__
4078 -[NSThread main]
4078 -[QTMovie_AsyncLoadHelper
_loadMediaHelperOnBackgroundThreadWithAttributes:]
4078 -[QTMovie_FigMedia initWithAttributes:error:forParent:]
4078 playerfig_AddToPlayQueue
4078 playerfig_stopResetDisturbReprepareAndResume
4078 playerfig_prepareWorkingItem
4078 playerfig_prepareWorkingItem2
4078 FigAudioQueueRenderPipelineCreate
4078 FigAudioQueueCreate
4078 AudioQueueSetProperty
4078 AQServer_SetProperty
4078
AudioQueueObject::SetProperty(unsigned long, __CFData const*)
4078
AudioQueueObject::DoIONodeConnect(AQIONodeSpecifier const&,
AudioStreamBasicDescription const*, AudioChannelLayout const*)
4078
AQIONodeManager::FindAQIONode(unsigned long, bool, bool, bool)
4078
AQIONodeManager::_FindAQIONode(unsigned long, bool, bool, bool)
4078 NewAQIONode(unsigned long,
bool, bool, AudioStreamBasicDescription const*, AudioChannelLayout const*)
4078
AQMEDevice::AQMEDevice(unsigned long, bool, AudioStreamBasicDescription
const*, AudioChannelLayout const*)
4078
AQMEDevice::IO_AdaptToDevice(bool)
4078 AudioUnitSetProperty
4078 CallComponentDispatch
4078 AUHALEntry
4078
SystemOutputAUEntry
4078 0x700049ff
4078 0x70007940
4078
AUGenericOutputEntry
4078
AUGenericOutputEntry
4078
AudioDeviceSetProperty
4078
HALDevice::SetPropertyData(AudioObjectPropertyAddress const&, unsigned long,
void const*, unsigned long, void const*, AudioTimeStamp const*)
4078
HALObject::SetPropertyData(AudioObjectPropertyAddress const&, unsigned long,
void const*, unsigned long, void const*, AudioTimeStamp const*)
4078
HALPlugIn::ObjectSetPropertyData(HALObject const&,
AudioObjectPropertyAddress const&, unsigned long, void const*, unsigned
long, void const*, AudioTimeStamp const*)
4078
HP_HardwarePlugIn_ObjectSetPropertyData(AudioHardwarePlugInInterface**,
unsigned long, AudioObjectPropertyAddress const*, unsigned long, void
const*, unsigned long, void const*)
4078
IOA_SingleDevice::SetPropertyData(AudioObjectPropertyAddress const&,
unsigned long, void const*, unsigned long, void const*, AudioTimeStamp
const*)
4078 IOA_Device::SetPropertyData(AudioObjectPropertyAddress const&, unsigned
long, void const*, unsigned long, void const*, AudioTimeStamp const*)
4078 HP_Device::SetPropertyData(AudioObjectPropertyAddress const&,
unsigned long, void const*, unsigned long, void const*, AudioTimeStamp
const*)
4078 HP_Device::ExecuteCommand(HP_Command*)
4078 IOA_Device::StartCommandExecution(void**)
4078 CAMutex::Lock()
4078 pthread_mutex_lock
4078 semaphore_wait_signal_trap
###
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Coreaudio-api mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden