I was recently experiencing this same issue and was able to create a minimal Unity project to reproduce it. I assumed it was a but with Steam Audio, so I posted an issue to its GItHub Issues page: [Unity + FMOD] Error when exiting Play Mode while a Steam Audio Source is attached to an FMOD Studio Event Emitter · Issue #244 · ValveSoftware/steam-audio · GitHub
My report from there:
Video:
I created a minimal project using:
- Unity 2021.3.18f1
- FMOD Studio integration 2.02.12 from FMOD’s website
- Steam Audio version 4.1.3 from the GitHub releases
If the FMOD Event has the Steam Audio Spatializer attached to it, and the Steam Audio Source component is enabled on the Game Object with the FMOD Studio Event Emitter component, then an error will appear upon exiting Play Mode.
The only modification I made to any of the files was a fix for FMOD, so that it would properly recognize the phonon_fmod plugin. I explained the fix here: Bug with loading .bundle plugins on macOS (and the fix for it)
Otherwise, the files are unmodified.
The complete project (both Unity and FMOD Studio) can be downloaded here: Steam Audio Bug Repro 2.zip - Google Drive
The error messages themselves, from Editor.log
, are:
[FMOD] assert : assertion: 'mImpl->mRefCount > 0' failed
UnityEngine.StackTraceUtility:ExtractStackTrace () (at /Users/bokken/build/output/unity/unity/Runtime/Export/Scripting/StackTrace.cs:37)
UnityEngine.DebugLogHandler:LogFormat (UnityEngine.LogType,UnityEngine.Object,string,object[])
UnityEngine.Logger:Log (UnityEngine.LogType,object)
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)
(Filename: Assets/Plugins/FMOD/src/RuntimeUtils.cs Line: 574)
[FMOD] AsyncManager::asyncThreadLoop : System::update returned error 28.
UnityEngine.StackTraceUtility:ExtractStackTrace () (at /Users/bokken/build/output/unity/unity/Runtime/Export/Scripting/StackTrace.cs:37)
UnityEngine.DebugLogHandler:LogFormat (UnityEngine.LogType,UnityEngine.Object,string,object[])
UnityEngine.Logger:Log (UnityEngine.LogType,object)
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)
(Filename: Assets/Plugins/FMOD/src/RuntimeUtils.cs Line: 574)
I hope this is able to help with diagnosing and fixing the issue!