I am experiencing a hard crash in the Unity Editor on Kubuntu when loading my main game scene. I tried reproducing in a minimal scene (just loading/playing a single sound in an empty scene) and that works fine. I am very certain that it is FMOD that causes the crash, since uncommenting all play calls will make the game run fine. I suspect it might be some sort a threading issue, since it only happens when there are multiple sound sources and triggers set up and also because of the NULL critical section errors.
These errors were typically seen in the log:
[FMOD] FMOD_OS_Thread_Create : pthread_create returned 22
[FMOD] DSP::setParameterData(-2147483648, 0x77dbf23b7630, 431292) returned ERR_INTERNAL for DSP (0x77DBDC1D78C0).
[FMOD] remove : assertion: âcontâ failed
[FMOD] FMOD_OS_CriticalSection_Enter : cannot enter NULL critical section
Environment:
OS: Kubuntu 25.10
Unity Version: 6000.3.7f1, 6000.3.9f1 and 6000.3.10f1
FMOD Integration Version: 2.03.06 and 2.03.12
I can provide a more detailed log if needed. As stated itâs hard to provide a minimal reproduction case, since it does not happen in an empty scene. I have tried almost removing all content of my main scene and it still crashes out when triggering a / enough sounds. I have also tried multiple different levels/scenes, just to make sure that it was not the specific scene that was broken. The bug has been reproduced on two different machines (both running kubuntu) and with 3 different sound cards. It works fine on Windows (exactly the same project), so it does not seem to be project specific, but rather OS+Fmod specific.
Thank you for bringing this to our attention.
Unfortunately, we do not have any machines with Kubuntu installed currently. I will work on this and attempt to reproduce the issue and update you as soon as I can.
Any logs that you have would be great and can be uploaded to your profile.
Hi,
Sorry for not getting back to you earlier. Iâve uploaded a more complete editor.log. Unfortunately I could not include verbose/info log level, since there is the other bug with the stackoverflow in the fmod version we are using. Our âworkaroundâ right now is just to disable all FMOD playback calls with #if !UNITY_EDITOR_LINUX statements and that keeps the game 100% stable in the editor.
As mentioned I have really tried to get a better reproduction scenario, but slowly adding all the game code to an empty scene does not trigger the issue, but even tearing almost everything out of the ânormalâ game scenes still breaks. My best guess is that the normal scenes are triggering a snapshot that might set up a reverb or similar effect and that is actually breaking down in the thread. I obviously tried to trigger a snapshot in my minimal scene, but it did not make it crash. I tried to consult the sands (LLM) and it had this theory:
âOn modern Linux distributions (like recent Kubuntu versions using glibc 2.34 or newer), the operating systemâs minimum required stack size for a thread (PTHREAD_STACK_MIN) is dynamically calculated and is much larger than it used to be. If FMOD is internally hardcoding a small stack size (e.g., 64KB) for its auxiliary threads (like asynchronous decoding or a specific DSP effect like Convolution Reverb), pthread_create will reject it with error 22â
Canât really tell if that has any validity, but I thought I would include it just in case. Let me know if there is anything else I can do to help find the issue. Itâs quite easy to reproduce in my end, so if you want to shoot a special .so (or other binary) with extra logging, Iâd be happy to try that.
1 Like
Hi,
Apologies for the delayed response. I think we may have responded via email and not here.
Thank you for the logs.
I installed Kubuntu, however was still unable to reproduce the issue.
Another user is experiencing something similar and their workaround was to increase the size of the stack space available for all the FMOD threads FMOD Engine | Core Api Common - Thread::Setattributes.
I have slightly modified our Unity Integration | Examples Callback Handler to try implementing the workaround:
using System;
using UnityEngine;
[CreateAssetMenu(menuName = "My FMOD Callback Handler")]
public class MyFMODCallbackHandler : FMODUnity.PlatformCallbackHandler
{
const uint stackSize = 1024 * 1024;
public override void PreInitialize(FMOD.Studio.System studioSystem, Action<FMOD.RESULT, string> reportResult)
{
FMOD.RESULT result;
for (int i = 0; i < (int)FMOD.THREAD_TYPE.MAX; i++)
{
result = FMOD.Thread.SetAttributes(
(FMOD.THREAD_TYPE)i,
FMOD.THREAD_AFFINITY.GROUP_DEFAULT,
FMOD.THREAD_PRIORITY.DEFAULT,
(FMOD.THREAD_STACK_SIZE)stackSize
);
reportResult(result, $"Thread.SetAttributes({i})");
};
}
}
Would it be possible to test in your project? This is not a the final solution, we hope to identify the exact issue and solve that. Would it also be possible to upload the stripped out version of your project that is still reproducing the issue to your profile?
Thank you for assisting investigating this issue.
Hi,
An update, we have identified a solution and it will be included in an the next release. Not 2.03.13 unfortunately. The workaround is still valid in the mean time.
Thank you again for bringing this to our attention.
Hello, i see updates on the plugin in the store, however im unable to find a changelog on fixes for versions other than major releases. Where can i find it? Thanks
Looking at the git project its also not so clear to see the changes because commits dont have much comments to it.