Crash in updateInputDeviceStatus
Not sure about the jurisdiction for this one, but here goes...
I'm getting reproducible crashes across 3 different FX apps when launched as IAA FX from within the recorder window in AudioShare (also ToneStack and GarageBand). The crash is at AEAudioController.m:2970, in the updateInputDeviceStatus method. It occurs a second or two after choosing the app, ie during or just after launch. It does not occur if the app is already running.
iOS 9.0.2, iPad Air 2, latest AEE files from GitHub, latest Audiobus lib.
Comments
Hey @walkytalky - I begun trying to look into this but used up my time quota for the day, I'm afraid. I'll look into it over the next few days. Do tell me if you figure it out first.
PS. I can't reproduce this with the TAAE sample app, although I am seeing some odd AUGraphUpdate 'can't do in current context' errors. How about you?
http://cl.ly/code/1Y3J2F1G3p1L
Hey Michael, thanks for taking a look. I also don't get it in the sample app, nor in a new almost-empty effect project. I'll gradually reintroduce things and see if I can locate it, but likewise may take a few days. I'll keep you posted...
Okay - thanks!
I just updated all my AUFX apps with latest TAAE and Audiobus SDK here, and they seem to work fine in the app store version of AudioShare. iOS 9.0.1. Will update to 9.0.2 soon and see if that changes anything.
So, the issue reappeared as soon as I added Audiobus. It is easily reproducible but fortunately also easily fixed!
I was doing this:
i.e., adding the filter port to Audiobus before setting the TAAE property. Swapping the two steps solves the problem, allowing the audio controller to be properly set up by the time it needs to be.
In hindsight it always should have been that way around, and the fact that it worked previously was presumably accidental. But the documentation is unclear on this point, so it might be worth adding a note about it.
Done! Thanks
Hi Michael, I think the note has it the wrong way around -- my above description is confusing as it shows what was wrong rather than what is right.
What seems to be the right thing to do -- or at least to work -- is to set the AEAudioController
audiobusFilterPort
property first, and only then add it to Audiobus withaddFilterPort:
. I presume that this means the audio controller does some initialisation and then receives a notification when Audiobus is wiring up and can set up the connection map correctly. The other way around it doesn't.Of course, if you think it ought to work the other way around, you may be right -- but then we're back to the crashing...
Ah, damn. That'll teach me to try to multitask. Okay, there shouldn't be a crash happening anyway, I'm going to look into this.
I believe this might be caused by this issue - would you update to the latest version from the github repository? That includes a check which will refuse to compile, or crash on startup, if you've got a conflicting TPCircularBuffer around.
Sorry for the slow response. I've updated from GitHub. The app compiles and doesn't crash on startup, so I guess it's not using a stray TPCircularBuffer. Still crashes in the same place when launched via IAA in Audioshare, if the port is added to AB before TAAE. If the port is added to the AEAudioController first, it all works fine.
Confusingly, this is only the case on my iPad (Air 2) not my iPhone (6). As far as I can see they have the same software versions installed, but on the phone it works in either order...
Bugger.
Would you mind reproducing the problem, and pasting in the system console leading up to the crash (ideally grepped for your app alone, to reduce the noise)? I'd like to see what messages TAAE is emitting. I'm seeing some weirdness here too which will need some debugging, but it looks different to what you describe, so I wanna get all the data I can before diving in.
This is from a minimal example rather than my real apps -- it'd be pretty easy to send you the code if that would help, there's not much to it.
Oh, that would be great - I'd love to see the code.
As far as code goes, the only significant change from the default iOS Single View Application template is the audio initialisation in AppDelegate.m:
It's linked against TAAE and AB, with the necessary entitlements and additions to Info.plist. You can download the zipped up project here -- TAAE and AB aren't included in the zip, so you'll need to supply them. Also, the temporary Audiobus API key used is due to expire any day, so you'll probably need to swap that out for something else.
Ah, cheers! I'm afraid I've burned way into my TAAE budget for the week, so it might be a few days before I take a look, but I shall when I get time.
No problem, take your time. It doesn't seem like there's any urgency, given the simple fix