# FMOD crash when loading/unloading banks

**URL:** <https://qa.fmod.com/t/fmod-crash-when-loading-unloading-banks/23764>\
**Category:** FMOD Studio\
**Created:** [December 4, 2025, 4:00pm UTC](https://qa.fmod.com/t/fmod-crash-when-loading-unloading-banks/23764 "2025-12-04T16:00:59Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![slojanko](https://avatars.discourse-cdn.com/v4/letter/s/fbc32d/32.png) [@slojanko](https://qa.fmod.com/u/slojanko)\
**Post date:** [December 4, 2025, 4:00pm UTC](https://qa.fmod.com/t/fmod-crash-when-loading-unloading-banks/23764/1 "2025-12-04T16:00:59Z")

</div>

Hey,

we have a strange crash regarding loading and unloading banks, while a “master” event is playing continuously and switching between referenced events using logic based on parameter.

In our “master” event, which is always playing, we want to periodically switch to different referenced events. At the time of the switch, we unload the bank containing the previously playing event, and calling load bank on the new referenced event. At the same time we set a different parameter value on the “master” event, to perform the switch to a different referenced event.

Because all these 3 steps (load, unload and parameter) happen at the same time, FMOD can crash internally causing Unity Editor to hard crash too.

Is there any mechanism to reliably detect when FMOD fully switched to playing a different event? We could have a while loop to wait for the new bank to load, but I’m not sure how to know when the previous bank can be unloaded. What makes it even more confusing is that it works on Android, using web requests for loadBank - I would expect this platform to also crash.

Seems like some race condition, but without some internal knowledge of FMOD I can’t say for sure.  
We have FMOD running on a separate thread with its own update loop, so our parameter switch request is not processed instantly.

The only info we get from FMOD is: [FMOD] assert : assertion: ‘mEventInstance’ failed, including unsymbolicated stack - I can’t share it until tomorrow if it would help.

Old post:

> **Summary**
>
> The flow for us is as follows:
> 
> - We switched off the Setting to include referenced event assets into banks, because it was duplicating assets and increasing size
> - We have a Master event playing, and it has selection logic to switch between several Referenced and non-referenced events
> - Banks that contain referenced events can be loaded/unloaded at any time
> - If the Master event is currently playing and we want to switch to a different event, several steps happen:
> - We load a new bank if switching to a referenced event, which is inside an unloaded bank
> - We unload the previous bank if switching from a referenced event
> - We switch a parameter - always
> - Master event is never stopped - this is most likely the reason for our crash
> 
> - In Unity Editor, an error occurs inside FMOD, when switching from a referenced to a non-referenced event - this scenario forces #2 and #3 steps (from above)
> - [FMOD] assert : assertion: ‘mEventInstance’ failed - this happens inside FMOD library, so its a hard crash where Unity can’t recover
> 
> So in the Unity editor, we probably shouldn’t unload the bank contained the currently playing referenced event, because we’re running FMOD on a separate thread with its own update loop that processes our requests at a later time.
> 
> Is there any way to safely handle this? We could switch the parameter, wait for X amount of seconds (should be callback ideally), and then unload.
> 
> We’re also targeting Android on our project, and there the crash doesn’t happen at all, so it could be undefined behaviour too, basically race condition.

---

<div class="post-metadata">

**Author:** ![Connor\_FMOD](https://yyz2.discourse-cdn.com/flex036/user_avatar/qa.fmod.com/connor_fmod/32/3685_2.png) [@Connor\_FMOD](https://qa.fmod.com/u/Connor_FMOD)\
**Post date:** [December 4, 2025, 10:35pm UTC](https://qa.fmod.com/t/fmod-crash-when-loading-unloading-banks/23764/2 "2025-12-04T22:35:44Z")

</div>

Hi,

Thank you for the information and reproduction steps.

Could I please grab your Unity and FMOD integration versions please?

There have recently been some fixes related to bank loading:

- 2.03.04 - Studio API - Fixed a crash caused by changing an event via live update and then unloading one of its assets banks.
- 2.03.03 - Studio API - Fixed a crash when unloading an assets bank before its associated metadata bank.
- 2.03.01 - Studio API - Fixed a crash when unloading a bank containing a global parameter that automates a modulator property on another global parameter.

---

<div class="post-metadata">

**Author:** ![slojanko](https://avatars.discourse-cdn.com/v4/letter/s/fbc32d/32.png) [@slojanko](https://qa.fmod.com/u/slojanko)\
**Post date:** [December 5, 2025, 9:57am UTC](https://qa.fmod.com/t/fmod-crash-when-loading-unloading-banks/23764/3 "2025-12-05T09:57:46Z")

</div>

Both versions are on 2.02.26

Currently it’s a bit impractical to update to a newer version, so we would like to investigate possible alternatives.

Maybe the problem can be first simplified to an easier case first, where you unload a bank while an event from that bank is playing. Is it safe to do this, or if it’s not, is stopping of an event an immediate operation or also queued to be processed by the FMOD system tick?

Is there a documentation page that explains which API calls are delayed? This would help a lot to determine what’s blocking and processed instantly.

---

<div class="post-metadata">

**Author:** ![Connor\_FMOD](https://yyz2.discourse-cdn.com/flex036/user_avatar/qa.fmod.com/connor_fmod/32/3685_2.png) [@Connor\_FMOD](https://qa.fmod.com/u/Connor_FMOD)\
**Post date:** [December 7, 2025, 9:52pm UTC](https://qa.fmod.com/t/fmod-crash-when-loading-unloading-banks/23764/4 "2025-12-07T21:52:53Z")

</div>

Thanks for the info.

> [@slojanko](#):
>
> where you unload a bank while an event from that bank is playing. Is it safe to do this

Unlading a bank should stop and release any events created with it: [FMOD Engine | Studio Api Bank - Studio:: bank::Unload](https://fmod.com/docs/2.03/api/studio-api-bank.html#studio_bank_unload), so it should be safe to unload it with playing events. When building your banks are they split into metadata and asset banks? [FMOD Studio | Getting Events Into Your Game - Building Metadata And Assets To Separate Banks](https://fmod.com/docs/2.03/studio/getting-events-into-your-game.html#building-metadata-and-assets-to-separate-banks)

> [@slojanko](#):
>
> is stopping of an event an immediate operation or also queued to be processed by the FMOD system tick?

Commands are added to a queue, it is possible to flush the queue with: [FMOD Engine | Studio Api System - Studio::System::Flushcommands](https://fmod.com/docs/2.03/api/studio-api-system.html#studio_system_flushcommands).

> [@slojanko](#):
>
> Is there a documentation page that explains which API calls are delayed? This would help a lot to determine what’s blocking and processed instantly.

[FMOD Engine | Studio Api Threads - Studio Asynchronous Mode](https://fmod.com/docs/2.03/api/studio-api-threads.html#studio-asynchronous-mode)

---

<div class="post-metadata">

**Author:** ![slojanko](https://avatars.discourse-cdn.com/v4/letter/s/fbc32d/32.png) [@slojanko](https://qa.fmod.com/u/slojanko)\
**Post date:** [December 9, 2025, 7:58am UTC](https://qa.fmod.com/t/fmod-crash-when-loading-unloading-banks/23764/5 "2025-12-09T07:58:53Z")

</div>

Our banks are split into metadata, streaming and non-streaming, but we currently unload all 3.

If unloading a bank also stops contained events, then this crash is unexpected, if I understand?

We can try the FlushCommands if it’s a potential solution.

---

<div class="post-metadata">

**Author:** ![Connor\_FMOD](https://yyz2.discourse-cdn.com/flex036/user_avatar/qa.fmod.com/connor_fmod/32/3685_2.png) [@Connor\_FMOD](https://qa.fmod.com/u/Connor_FMOD)\
**Post date:** [December 9, 2025, 8:56pm UTC](https://qa.fmod.com/t/fmod-crash-when-loading-unloading-banks/23764/6 "2025-12-09T20:56:10Z")

</div>

Thank you for the information. The crash could potentially be linked too:

- Studio API - Fixed a crash when unloading an assets bank before its associated metadata bank.

Making sure the asset banks are unloaded before the metadata bank? Flushing commands between each unload function could help too.

> [@slojanko](#):
>
> Is there any mechanism to reliably detect when FMOD fully switched to playing a different event?

Since we are using a `Parent` event that is calling `referenced` events it is slightly harder. You could use [FMOD Engine | Studio Api Eventinstance - Fmod::Studio::Event::Callback::SOUND\_PLAYED](https://fmod.com/docs/2.03/api/studio-api-eventinstance.html#fmod_studio_event_callback_type:~:text=Parameters%20%3D%20FMOD_STUDIO_TIMELINE_BEAT_PROPERTIES.-,FMOD_STUDIO_EVENT_CALLBACK_SOUND_PLAYED,Called%20when%20the%20event%20plays%20a%20sound.%20Parameters%20%3D%20Sound.,-FMOD_STUDIO_EVENT_CALLBACK_SOUND_STOPPED) which will be triggered when a new sound is played in conjunction with [FMOD Engine | Core Api Sound - Sound::Getname](https://fmod.com/docs/2.03/api/core-api-sound.html#sound_getname) to confirm the sound played is the expected referenced event.

Would it be possible to create a small test Unity project that you could share so I could test it on my end? It can be uploaded to your [profile](https://fmod.com/profile#uploads)

---

<div class="post-metadata">

**Author:** ![slojanko](https://avatars.discourse-cdn.com/v4/letter/s/fbc32d/32.png) [@slojanko](https://qa.fmod.com/u/slojanko)\
**Post date:** [December 10, 2025, 8:11am UTC](https://qa.fmod.com/t/fmod-crash-when-loading-unloading-banks/23764/7 "2025-12-10T08:11:43Z")

</div>

Hey,

we will also try reordering the unload of banks, just to test if a workaround is also unloading metadata bank before assets/streaming banks.

For the repo, it will take some time, will hopefully get back to you next week.

Thanks for the extra ideas 🙂

---

<div class="post-metadata">

**Author:** ![Connor\_FMOD](https://yyz2.discourse-cdn.com/flex036/user_avatar/qa.fmod.com/connor_fmod/32/3685_2.png) [@Connor\_FMOD](https://qa.fmod.com/u/Connor_FMOD)\
**Post date:** [December 10, 2025, 10:21pm UTC](https://qa.fmod.com/t/fmod-crash-when-loading-unloading-banks/23764/8 "2025-12-10T22:21:11Z")

</div>

Awesome, please let me know if there is anything else we can do
