Unity Locksup Infinitely with Domain Reload as well as ERR_MEMORY leak issue

So I’m dealing with two issues here.

One related to the SystemNotInitializedException: [FMOD] Initialization failed : FMOD.Studio.System.create : ERR_MEMORY : Not enough memory or resources. memory leak error.

And another dealing with Domain Reload and a Locking up.

The memory leak one is simple, I’m using FMOD with timeline, and replaying the timeline cutscene repeatedly builds up the usage of memory and eventually prevents usage of FMOD.

This only became an issue after experimenting with FMOD with timeline.
For context my playmode settings are on, and I’m just using Reload Scene.

When I tried removing the settings or activated Domain Reload, I noticed that Unity locks up right away telling me Hold On (busy for x) Application.Reload.

This is very frustrating to deal with so late in my projects development now, and I’ve already devoted a lot of time to implimenting FMOD…

Edit* I just discovered that if I play the timeline cutscene once with fmod players added to it and then attempt to edit and compile code, it’ll also lock on Reload Script Assemblies.

This only happens with fmod being used with timeline it seems… i never experienced any of these issues before it.

Thanks for letting us know about these issues. Unfortunately I haven’t been able to reproduce them so far. What versions of FMOD and Unity are you using? Are you able to send us a stripped-down project that demonstrates the issue?

I’ve run into a pretty similar issue (infinite Unity Domain Reload) and managed to fix it by doing this:

            FMOD.Studio.INITFLAGS studioInitFlags;
            //FIX FOR CRASHES
            studioInitFlags = FMOD.Studio.INITFLAGS.SYNCHRONOUS_UPDATE;
            //ORIGINAL LINE

As for the root cause of the issue, I assume there is some thread shenanignas / issue inside FMOD which prevents me from shutting down the system correctly. That is what my callstack indicates at least
FMOD callstack

I don’t have time to debug this further, but it could also have something to do with either some Unity / Mono quirks (link or with my computer setup (Unity + FMOD For Unity Plugin, but without FMOD Studio installed, since I’m a programmer).

I hope that helps you debug this @ben_fmod

Hi Martin, apologies for the delayed response- I have reproduced the original issue and verified that your workaround prevents the infinite domain reload, though I am still getting occasional crashes.
We are currently in the process of reworking the auditioning system which should resolve these timeline issues in an upcoming release. I have passed your suggested workaround on to the development team to help them investigate the underlying issue, thank you for the suggestion!

1 Like