Re: AUGraph crashes in objective-c project
Re: AUGraph crashes in objective-c project
- Subject: Re: AUGraph crashes in objective-c project
- From: Benjamin Rindt <email@hidden>
- Date: Thu, 22 Aug 2013 16:35:07 +0200
Hey, thanks that did it! Kinda. Feeling a bit dumb to not get that.
But I have now some more Thread/Memory issues. The program runs now, and the audio piece as well. But if the audio code is running, and I try anything to do in the UI the program crashes with this error:
malloc: *** error for object 0x10303b408: incorrect checksum for freed object - object was probably modified after being freed. set a breakpoint in malloc_error_break to debug
I don't know where this comes from. It might be, the code is executed in the AppDelegate File and I am not shure if there are any restrictions for this file. Should everything executed from a Controller? Something like if anything is done in the UI the AppDelegate gets refreshed or something which causes my code to be executed again or something or changes anything in memory? I have set a breakpoint at malloc_error_break but that does not help me at all. It shows me 0x7fff89d4b5b4: pushq %rbp
Before I made the breakpoint, I got an error like thread signal SIGABRT. Any clue here?
Thanks Benjamin
On 21/08/2013 8:27 PM, Benjamin Rindt wrote:
MyPlayer player = {0}; CreateInputUnit(&player); . . . AUGraphStart(player.graph);
That's going to be a problem when player goes out of scope.
Here's how it's done:
In the class declaration:
MyPlayer *player_; // member variable
....
init method:
player_ = new MyPlayer; // allocate object on the heap CreateInputUnit( player_ );
AUGraphStart( player_->graph );
....
some time later, after you've stopped the graph etc:
delete player_; player_ = 0;
|
_______________________________________________
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