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
Weird CloseComponent Crash
[
Date Prev
][
Date Next
][
Thread Prev
][
Thread Next
][
Date Index
][
Thread Index
]
Weird CloseComponent Crash
Subject
:
Weird CloseComponent Crash
From: Norman Franke <
email@hidden
>
Date: Tue, 23 Jan 2007 09:18:49 -0800
I randomly get a crash when calling CloseComponent on the HAL output I opened with OpenAComponent. Often it happens the first time I call it.
It dies in different places inside CloseComponent, but always in szone_free. Up one level it can be things like ~BufferedAudioConverter's call to operator delete[], or Resampler2Wrapper's call to ReleaseSincKernel.
My code is modeled after AudioFilePlayer in /Developer/Examples/CoreAudio/PublicUtility/AudioFilePlayImpl. I'm not using an AudioFile, however, just sending buffers of data to CoreAudio much like it's doing in its thread.
I set the render callback to NULL (as in the sample), AudioOutputUnitStop, stop the thread that reads from disk (and join with it to wait until it dies), dispose of my AudioConverter, call AudioUnitUninitialize and then CloseComponent. Finally, I free up my buffers that I pass via my ComplexInputProc.
Just now I got the same crash in AudioConverterDispose, which I was able to get a stack track for this crash:
SMCX StationMaster Mach-O(13247,0xa000ed98) malloc: *** error for object 0x2140200: incorrect checksum for freed object - object was probably modified after being freed, break at szone_error to debug
SMCX StationMaster Mach-O(13247,0xa000ed98) malloc: *** set a breakpoint in szone_error to debug
Program received signal: "EXC_BAD_ACCESS".
mi_cmd_stack_list_frames: Not enough frames in stack.
#0 0x900073f8 in szone_free
#1 0x94157d34 in operator delete
#2 0x94161db0 in operator delete[]
#3 0x94161c2c in BufferedAudioConverter::~BufferedAudioConverter
#4 0x94161b94 in CBRConverter::~CBRConverter
#5 0x94161d6c in Reinterleaver::~Reinterleaver
#6 0x9416193c in AudioConverterChain::~AudioConverterChain
#7 0x9416188c in AudioConverterDispose
#8 0x00219580 in ASDAudioPlayer::Shutdown at ASDAudioPlayer.cpp:602
#9 0x00219948 in ASDAudioUnitPlayer::Shutdown at ASDAudioPlayer.cpp:1015
#10 0x0021ada0 in ASDAudioUnitPlayer::~ASDAudioUnitPlayer at ASDAudioPlayer.cpp:1009
#11 0x001ebca4 in Audio_PlayAbort at Audio_Utilities.cc:1458
#12 0x00215150 in WrapAudio_PlayAbort at SoundWrapper.cp:181
#13 0x00206bc8 in MakeRingTone at MyTelephony.c:531
#14 0x0020716c in PhoneCallPresented at MyTelephony.c:618
#15 0x000d30f0 in CheckHotPoints at MySerial.c:3501
#16 0x000d5550 in NormalCh at MySerial.c:3833
#17 0x000d698c in ProcessByte at MySerial.c:4195
#18 0x000d6c9c in ProcessBuffer at MySerial.c:4268
#19 0x000d71a4 in ProcessSerial at MySerial.c:4375
#20 0x000bb464 in MELProgress at MELHelp.c:983
#21 0x000b7834 in ProcessEvent at MEL.c:2136
#22 0x000b78b0 in DoEvent at MEL.c:2145
#23 0x001badb0 in MainLoop at SMCMain.c:93
#24 0x001bc630 in main at SMCMain.c:599
Any ideas? I'm baffled. The application is quite stable otherwise, so I don't think it's a memory corruption issue, and it never crashes allocating or opening the component.
_______________________________________________
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
Follow-Ups
:
Re: Weird CloseComponent Crash
From:
Stephen Davis <email@hidden>
Re: Weird CloseComponent Crash
From:
William Stewart <email@hidden>
Prev by Date:
Re: Jack (or something) at the OS level...
Next by Date:
Re: Audio Unit input pitch based MIDI output
Previous by thread:
how to release file handle?
Next by thread:
Re: Weird CloseComponent Crash
Index(es):
Date
Thread