Hey guys,
I have a weird problem. I made a c++ only project with core audio which plays through audio and mixes some sources which is working fine in this project. Then I wanted to import it into my objective-c and cocoa project in which the UI sits, and copied it over with all nessesary frameworks. The code to run it is placed in the applicationDidFinishLoading piece and also straight copied from the main of the c++ project. My problem is, it compiles fine and the UI loads, but after the AUGraph is started (and it starts cause the code after AUGraphStart is printed and AUGraph does not give any errors), the program crashes and the debugger is leading me to the CARingBuffer class method GetTimeBounds.
Its saying
Thread 11 com.apple.audio.IOThread.client EXC_BAD_ACCESS (code=13, address=0x0)
Well, I don't know what to do with this error or any hints how to do anything against it. Obviously a threading issue, but I don't know where it comes from. I mean its basically the same code executed at a different place (but not a very insecure place at least I thought)
What does the address part mean? 0x0 is zero, isn't there anything to excite somehow? Maybe the whole AUGraph is not really initiated or no memory allocated? But then I don't get why its BAD ACCESS. Google didn't help me with code=13.
Any tips/hints what I am doing wrong here? The UI is working alone, the audio c++ code is working alone, but together they are crashing?
When needed I can attach some sample snippets but in one the code is too long to read.
Thanks Benjamin |