Re: Can anyone comment on Crashes in AUParameterSet?
Re: Can anyone comment on Crashes in AUParameterSet?
- Subject: Re: Can anyone comment on Crashes in AUParameterSet?
- From: Doug Wyatt <email@hidden>
- Date: Tue, 27 May 2003 14:02:25 -0700
On Tuesday, May 27, 2003, at 09:46 US/Pacific, Marc Poirier wrote:
On Tue, 27 May 2003, Shai Shasag wrote:
Thanks to all those who answered, much appreciated!
I'm trying to check the arguments to AUParameterSet.
My code looks like this:
const AudioUnitParameter inParameter = {GetComponentInstance(),
lParamID kAudioUnitScope_Global, 0};
OSStatus cErr = ::AUParameterSet(nil, nil, &inParameter, newValue, 0);
The 1st & 2nd parameters are nil and that's should be OK according to
the documentation.
I was worried about the third one being on the stack, if
AUParameterSet returns before using the pointer this could be a
problem.
The 4th and 5th parameters are not pointers.
So it might be that AUParameterSet is an async call? I would be
surprised if it was.
I'm pretty positive that AUParameterSet is a convenience function that
calls AudioUnitSetParameter and AUParameterListenerNotify,
essentially yes -- though if you disassemble you'll see that
AUParameterListenerNotify and AUParameterSet share this code in an
internal function, NotifyListeners.
and
AUParameterListenerNotify is asynchronous (the notifications go into a
queue and are read when the listeners' read loops next fire and pull
notifications out of the queue).
not really, there is actually no queueing.
Looking at the bug report...
[a] it's important to know what the other threads are doing. In gdb,
use "t a a bt" to get a backtrace for all threads. There could be a
critical region that's not protected with a lock.
[b] if that's not the problem, then step instruction-by-instruction
through AUParameterSet. Your AudioUnitParameter is passed in in R5,
copied into R30 (hopefully my compiler isn't too different than the one
Jaguar was built with). If this was a bad pointer, we'd crash before
calling AudioUnitSetParameter. It's not crashing there, so the first
thing I'd check is to see if AudioUnitSetParameter is trashing R30
before passing it to NotifyListeners, in which we're crashing.
[c] if that's not it, then I have to suspect a memory corruption bug.
Doug
_______________________________________________
coreaudio-api mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/coreaudio-api
Do not post admin requests to the list. They will be ignored.