Re: ExtAudioFileRead Crash
Re: ExtAudioFileRead Crash
- Subject: Re: ExtAudioFileRead Crash
- From: William Stewart <email@hidden>
- Date: Tue, 13 Oct 2009 19:34:59 -0700
On Oct 13, 2009, at 9:18 AM, Peter Castine wrote:
What is the call stack that ends in the "CrashIfClient..." - we
have that in a number of places, and knowing which one you are
hitting can tell us where you are crashing at least (potentially
which buffer is bad)
Here's one:
----
Thread 45 Crashed:
0 ....audio.toolbox.AudioToolbox 0x9918e651
CrashIfClientProvidedBogusAudioBufferList + 73
1 ....audio.toolbox.AudioToolbox 0x991e19fa ExtAudioFileRead + 66
2 ...coustic.myApp 0x0000c0e0 ChunkReadCallback + 260
3 ...coustic.myApp 0x00017b0f WorkerThreadStartFunc + 63
4 libSystem.B.dylib 0x9838cf39 _pthread_start + 345
5 libSystem.B.dylib 0x9838cdbe thread_start + 34
----
ExtAudioFileRead+66 and CrashIfClient…+73 are also listed in my
other logs.
So, that implies that the buffer you are providing to ExtAudioFileRead
is bad.
The very first thing that ExtAudioFileRead does after verifying the
arguments is check the buffer. So, we've not gone into the guts of the
implementation here yet at all - based on the previous posts, my
suspicion would be that your pointer addition is taking you past the
end of the allocated buffer (or the base address is being mis-set
somewhere else in your code).
As we previously noted, you can't be accessing the same ext audio
file object from different threads at the same time - between your
buffer and the file is an audio converter, and it has potentially
alot of state that is NOT protected from simultaneous access. If
this is being accessed from more than one thread, it is quite
likely that a buffer is being overidden.
This is what's worrying me. Jean-Daniel pointed out earlier that
some of the stacks were pointing a finger at my code doing something
wrong. To my horror I've just found something where he might well be
right. I'm going to try to address that potential problem now. If
the call stack above provides additional insight, so much the better.
Don't know if that helps
Bill
_______________________________________________
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