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.


  • edited October 2015

    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?

  • 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.

  • edited October 2015

    So, the issue reappeared as soon as I added Audiobus. It is easily reproducible but fortunately also easily fixed!

    I was doing this:

    [_audiobusController addFilterPort:_abf];
    _audioController.audiobusFilterPort = _abf;

    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.

  • 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 with addFilterPort:. 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.

  • Oct 17 10:14:11 aglaia AudioShare[1344] <Warning>: Creating IAA node for FXTest
    Oct 17 10:14:11 aglaia MinimalFxTest[1345] <Warning>: TAAE: Setting audio session category to AVAudioSessionCategoryPlayAndRecord
    Oct 17 10:14:11 aglaia MinimalFxTest[1345] <Warning>: TAAE: Audio session initialized (input available, audio route 'iPad Microphone and Speaker') HW samplerate: 44100
    Oct 17 10:14:11 aglaia MinimalFxTest[1345] <Warning>: TAAE: Input status updated (1 channel, non-interleaved, with converter)
    Oct 17 10:14:11 aglaia MinimalFxTest[1345] <Warning>: TAAE: Engine setup
    Oct 17 10:14:11 aglaia MinimalFxTest[1345] <Warning>: TAAE: Buffer duration 0.012, 512 frames (requested 0.005s, 221 frames)
    Oct 17 10:14:11 aglaia MinimalFxTest[1345] <Warning>: TAAE: Starting Engine
    Oct 17 10:14:11 aglaia MinimalFxTest[1345] <Warning>: Temporary Audiobus API Key: 3 days remaining
    Oct 17 10:14:11 aglaia AudioShare[1344] <Warning>: Adding channel filter: FXTest
    Oct 17 10:14:12 aglaia MinimalFxTest[1345] <Warning>: AEMessageQueue: Timed out while performing synchronous message exchange
    Oct 17 10:14:12 aglaia mediaserverd[25] <Notice>: '' net.walkytalky.MinimalFxTest(pid = 1345) setting DiscoveryMode = DiscoveryMode_None, currentDiscoveryMode = DiscoveryMode_None
    Oct 17 10:14:12 aglaia[1] (UIKitApplication:net.walkytalky.MinimalFxTest[0x5c7f][1345]) <Notice>: Service exited due to signal: Segmentation fault: 11
    Oct 17 10:14:13 aglaia AudioShare[1344] <Warning>: Uninitializing and disposing FXTest
    Oct 17 10:14:13 aglaia SpringBoard[54] <Warning>: Application 'UIKitApplication:net.walkytalky.MinimalFxTest[0x5c7f]' crashed.

    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:

    - (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions
        self.audioController = [[AEAudioController alloc]
        _audioController.preferredBufferDuration = 0.005;
        _audioController.useMeasurementMode = YES;
        _audioController.automaticLatencyManagement = YES;
        [_audioController start:NULL];
        self.thru = [[AEPlaythroughChannel alloc] initWithAudioController:_audioController];
        [_audioController addInputReceiver:_thru];
        [_audioController addChannels:[NSArray arrayWithObject:_thru]];
    = [[ABAudiobusController alloc] initWithApiKey:kAudiobusApiKey];
        AudioComponentDescription desc = {
            .componentType = kAudioUnitType_RemoteEffect,
            .componentManufacturer = 'wt*n',
            .componentSubType = 'test',
        self.abf = [[ABFilterPort alloc] initWithName:@"MinimalFxTest" title:@"MinimalFXTest" audioComponentDescription:desc audioUnit:_audioController.audioUnit];
        // AB before TAAE -> crash
        [_abc addFilterPort:_abf];
        _audioController.audiobusFilterPort = _abf;
        return YES;

    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 :)

Sign In or Register to comment.