Audio keeps playing in Unity after code change during play mode

Here are the different options for how Unity will handle “Script Changes While Playing” and the corresponding effect it has on FMOD:

  • Recompile and Continue Playing - Hard Crash (see core dump below)
  • Stop Playing and Recompile - Hard Crash (see core dump below)
  • Recompile After Finish Playing - FMOD continues playing audio even after playmode exits (But after repeated plays, it does hard crash too)

Core Dump (excerpt) Here - FMOD Crashed Thread:

Thread 179 Crashed: 0 libsystem_kernel.dylib
0x00007fff692c233a __pthread_kill + 10 1 libsystem_pthread.dylib
0x00007fff6937ee60 pthread_kill + 430 2 libsystem_c.dylib
0x00007fff69249808 abort + 120 3 com.unity3d.UnityEditor5.x
0x0000000105a73bce HandleSignal(int, __siginfo*, void*) + 62 4
libmonobdwgc-2.0.dylib 0x00000001458ba9bd mono_chain_signal + 79 5 libsystem_platform.dylib 0x00007fff693735fd _sigtramp + 29 6 ??? 000000000000000000 0 + 0 7
com.fmod.fmodstudioL 0x0000000160832cd6 0x1605fe000 + 2313430 8 com.fmod.fmodstudioL 0x00000001607eb1df 0x1605fe000 + 2019807 9 com.fmod.fmodstudioL
0x00000001607ea9be 0x1605fe000 + 2017726 10 com.fmod.fmodstudioL
0x000000016081c5a4 0x1605fe000 + 2221476 11 com.fmod.fmodstudioL
0x00000001607f6390 0x1605fe000 + 2065296 12 libsystem_pthread.dylib 0x00007fff6937f109 _pthread_start + 148 13 libsystem_pthread.dylib
0x00007fff6937ab8b thread_start + 15

Is this a problem in FMOD? I’m using 2.01.07.

For anyone else with this problem, my current workaround is to disable compilation during play mode and reenable it after exiting playmode. Example here.

Stack Overflow here. I was unable to login to the forum for some reason so I posted there first.

1 Like

I am unable to reproduce the results you are seeing. Are you able to share either a project that reproduces this or the crash dump?

Sure thing! I have a few crash dumps. The project is my game, so I can’t share that. If the crash dumps don’t help, then maybe I can create a test project. I’ve got three of these dumps, but it says I’m not allowed to share files. Here’s a link to a google drive. I’ll disable it after you’re got them.

Thanks very much for the information, unfortunately I am still unable to reproduce the issue.

I’m assuming this is the same project that has the ‘Cleaning up duplicate platform warning’:

Are you able to reproduce this in a new empty project at all?

I can try to do this at some point, but since I’ve got the workaround shared above, and am already fighting the other FMOD bug you referenced (which is holding up game development), I’ve got to prioritize the time I’m spending debugging FMOD code.

Sincerely meaning no offense whatsoever, it’s just that I still have a game to build :slight_smile:

That’s fair, we are still investigating this but having a reliable reproduction would be immensely helpful in finding the cause. You can also upload files to your FMOD Profile and we will be able to access them, if you do not wish to put them up on the forum.