Simulator crashing with iOS < 14. Started happening since Big Sur

I can no longer run my app in the simulator with a version lower than iOS14.
I tried iOS12, iOS12.4, iOS13.7 and they all crash with the same error.

This only started since upgrading to Big Sur. Nothing has changed in my code base.

This is the code that crashes:
Code Block  //6.
    // Provide callback audio rendering function on the unit
    // Set input callback
    AURenderCallbackStruct callbackStruct;
    callbackStruct.inputProc = playbackCallback;
    callbackStruct.inputProcRefCon = self;
    status = AudioUnitSetProperty(_audioUnit,
kAudioUnitProperty_SetRenderCallback,
kAudioUnitScope_Input,
kOutputBus,
&callbackStruct,
sizeof(callbackStruct)
);
    NSAssert1(status == noErr, @"Error setting callback: %d", (int)status);
    //start audio
    AudioOutputUnitStart(_audioUnit);


The error "Thread 1: signal SIGABRT" occurs at the last line...
Code Block
AudioOutputUnitStart(_audioUnit);


And the errors in the console are:

Code Block 2020-11-25 15:17:34.228802-0800 PolyNome[20602:879922] Error loading /Library/Audio/Plug-Ins/HAL/JackRouter.plugin/Contents/MacOS/JackRouter:  dlopen(/Library/Audio/Plug-Ins/HAL/JackRouter.plugin/Contents/MacOS/JackRouter, 262): no suitable image found.  Did find:
/Library/Audio/Plug-Ins/HAL/JackRouter.plugin/Contents/MacOS/JackRouter: mach-o, but not built for iOS simulator
2020-11-25 15:17:34.229006-0800 PolyNome[20602:879922] Cannot find function pointer New_JackRouterPlugIn for factory <CFUUID 0x600003f11a80> 7CB18864-927D-48B5-904C-CCFBCFBC7ADD in CFBundle/CFPlugIn 0x7fbe247a7390 </Library/Audio/Plug-Ins/HAL/JackRouter.plugin> (bundle, not loaded)
2020-11-25 15:17:34.461372-0800 PolyNome[20602:880389] [AudioHAL_Client] HALB_IOBufferManager.cpp:226:GetIOBuffer:  HALB_IOBufferManager::GetIOBuffer: the stream index is out of range
2020-11-25 15:17:34.461528-0800 PolyNome[20602:880389] [AudioHAL_Client] HALB_IOBufferManager.cpp:226:GetIOBuffer:  HALB_IOBufferManager::GetIOBuffer: the stream index is out of range
2020-11-25 15:17:34.474317-0800 PolyNome[20602:880389] [aqme] 254: AQDefaultDevice (1): output stream 0: null buffer
2020-11-25 15:17:34.475993-0800 PolyNome[20602:880389] [aqme] 1640: EXCEPTION thrown (-50): -
2020-11-25 15:17:43.424327-0800 PolyNome[20602:879922] RPCTimeout.mm:55:_ReportRPCTimeout: Start: Mach message timeout. Apparently deadlocked. Aborting now.
CoreSimulator 732.18.0.2 - Device: iPhone 8 Plus (796F538B-78DA-4FE7-9005-317621931E88) - Runtime: iOS 12.4 (16G73) - DeviceType: iPhone 8 Plus


As I said, the only thing that's changed since it last worked is that I upgraded to Big Sur.

It runs fine in the iOS Simulator, but not in simulators with a lower iOS version.

The Audio Output of the Simulator is set to Internal Speakers.

Any help is much appreciated.


Still having the grinding to a halt issue, using Xcode 12.5, testing on simulator running iOS 12.
Having the same issue. MacBook Air M1, Xcode 12.5, testing on simulator running iOS 14.5. How is this still not fixed? So many people are having issues with this! This is insane.

How can this still be an issue @Apple. Ever since Big Sur the backwards compatibility went to bits and pieces and required me to install Catalina on a different partition to test anything below below iOS 14. On top I can't run anything above 14.4 because of different issues. Its a mess.

Same story here. Simulators with iOS 12.2 crash and burn when initializing audio on

[AudioHAL_Client] HALB_IOBufferManager.cpp:226:GetIOBuffer: HALB_IOBufferManager::GetIOBuffer: the stream index is out of range

just like OP stated. I'm on Big Sur 11.6 and XCode 12.5.1

I downloaded the iOS 14.3 runtime and now it works. Not an acceptable solution and it's been 9 months since the OP. C'mon Apple, let's go.

Surprise, surprise! Yesterday I updated my macOS to Monterey Version 12.1. Today, with Xcode 13.1,

I can play audio in Simulators with iOS 12.4 as I described in this thread one year ago.

I suggest everybody to check if your problem is solved with macOS 12.1 as well.

Its Aug 2022 and this is still an issue. Our app needs to support iOS 12/13 and we have no way of effectively testing our app. So I guess the only way apple expects us to work is to feature flag our app and remove all audio components on app start via a launch argument? If anyone from apple will ever look here they will tell you, to create an issue report on their feedback site. The issue with that is that no is ever looking there either. Time is on their side, unfortunately for us devs who need to deal with these issues it is giant waste of time.

Simulator crashing with iOS &lt; 14. Started happening since Big Sur
 
 
Q