# \[FMOD\] assert : assertion: 'mMagic == MAGIC\_WORD' failed

**URL:** <https://qa.fmod.com/t/fmod-assert-assertion-mmagic-magic-word-failed/19407>\
**Category:** Unity\
**Tags:** unity\
**Created:** [October 16, 2022, 6:38pm UTC](https://qa.fmod.com/t/fmod-assert-assertion-mmagic-magic-word-failed/19407 "2022-10-16T18:38:12Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![ironsloth](https://avatars.discourse-cdn.com/v4/letter/i/f07891/32.png) [@ironsloth](https://qa.fmod.com/u/ironsloth)\
**Post date:** [October 16, 2022, 6:38pm UTC](https://qa.fmod.com/t/fmod-assert-assertion-mmagic-magic-word-failed/19407/1 "2022-10-16T18:38:12Z")

</div>

Hi, I am getting this obsure error in Unity log from times to times in my project since 1 year, it sometimes dissapear with versions updates but it’s still here today.  
The error seems to be linked to loading/closing the play mode of Unity… and it seems totally harmless. But I am wondering where this “MAGIC WORD” come from ? 😁

Currents versions is Unity 2021.3.3f1 and FMOD 2.02.09

> [FMOD] assert : assertion: ‘mMagic == MAGIC\_WORD’ failed
> 
> UnityEngine.Debug:LogError (object)  
> FMODUnity.RuntimeUtils:DebugLogError (string) (at Assets/Plugins/FMOD/src/RuntimeUtils.cs:574)  
> FMODUnity.RuntimeManager:DEBUG\_CALLBACK (FMOD.DEBUG\_FLAGS,intptr,int,intptr,intptr) (at Assets/Plugins/FMOD/src/RuntimeManager.cs:77)

(Thanks for working on such an awesome software, Fmod make me happy everyday where I have to use it! )

---

<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:** [October 19, 2022, 11:07pm UTC](https://qa.fmod.com/t/fmod-assert-assertion-mmagic-magic-word-failed/19407/2 "2022-10-19T23:07:55Z")

</div>

Hi,

Happy to hear your enjoying FMOD!

This error is called when validating different parts of the FMOD system during initialization which means its most likely happening when loading a scene. It indicates either an invalid handle or corrupted memory. I think it may be an invalid handle, are there any other errors accompanying it?

---

<div class="post-metadata">

**Author:** ![ironsloth](https://avatars.discourse-cdn.com/v4/letter/i/f07891/32.png) [@ironsloth](https://qa.fmod.com/u/ironsloth)\
**Post date:** [October 21, 2022, 9:25am UTC](https://qa.fmod.com/t/fmod-assert-assertion-mmagic-magic-word-failed/19407/3 "2022-10-21T09:25:11Z")

</div>

Thanks,  
After trying to reproduce I only managed to get the error when quitting Unity Play mode. And the previous errors is this:

> Closing socket server.  
> UnityEngine.Debug:Log (object)
> 
> Some objects were not cleaned up when closing the scene. (Did you spawn new GameObjects from OnDestroy?)  
> The following scene GameObjects were found:  
> WorldSystemManager  
> LayeredCameraManager
> 
> [FMOD] SampleWaveformResourceInstance::waveformSourceDestroyed : Force unload sample data {44b36822-f21f-400e-8abf-9808a00c5e84} due to bank unload
> 
> [FMOD] assert : assertion: ‘mMagic == MAGIC\_WORD’ failed  
> [FMOD] assert : assertion: ‘mMagic == MAGIC\_WORD’ failed  
> [FMOD] assert : assertion: ‘mMagic == MAGIC\_WORD’ failed  
> [FMOD] assert : assertion: ‘mMagic == MAGIC\_WORD’ failed  
> [FMOD] assert : assertion: ‘mMagic == MAGIC\_WORD’ failed

I guess this is a normal behaviour when a bank is unloaded.  
I will check if I get the errors during scenes transition as well and if yes, I will let you know here.

---

<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:** [October 23, 2022, 11:43pm UTC](https://qa.fmod.com/t/fmod-assert-assertion-mmagic-magic-word-failed/19407/4 "2022-10-23T23:43:26Z")

</div>

Yes, unloading a bank would cause a invalid handle. I would just recommend being careful when you are stopping play and making sure everything is being released correctly.

Keep me updated!
