• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Edirol FA-101 and CoreAudio (Jeff Moore)
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Edirol FA-101 and CoreAudio (Jeff Moore)


  • Subject: Re: Edirol FA-101 and CoreAudio (Jeff Moore)
  • From: Jeff Moore <email@hidden>
  • Date: Tue, 13 Sep 2005 12:12:00 -0700


On Sep 13, 2005, at 5:28 AM, Roni Music wrote:



Subject: Re: Edirol FA-101 and CoreAudio

If you look closely, the crash is happening on the IO thread. From
the back trace, I'd guess that it is happennig inside an
AudioConverter or the the Render method of an AudioUnit somewhere.


It happens when my input callback calls AudioUnitRender() (exactly the same as in the "afrecord" example or TN 2091)

Does it happen in afrecord? I'd guess not, but I haven't tried it with an FA-101 in a while.



My guess is that the reason for the crash is that your app has encountered a NULL buffer where it didn't expect to find one and passed it to the converter or AU in question.


All memory buffers are valid at this point.
They are deleted as the last thing in my destructor, so they are valid,
unless the following calls returns before they have performed what they are supposed to do.


AudioOutputUnitStop(mInputUnit);
AudioUnitUninitialize(mInputUnit);
CloseComponent(mInputUnit);

At this point the AURenderCallback should never ever be called again, right?

That would be correct. AudioOutputUnitStop() is synchronous. It doesn't return until the HAL signals that the device has stopped. This means you can be sure that the IO thread isn't going to call it.


So now it should be safe to destroy all memory.
The crash happens only when closing down the recording stuff, else it works fine.

If you look at the back trace, the crash is happening while the main thread is actually blocked in AudioOutputUnitStop() awaiting the HAL's signal. This puts it in the first stage of your order of operations.


In the meantime, some AU on the IO thread is accessing an invalid memory address (0x017ff010). It appears that your code is interposed between the output AU and the AU that is crashing.

It's hard not to conclude that some how the buffer your code passed in has gotten deallocated. The implication is that you have a race in your code somewhere. The race may be exacerbated by MP systems. I don't recall if you mentioned what kind of machine was having the issue.


--

Jeff Moore
Core Audio
Apple


_______________________________________________ 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
References: 
 >Re: Edirol FA-101 and CoreAudio (Jeff Moore) (From: "Roni Music" <email@hidden>)

  • Prev by Date: Re: AudioFileComponents
  • Next by Date: Re: AudioFileComponents
  • Previous by thread: Re: Edirol FA-101 and CoreAudio (Jeff Moore)
  • Next by thread: OpenAL 1.1
  • Index(es):
    • Date
    • Thread