• 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: AUGraph crashes in objective-c project
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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



Am 21.08.2013 um 13:57 schrieb Ross Bencina <email@hidden>:



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

References: 
 >AUGraph crashes in objective-c project (From: Benjamin Rindt <email@hidden>)
 >Re: AUGraph crashes in objective-c project (From: Ross Bencina <email@hidden>)

  • Prev by Date: Re: coreaudiod crashes with userland drivers and Apple apps
  • Next by Date: Re: Can we safely drop Carbons support for audio units?
  • Previous by thread: Re: AUGraph crashes in objective-c project
  • Next by thread: Tap into audio output stream?
  • Index(es):
    • Date
    • Thread