admsyn/ofxAudioUnit

Sigabrt on exit when using ofxAudioUnitSampler

Closed this issue · 6 comments

Hey Adam,

I can't help feel the irony of me opening an issue on code that I contributed to your addon, but I haven't been able to solve the problem so I thought it might benefit from your attention.

Basically, whenever you quit an OF app running ofxAudioUnitSampler, you get sigabrt on
OFXAU_PRINT(AudioComponentInstanceDispose(*unit), "disposing unit");

in
void ofxAudioUnit::AudioUnitDeleter(AudioUnit * unit)

So it seems to me that there is a missing step somewhere between exitApp() and AudioUnitDeleter.

I think that missing step is a destructor, but I have no idea what needs to be called in the destructor of a AUSampler.

Any thoughts?

The irony is now doubled as my testing has concluded that this error only happens with my favourite aumu Alchemy from Camel Audio. Still the AU has no problems in Ableton or Logic so the there must be some proper way of disposing of it. Its definitely the biggest and most complex AU that I use so maybe it allocates memory itself? And maybe its the job of the host to clear up this memory? Jus' postulating....

Yeah I'm not quite sure what's up with that. This happens for Native Instruments audio units too I find. It's a thing I've been dealing with for a while.

Can you see if it's basically the same thing for you too? That the errors fires before ofApp::exit() happens?

It is definitely something wrong in ofxAudioUnit, but not sure what.

no, mine happens consistently AFTER exit is called. Heres a screenshot:

screen shot 2014-05-28 at 3 18 33 pm

Ah alright then, that should be a little easier to figure out then.

Unfortunately that AU costs $$$ so it'll be a little tricky for me to reproduce it. Do you get the same effect with this free Alchemy-brand AU? http://www.camelaudio.com/AlchemyPlayer.php

That's the one that I'm using

Looking into this, I think it's probably due to the wonky way OF exits apps (well-documented in openframeworks/openFrameworks#3065)

So, basically, not something that can be fixed from within ofxAudioUnit unfortunately. I'm going to close this, but I'll be paying attention to the issue on the OF repo and check this once that's figured out.