# FMOD 2.0.0 system-\>init() crash on iOS14

**URL:** <https://qa.fmod.com/t/fmod-2-0-0-system-init-crash-on-ios14/16020>\
**Category:** FMOD Engine\
**Tags:** ios, cpp\
**Created:** [July 28, 2020, 11:47am UTC](https://qa.fmod.com/t/fmod-2-0-0-system-init-crash-on-ios14/16020 "2020-07-28T11:47:30Z")\
**Posts on this page:** 9\
**Page:** 1

<div class="post-metadata">

**Author:** ![Rafaelb149](https://avatars.discourse-cdn.com/v4/letter/r/c67d28/32.png) [@Rafaelb149](https://qa.fmod.com/u/Rafaelb149)\
**Post date:** [July 28, 2020, 11:47am UTC](https://qa.fmod.com/t/fmod-2-0-0-system-init-crash-on-ios14/16020/1 "2020-07-28T11:47:30Z")

</div>

Hi

I’m testing FMOD2.0 core api on iOS14 beta 3 (18A5332e) simulator and facing a crash when trying to init the system.  
FMOD::System \*system;  
FMOD\_RESULT result;

```
result = FMOD::System_Create(&system);
ERRCHECK(result);

result = system->init(32, FMOD_INIT_NORMAL, extradriverdata);
ERRCHECK(result);

```

Crash info:  
**Initialize: Mach message timeout. Apparently deadlocked. Aborting now.**

CoreSimulator 732.7 - Device: iPhone8\_ios14 (C982F92A-B04D-4ED7-AB4D-F8E3BE45E6F9) - Runtime: iOS 14.0 (18A5332e) - DeviceType: iPhone 8

Running same above code on real device iOS14 beta 3 (18A5332f), works fine (no crash).  
The only difference we see is the iOS minor version between simulator and real device (‘f’ instead of ‘e’).

Do you familiar with this crash? is something that you need to fix in your library or is it an iOS issue?

Thanks,  
Rafael

---

<div class="post-metadata">

**Author:** ![LoVic](https://avatars.discourse-cdn.com/v4/letter/l/77aa72/32.png) [@LoVic](https://qa.fmod.com/u/LoVic)\
**Post date:** [July 29, 2020, 6:20pm UTC](https://qa.fmod.com/t/fmod-2-0-0-system-init-crash-on-ios14/16020/2 "2020-07-29T18:20:11Z")

</div>

Have you tried like this?

```
FMOD::System *system;
    FMOD_RESULT result;
    unsigned int version;
    /*
        Create a System object and initialize
    */
    result = FMOD::System_Create(&system);
    ERRCHECK(result);

    result = system->getVersion(&version);
    ERRCHECK(result);

    if (version < FMOD_VERSION)
    {
        // FMOD lib version doesn't match header version
    }
    result = system->init(32, FMOD_INIT_NORMAL, NULL);
```

---

<div class="post-metadata">

**Author:** ![Rafaelb149](https://avatars.discourse-cdn.com/v4/letter/r/c67d28/32.png) [@Rafaelb149](https://qa.fmod.com/u/Rafaelb149)\
**Post date:** [July 29, 2020, 6:47pm UTC](https://qa.fmod.com/t/fmod-2-0-0-system-init-crash-on-ios14/16020/3 "2020-07-29T18:47:48Z")

</div>

I just tried to init with NULL, it doesn’t fix.

---

<div class="post-metadata">

**Author:** ![tristanjl](https://yyz2.discourse-cdn.com/flex036/user_avatar/qa.fmod.com/tristanjl/32/261_2.png) [@tristanjl](https://qa.fmod.com/u/tristanjl)\
**Post date:** [July 30, 2020, 6:22am UTC](https://qa.fmod.com/t/fmod-2-0-0-system-init-crash-on-ios14/16020/4 "2020-07-30T06:22:15Z")

</div>

Hi Rafaelb149,

I can repro the issue. I suspect it’s an issue with the simulator beta, as it doesn’t occur with the last official release. I also was unable to run siri on the simulator.

For the crash, it appears to be reporting that the api cannot connect with a input (ie. microphone). If the issue persists into the full release, please let us know and we will investigate further.

---

<div class="post-metadata">

**Author:** ![dZbear](https://avatars.discourse-cdn.com/v4/letter/d/50afbb/32.png) [@dZbear](https://qa.fmod.com/u/dZbear)\
**Post date:** [October 1, 2021, 2:31pm UTC](https://qa.fmod.com/t/fmod-2-0-0-system-init-crash-on-ios14/16020/5 "2021-10-01T14:31:15Z")

</div>

Hi Tristan, I’m getting the exact same issue on iOS13 simulator with latest fmod core api, here’s my output using the libfmodL version :

```auto
[LOG] SystemI::init : Initialize version=20203 (120077), maxchannels=512, flags=0x00000000
[LOG] SystemI::setOutputInternal : Setting output to 'FMOD Core Audio Output'
[LOG] OutputCoreAudio::init : Hardware buffer size: 256 samples, hardware sample rate: 44100Hz, hardware channels: 2
[LOG] OutputCoreAudio::init : Maximum hardware read size: 4096 samples, Software buffer size: 512 samples, Number of software buffers: 8.
[LOG] Thread::initThread : Init FMOD stream thread. Affinity: 0x4000000000000003, Priority: 0xFFFF7FFB, Stack Size: 98304, Semaphore: No, Sleep Time: 10, Looping: Yes.
[LOG] Thread::initThread : Init FMOD mixer thread. Affinity: 0x4000000000000001, Priority: 0xFFFF7FFA, Stack Size: 81920, Semaphore: Yes, Sleep Time: 0, Looping: Yes.
[39052:7087123] HALB_IOBufferManager_Client::GetIOBuffer: the stream index is out of range
[39052:7087123] HALB_IOBufferManager_Client::GetIOBuffer: the stream index is out of range
[39052:7087123] [aqme] AQME.h:254:IOProcFailure: AQDefaultDevice (1): output stream 0: null buffer
[39052:7087123] [aqme] AQMEIO_HAL.cpp:1774:IOProc: EXCEPTION thrown (-50): error != 0
[39052:7086648] Start: Mach message timeout. Apparently deadlocked. Aborting now.
CoreSimulator 776.3 - Device: iPhone 11 (73DBBB55-CEC7-4B17-8F6E-81914046FC66) - Runtime: iOS 13.7 (17H22) - DeviceType: iPhone 11

```

---

<div class="post-metadata">

**Author:** ![tristanjl](https://yyz2.discourse-cdn.com/flex036/user_avatar/qa.fmod.com/tristanjl/32/261_2.png) [@tristanjl](https://qa.fmod.com/u/tristanjl)\
**Post date:** [October 3, 2021, 10:28pm UTC](https://qa.fmod.com/t/fmod-2-0-0-system-init-crash-on-ios14/16020/6 "2021-10-03T22:28:24Z")

</div>

Hi dZbear,

When we investigated the previous issue, it was due to the simulator, as initializing the audio device would cause the issue and would crash inside the apple api calls. If it’s the same issue, there’s not really anything we can do on our end - the apple apis need to not crash

Having said that, I didn’t encounter any issues testing using up to date simulator releases, and this issue has not shown up on actual devices, so you should be able to work around it by upgrading XCode or testing on device.

---

<div class="post-metadata">

**Author:** ![dZbear](https://avatars.discourse-cdn.com/v4/letter/d/50afbb/32.png) [@dZbear](https://qa.fmod.com/u/dZbear)\
**Post date:** [October 5, 2021, 1:24pm UTC](https://qa.fmod.com/t/fmod-2-0-0-system-init-crash-on-ios14/16020/7 "2021-10-05T13:24:45Z")

</div>

Thanks for the reply, there’s actually no issues on simulator for iOS14 and iOS15, can you confirm that you tested this on iOS13 as well? I’m on latest XCode, and some of our devs require the ability to test under iOS13 on Simulator.

---

<div class="post-metadata">

**Author:** ![tristanjl](https://yyz2.discourse-cdn.com/flex036/user_avatar/qa.fmod.com/tristanjl/32/261_2.png) [@tristanjl](https://qa.fmod.com/u/tristanjl)\
**Post date:** [October 5, 2021, 11:04pm UTC](https://qa.fmod.com/t/fmod-2-0-0-system-init-crash-on-ios14/16020/8 "2021-10-05T23:04:03Z")

</div>

It looks like there are other reports of this issue - [Simulator crashing with iOS \< 1… | Apple Developer Forums](https://developer.apple.com/forums/thread/667921) - so you will have to get Apple to address the issue.

To workaround it for those developers, you can use the no sound output mode - [https://www.fmod.com/resources/documentation-api?version=2.02&page=core-api-system.html#system\_setoutput](https://www.fmod.com/resources/documentation-api?version=2.02&page=core-api-system.html#system_setoutput) and [https://www.fmod.com/resources/documentation-api?version=2.02&page=core-api-system.html#fmod\_outputtype](https://www.fmod.com/resources/documentation-api?version=2.02&page=core-api-system.html#fmod_outputtype)

---

<div class="post-metadata">

**Author:** ![dZbear](https://avatars.discourse-cdn.com/v4/letter/d/50afbb/32.png) [@dZbear](https://qa.fmod.com/u/dZbear)\
**Post date:** [October 7, 2021, 1:39pm UTC](https://qa.fmod.com/t/fmod-2-0-0-system-init-crash-on-ios14/16020/9 "2021-10-07T13:39:42Z")

</div>

Thanks Tristan, this is helpful.
