Unity's editor freezes on event stop

So for the last month of jumping back to my project I was trying to debug why Unity freezes after an event stops. It turns out it only freezes in the editor, builds work perfectly. I was trying to pin down the problem with windows’ event log and process viewer with no clues. I’ve searched through my code for every single possible problem I’m aware of and found nothing. There are no leaks, since the build behaves properly.
So the details and what I could find:

  • Live Update is off. The editor freeze happens even when FMOD Studio is off.
  • No version mismatches (that would make the build also not work). I used FMOD 2.03.07, even after updating to 2.03.08 nothing changed. Unity version is 6000.0.35f1
  • Backend is IL2CPP.
  • All FMOD settings sound.
  • Played event is like the simplest possible one.

As a last ditch effort I tried to get help from ChatGPT and it was spitting various stuff like “there is this setting that was formerly in the settings, now you can only change it via code” which doesn’t tell me anything about the issue.

One simple detail I can give is that the freeze is so instant that even debug console logs in unity don’t stand a chance to log whether the event is stopping (I got a log for this like only once per tens of attempts)

Hi,

Thank you for the information.

Would it be possible to run the Unity Profiler to try identify the freeze.

Is there any audible stutters or is it only visual? Could we also run the Studio Profiler (FMOD Studio | Profiling) to see if the stutter is heard?

It’s difficult to profile anything inside Unity as the editor just literally stops. I can’t focus the app at all. I tried a few times to look at the profiler what happens and apparently jus nothing happens. It does register the normalized spikes of activity when actually triggering the event as well as my game logic, but nothing unusual is registered at the freeze. I specifically made a simple scene with just a button to play the sound, in another project with exactly the same audio logic as used in the previous one. Nothing apparently is registered by Unity Profiler.

As for your profiler I’m not sure if I’m doing it right, It’s my first time using that - I’ve recorded two sessions, just creating them a pressing record, then playing the scene in Unity. I’m not sure it it’s correct, because this profiler also didn’t show anything. I packaged the two sessions, but this forum doesn’t allow sending these.

1 Like

I’ve found a thing actually, I played two sounds simultaneously, first one longer second one shorter in between. The shorter one didn’t cut off the longer one, the freeze happened after the long one finished.

Thank you for all the information.

Apologies, to connect the profiler to Unity you need to enable live update:


FMOD Studio | Glossary - Live Update.

Files can be uploaded to your profile.

Would it be possible to also upload the test Unity project to your profile as well showing the error?

Sorry for the delay, got stuck in other work.


So live update worked, and everything snaps out of existence when silence falls. I uploaded the .fspackage, but as for the project I’m afraid it wouldn’t be possible. Also It happens for me on any project for which I install the FMOD package on the version earlier mentioned: Unity 6000.0.35f1 + FMOD 2.03.08. I can eventually send you the code, but not the entire project.

Thank you for the profiler sessions.

Are you stopping the editor after the two events have played or is it freezing and causing the profiler to stop recording? From the profiler I can see 2 events being played in the MixedClips recording and them the recording stopping but I cannot see any freezing?

Is it possible to play some background music and then start a short event that will cause the Unity editor to freeze all the while the profiler is recording? This way we can try record some ‘normal’ behavior to compare against the freeze.

Just quickly responding here, I’ll do the music check tomorrow. The editor is freezing when the two events finish. The freeze literally makes anything in the editor unclickable. The profiler seems to finish also since I guess it can’t reach Unity any further. I’m not that good at games to perfectly stop the editor right at the end of the events.

1 Like

Alright so the music test was an interesting find. So I played a music event first in place of the cancel sound, and the editor froze just after I played the okay sound and it finished. The profiler has the recording cut as usual - but. Despite the editor being frozen the music still played, and it was the editor 100% because when I closed it with task manager as I usually do the music stopped.

1 Like

Thank you for testing that and the information. Would it be possible to test an updated Unity version to see if the issue persists?

These two are currently recommended by Unity Hub.