Unloading 1656 unused Assets to reduce memory usage. Loaded Objects now: 27406.
Total: 471.490548 ms (FindLiveObjects: 4.758916 ms CreateObjectMapping: 2.750689 ms MarkObjects: 446.840974 ms DeleteObjects: 17.138245 ms)
Fallback handler could not load library /home/otaviosoato/Unity/Hub/Editor/2019.4.8f1/Editor/Data/Mono/lib/libAssets/Code/Plugins/FMOD/lib/linux/x86_64/libfmodstudioL.so
Fallback handler could not load library /home/otaviosoato/Unity/Hub/Editor/2019.4.8f1/Editor/Data/Mono/lib/libAssets/Code/Plugins/FMOD/lib/linux/x86_64/libfmodstudioL.so
Thanks for letting us know about this. Unfortunately I have been unable to reproduce the problem here.
I suspect the cause has to do with this error message:
The path in that message looks quite wrong - it’s trying to load the FMOD native library from a location within the Unity installation directory, rather than within the project directory as it should be. Do you know why that might be? Have you moved any FMOD files around?
Having similar problems with freezes when starting/stopping the game in the editor, which on my side seems to be caused by stack overflows in FMOD due to logging. Try setting the FMOD log level to ERROR or NONE.
We are using Unity 2020.3.13f1 and FMOD Studio Unity Integration 2.00.10.
When I start the game in the editor, I see the following message in the Unity console: “Couldn’t extract exception string from exception of type StackOverflowException (another exception of class ‘NullReferenceException’ was thrown while processing the stack trace)”. When I stop it, the editor then freezes.
Here is an excerpt from my Editor.log file:
Fallback handler could not load library /home/flortsch/Unity/Hub/Editor/2020.3.13f1/Editor/Data/Mono/lib/libAssets/Plugins/FMOD/lib/linux/x86_64/libfmodstudioL.so
Fallback handler could not load library /home/flortsch/Unity/Hub/Editor/2020.3.13f1/Editor/Data/Mono/lib/libAssets/Plugins/FMOD/lib/linux/x86_64/libfmodstudioL.so
Fallback handler could not load library /home/flortsch/Unity/Hub/Editor/2020.3.13f1/Editor/Data/Mono/lib/libAssets/Plugins/FMOD/lib/linux/x86_64/libfmodstudioL.so
Fallback handler could not load library /home/flortsch/Unity/Hub/Editor/2020.3.13f1/Editor/Data/Mono/lib/libAssets/Plugins/FMOD/lib/linux/x86_64/libfmodstudioL.so
Fallback handler could not load library /home/flortsch/Unity/Hub/Editor/2020.3.13f1/Editor/Data/Mono/lib/libAssets/Plugins/FMOD/lib/linux/x86_64/libfmodstudioL.so
Fallback handler could not load library /home/flortsch/Unity/Hub/Editor/2020.3.13f1/Editor/Data/Mono/lib/libAssets/Plugins/FMOD/lib/linux/x86_64/libfmodstudioL.so
Fallback handler could not load library /home/flortsch/Unity/Hub/Editor/2020.3.13f1/Editor/Data/Mono/lib/libAssets/Plugins/FMOD/lib/linux/x86_64/libfmodstudioL.so
Fallback handler could not load library /home/flortsch/Unity/Hub/Editor/2020.3.13f1/Editor/Data/Mono/lib/libAssets/Plugins/FMOD/lib/linux/x86_64/libfmodstudioL.so
[FMOD] FMOD_OS_Thread_Callback : Cannot set real-time thread priorities due to insufficient privileges
UnityEngine.StackTraceUtility:ExtractStackTrace () (at /home/bokken/buildslave/unity/build/Runtime/Export/Scripting/StackTrace.cs:37)
UnityEngine.DebugLogHandler:LogFormat (UnityEngine.LogType,UnityEngine.Object,string,object[])
UnityEngine.Logger:Log (UnityEngine.LogType,object)
UnityEngine.Debug:LogWarning (object)
FMODUnity.RuntimeManager:DEBUG_CALLBACK (FMOD.DEBUG_FLAGS,FMOD.StringWrapper,int,FMOD.StringWrapper,FMOD.StringWrapper) (at Assets/Plugins/FMOD/src/Runtime/RuntimeManager.cs:32)
(Filename: Assets/Plugins/FMOD/src/Runtime/RuntimeManager.cs Line: 32)
Stack overflow in unmanaged: IP: 0x7eff001f5236, fault addr: 0x7eff1d1adfd8
Stack overflow in unmanaged: IP: 0x7eff00240bc3, fault addr: 0x7eff1d1abf38
Stack overflow in unmanaged: IP: 0x7eff00218613, fault addr: 0x7eff1d1abfdc
Stack overflow in unmanaged: IP: 0x7eff00240bc3, fault addr: 0x7eff1d1aa118
Stack overflow in unmanaged: IP: 0x7eff00240bc3, fault addr: 0x7eff1d1a9f78
Stack overflow in unmanaged: IP: 0x7eff00202b1c, fault addr: 0x7eff1d1aafc8
Couldn't extract exception string from exception of type StackOverflowException (another exception of class 'NullReferenceException' was thrown while processing the stack trace)
Stack overflow in unmanaged: IP: 0x558da0c81ff0, fault addr: 0x7eff1d1a9580
Stack overflow in unmanaged: IP: 0x7f002ae1213b, fault addr: 0x7eff1d1a8e40
This looks like a bug that was fixed in release 2.01.11, caused by the stack size of the FMOD file thread being too small. Is it possible for you to test that version and see if it resolves your problem?
I tested it with a new plain 2D Unity project (2020.3.21f1) and FMOD integration (2.01.11), but still the same issue. Now, also setting loglevel to NONE or ERROR freezes the editor when starting the play mode. I set the loglevel to LOG and provided a pastebin of the editor log, maybe it helps you to further debug the issue.
Thank you for the additional info, and apologies for the delay in responding.
I couldn’t reproduce this issue- just to clarify, setting it to WARNING or LOG works fine but NONE or ERROR freezes the Editor?
Does this issue reproduce in 3D Unity projects as well? What Linux distro are you using?
Hey @jeff_fmod. I did some further testing with different system configurations, and it seems that the issue regarding the stack overflows and different log levels is fixed with newer Unity FMOD integrations. Tested with Unity 2020.3.25f1, FMOD Integration 2.02.04, both 2D and 3D project, running on ArchLinux with PulseAudio 15.0.
In my previous posting, I said the Unity editor freezes no matter what log level I set. This seems to be unrelated to the log level or Unity in general, but more a problem when running the FMOD engine on PipeWire. E.g., I still have this freezing issue in the Unity editor running on PipeWire 0.3.42. Also, FMODStudio does not start when running on PipeWire, whereas it does when using PulseAudio. Different people on the PipeWire repository also report having audio issues with games based on FMOD. But I should open a new topic for this.
Edit/Addition: I figured out one can provide FMOD_ALSA_DEVICE=pulse as environment variable when running the Unity Editor or FMODStudio, and then both also work on PipeWire.
Thank you for getting back to us on this issue. We did have some problems with PulseAudio and PipeWire on Fedora that have recently been resolved. To help me reproduce this freezing issue, would you mind telling me what Linux distribution you are using?
Thank you for confirming- apologies I now see you had mentioned that already.
Going through the pipewire repo discussions I believe that this issue should be fixed in 2.02.05, can you please try updating and see if that allows Unity to run correctly without needing to manually set the environment variable?