PJThread register fails when I unplug/plugin head phones

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



I am unsure if you guys have found or fixed this yet. On Mac, when you unplug or plugin head phones, it will abort due to that assertion that I had trouble with before. The stack is below, and the assertion is ../src/pj/os_core_unix.c:403: failed assertion `thread->signature1 != 0xDEAFBEEF || thread->signature2 != 0xDEADC0DE || (thread->thread == pthread_self())'

0   libSystem.B.dylib             	0x9020e28e __semwait_signal_nocancel + 10
1   libSystem.B.dylib             	0x9020e172 nanosleep$NOCANCEL$UNIX2003 + 166
2   libSystem.B.dylib             	0x9028903a usleep$NOCANCEL$UNIX2003 + 61
3   libSystem.B.dylib             	0x902aa6f0 abort + 105
4   pjsip   	0x001a1614 0x4d000 + 1394196
5   pjsip   	0x00082c80 pj_thread_register + 197
6   pjsip   	0x000a4d3b PaPlayerCallback + 134
7   pjsip   	0x001736e2 AdaptingOutputOnlyProcess + 249
8   pjsip   	0x00174599 PaUtil_EndBufferProcessing + 1113
9   pjsip   	0x0016a41b AudioIOProc + 2558
10  ...pple.audio.units.Components	0x70008c2f 0x70000000 + 35887
11  ...pple.audio.units.Components	0x70009830 0x70000000 + 38960
12  ...pple.audio.units.Components	0x70008d08 0x70000000 + 36104
13  ....audio.toolbox.AudioToolbox	0x96417f5b AudioConverterChain::CallInputProc(unsigned long) + 881
14  ....audio.toolbox.AudioToolbox	0x96417a83 AudioConverterChain::FillBufferFromInputProc(unsigned long*, CABufferList*) + 95
15  ....audio.toolbox.AudioToolbox	0x96417a11 BufferedAudioConverter::GetInputBytes(unsigned long, unsigned long&, CABufferList const*&) + 199
16  ....audio.toolbox.AudioToolbox	0x9641bb9c Resampler2Wrapper::RenderOutput(CABufferList*, unsigned long, unsigned long&) + 208
17  ....audio.toolbox.AudioToolbox	0x96417677 BufferedAudioConverter::FillBuffer(unsigned long&, AudioBufferList&, AudioStreamPacketDescription*) + 315
18  ....audio.toolbox.AudioToolbox	0x964179ea BufferedAudioConverter::GetInputBytes(unsigned long, unsigned long&, CABufferList const*&) + 160
19  ....audio.toolbox.AudioToolbox	0x964178cd CBRConverter::RenderOutput(CABufferList*, unsigned long, unsigned long&, AudioStreamPacketDescription*) + 129
20  ....audio.toolbox.AudioToolbox	0x96417677 BufferedAudioConverter::FillBuffer(unsigned long&, AudioBufferList&, AudioStreamPacketDescription*) + 315
21  ....audio.toolbox.AudioToolbox	0x964177df AudioConverterChain::RenderOutput(CABufferList*, unsigned long, unsigned long&, AudioStreamPacketDescription*) + 157
22  ....audio.toolbox.AudioToolbox	0x96417677 BufferedAudioConverter::FillBuffer(unsigned long&, AudioBufferList&, AudioStreamPacketDescription*) + 315
23  ....audio.toolbox.AudioToolbox	0x964173ec AudioConverterFillComplexBuffer + 268
24  ...pple.audio.units.Components	0x70008df5 0x70000000 + 36341
25  ...pple.audio.units.Components	0x700082b4 0x70000000 + 33460
26  ...pple.audio.units.Components	0x70006b64 0x70000000 + 27492
27  ...pple.audio.units.Components	0x700057c3 0x70000000 + 22467
28  ...pple.audio.units.Components	0x7000b9fb AUGenericOutputEntry + 7172
29  com.apple.audio.CoreAudio     	0x9055c454 HP_IOProc::Call(AudioTimeStamp const&, AudioTimeStamp const&, AudioBufferList const*, AudioTimeStamp const&, AudioBufferList*) + 374
30  com.apple.audio.CoreAudio     	0x9055c1ba IOA_Device::CallIOProcs(AudioTimeStamp const&, AudioTimeStamp const&, AudioTimeStamp const&) + 370
31  com.apple.audio.CoreAudio     	0x9055bfb6 HP_IOThread::PerformIO(AudioTimeStamp const&, double) + 620
32  com.apple.audio.CoreAudio     	0x9055939a HP_IOThread::WorkLoop() + 2506
33  com.apple.audio.CoreAudio     	0x905589cb HP_IOThread::ThreadEntry(HP_IOThread*) + 17
34  com.apple.audio.CoreAudio     	0x905588e2 CAPThread::Entry(CAPThread*) + 140
35  libSystem.B.dylib             	0x901ce81d _pthread_start + 345
36  libSystem.B.dylib             	0x901ce6a2 thread_start + 34

I had tried a lot of things to prevent this, including:
1. Right when the device gets plugged in, null the sound.
2. Only change the sound device if the id changed of the device.
3. Add a lock to the sound device updater to prevent possible double runs of updater.

This does not happen if I add another sound device or unplug one, it only happens if I plugin or unplug headphones. I currently do not have PJSIP setup in a development form, so I cannot debug this myself unless I was to take the effort to, which I may after I get some other things done.

Thanks for any help,
Mr. Gecko
-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/pkcs7-signature
Size: 4657 bytes
Desc: not available
URL: <http://lists.pjsip.org/pipermail/pjsip_lists.pjsip.org/attachments/20101002/1acb7275/attachment.p7s>


[Index of Archives]     [Asterisk Users]     [Asterisk App Development]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Security]     [Bugtraq]     [Linux]     [Linux OMAP]     [Linux MIPS]     [Linux API]
  Powered by Linux