Error: Unity Editor playmode deadlock after using event virtualisation (macOS)

hey everyone,

we’re experiencing a deadlock in the editor after changing some looping sounds to use virtualisation (virtualize) and limit the number of playing events.

macOS 10.15.6, FMOD 2.00.11 and 2.00.12, Unity 2019.4.7.

The first time the Unity editor is played everything works as expected. When we stop and start playmode again the editor deadlocks and has to be force quit. FMOD in the editor is the cause of the deadlock.

When the first play is started the following message appears in the console when the scene starts;

[FMOD] DSPJobList::addJob : DSP JobList expanding job from 1024 entries to 2048 entries.

And when the first play is stopped the following message appears in the console;

[FMOD] OutputRingBuffer::read : Buffer starvation detected, requested 2048 bytes, 0 / 16384 bytes available.

After that, any attempt to play again in the editor causes a deadlock. If I remove virtualisation everything works fine.

Any suggestions for a fix/workaround apart from ‘don’t use virtualisation’? Is there a config somewhere to hint for more allocations?

cheers,

// greg

Are you able to provide a small project that reproduces this issue?

hi Cameron, yep sure, I’ll see if I can extract a repro soon.

I found that reducing the sheer number of FMOD emitters using the virtualize setting in the scene made the deadlock go away. We probably had a 128+ emitters using the same virtualised event. We’ve since reduced the objects using those emitters in the scene and it happened to fix the deadlock along the way. There are now probably less than 100 emitters.

The basic setup is a listener moving through a bunch of vehicles using the virtualised emitter for a vehicle sound. The size/range of the emitter was ~12m as we only wanted the nearest few vehicles to make sound. The vehicles are on a movement loop so voice stealing didn’t work that well (oldest, furthest, etc) and virtualising the events was the way to go.

I found the deadlock in 2.00.11 and tried updating to 2.00.12 but no dice. One other thing to note is that due to needing to play video with audio elsewhere, Unity sound is enabled as well with a very low number of voices. This is probably unrelated and I would guess that somewhere Unity/FMOD is holding onto some memory that the domain reload when pressing play is having a problem with.

The built in Unity/FMOD audio shouldn’t be interfering with the FMODStudio plugin and you should be able to use them along side each other.

I have been unable to reproduce this so far. Maybe using the Studio profiler, before the deadlock occurs, can provide some insight.