When I try to run DemoRunner (JUCE 6.1.2) project on iPhone 6 (iOS 12.4) simulator, application crash (signal SIGABRT) when call AudioOutputUnitStart (audioUnit);
Callstack;
#0
0x000000011212492e in __pthread_kill ()
#1
0x00000001121a35bd in pthread_kill ()
#2
0x0000000111ee701d in abort ()
#3
0x000000010cf2b5e2 in _ReportRPCTimeout(char const*, int) ()
#4
0x000000010cb8918b in _CheckRPCError(char const*, int, int) ()
#5
0x000000010cb8e6a7 in AURemoteIO::Start() ()
#6
0x000000010cf403b5 in AUMethodStart(void*) ()
#7
0x00000001097ea0fb in juce::iOSAudioIODevice::Pimpl::open(juce::BigInteger const&, juce::BigInteger const&, double, int) at /Users/thiagoguimaraes/Projects/JUCE/modules/juce_audio_devices/native/juce_ios_Audio.cpp:475
#8
0x00000001097e9dc6 in juce::iOSAudioIODevice::open(juce::BigInteger const&, juce::BigInteger const&, double, int) at /Users/thiagoguimaraes/Projects/JUCE/modules/juce_audio_devices/native/juce_ios_Audio.cpp:1357
Dump;
2021-11-16 12:30:13.606609-0300 DemoRunner[7330:147091] [AudioHAL_Client] HALB_IOBufferManager.cpp:226:GetIOBuffer: HALB_IOBufferManager::GetIOBuffer: the stream index is out of range
2021-11-16 12:30:13.607500-0300 DemoRunner[7330:147091] [AudioHAL_Client] HALB_IOBufferManager.cpp:226:GetIOBuffer: HALB_IOBufferManager::GetIOBuffer: the stream index is out of range
I have the same problem with my app, when it’s running on iPhone 6. If anyone can help me, I appreciate it. I’m not sure which version of JUCE this problem started from.
It looks like I can successfully run the DemoRunner in the iPhone 6 (12.4) simulator on Xcode 12.4, macOS 10.15 (Intel). However, the exact same code crashes in the way you describe in the iPhone 6 (12.4) simulator on Xcode 13.1, macOS 12.0.1 (Arm). In addition the crash doesn’t seem to be consistent. I got it to work a couple of times on the macOS 12.0.1 machine, but I’m not sure what I did to allow it to work. It ran successfully just after I’d adjusted the audio I/O settings for the simulator, so perhaps that’s related. However, I carried on adjusting the audio settings after that, and the app crashed on all subsequent runs.
Apparently other people are seeing similar issues in non-JUCE code so I think there’s a reasonable chance this is a Simulator bug.
I believe that the same problem that happens in the simulator also happens in the device. But right now, I don’t have the device to be able to test it. When I can test directly on an iPhone 6 device, I’ll send information.
I downloaded the JUCE 6.0.8 version, opened the DemoRunner iOS project, using Xcode 13.1 and macOS Big Sur, I compiled and ran it in the iPhone 6 simulator and the problem happened the same way. I believed this bug could have started after JUCE 6.0.8, but now I’m not sure when this issue might have started.
It looks like I can successfully run the DemoRunner in the iPhone 6 (12.4) simulator on Xcode 12.4, macOS 10.15 (Intel). However, the exact same code crashes in the way you describe in the iPhone 6 (12.4) simulator on Xcode 13.1, macOS 12.0.1 (Arm).
As for the behavior you described, using different development environments; The released version of this application, when it was published on the Apple Store (around 3 months ago), was compiled and archived using Xcode 12.4 running on macOS Catalina 10.15.7 with JUCE 6.1.2.
I think the issue might depend on the Xcode/Simulator version. Are you able to download an older Xcode (11 or 12) and check whether your app runs correctly when running it on an older version of Simulator?