|
From: Chris B. <ch...@cn...> - 2011-02-23 17:52:08
|
On Wed, Feb 23, 2011 at 11:24 AM, Julien Eychenne <jey...@gm...> wrote: > Thanks Pascal. Here is the output from gdb: > > Reading symbols for shared libraries .++............ done > Reading symbols for shared libraries . done > Reading symbols for shared libraries . done > Reading symbols for shared libraries . done > Reading symbols for shared libraries . done > > Program received signal EXC_BAD_ACCESS, Could not access memory. > Reason: KERN_INVALID_ADDRESS at address: 0x0000000000000008 > [Switching to process 243] > 0x00007fff8602a7b7 in pthread_mutex_lock () > (gdb) bt > #0 0x00007fff8602a7b7 in pthread_mutex_lock () > #1 0x0000000100054f25 in PlaybackIOProc (inDevice=<value temporarily > unavailable, due to optimizations>, inNow=<value temporarily > unavailable, due to optimizations>, inInputData=<value temporarily > unavailable, due to optimizations>, inInputTime=<value temporarily > unavailable, due to optimizations>, outOutputData=<value temporarily > unavailable, due to optimizations>, inOutputTime=<value temporarily > unavailable, due to optimizations>, inClientData=0x10010d6c0) at > coreaudio.c:43 > #2 0x00007fff8266032d in HP_IOProc::Call () > #3 0x00007fff826600ff in IOA_Device::CallIOProcs () > #4 0x00007fff8265ff35 in HP_IOThread::PerformIO () > #5 0x00007fff8265df44 in HP_IOThread::WorkLoop () > #6 0x00007fff8265d817 in HP_IOThread::ThreadEntry () > #7 0x00007fff8265d745 in CAPThread::Entry () > #8 0x00007fff8605e536 in _pthread_start () > #9 0x00007fff8605e3e9 in thread_start () > > Hopefully this will help. > Julien > > Thanks, this helps. I'll see if I can figure something out. I do see I'm not calling pthread_mutex_destroy() and pthread_cond_destroy() in stopwrite(). That is probably the issue. But a suggestion on your app. You probably want to open up the output file outside of the while() loop. Its pretty common to get burst of noise or various timing delays while first setting up the device. Opening only one time will prevent that. This is what we are doing in sox.c... and also probably why it doesn't crash with 2 audio files using it. Chris |