[FMOD] assert : assertion: 'mMagic == MAGIC_WORD' failed

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 ? :grin:

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! )

1 Like


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?

1 Like

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:

[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.

1 Like

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!