Access violation in FMOD mixer thread with custom DSP on Studio Bus ChannelGroup

Hi FMOD team,

I am investigating a native FMOD crash in our Unity game and would like some guidance on whether this points to incorrect DSP / bus ChannelGroup lifecycle usage on our side, a known issue, or something worth investigating further.

Environment

  • Unity: 6000.3.12f1
  • FMOD version: 2.03.12
  • Platform: Windows x64, Mac
  • Scripting backend: Mono
  • Crash reproduced with both on Windows:
    • fmodstudio.dll
    • fmodstudioL.dll in a Development Build

The crash appears to be the same in both the regular and logging DLL. We are seeing a native write access violation on the FMOD mixer thread. It is not isolated to a few devices but happens for testers as well as developers, it crashes in the editor and in the built game.

The repeated crash signature is:

Access violation - code c0000005 AV.Type: Write Failure.Bucket: INVALID_POINTER_WRITE_c0000005_fmodstudio.dll!Unknown Faulting module: fmodstudio.dll / fmodstudioL.dll Thread: FMOD mixer thread

We attach custom DSP capture nodes to several FMOD Studio bus ChannelGroups in order to visualize the audio output from those buses. When the related in-game app or visualization is closed, we remove and clean up the corresponding DSP connection.

The crash appears in a specific sequence where two separate gameplay scenarios create and later clean up these DSP captures. After both scenarios have completed, leaving the game idle for around 20–30 minutes eventually triggers the crash. It is not fully deterministic yet, but it currently reproduces in roughly one out of three attempts.

I tried to reproduce this in a smaller clean example, but I have not been able to make that crash so far. At the moment it seems specific to our real usage pattern.

I saw this in the logs as well that may be a hint of whats wrong?

[FMOD] Bus channel group for 'bus:/Music/ApplicationSource/Assembly' was not ready (ERR_STUDIO_NOT_LOADED). Retrying.

[FMOD] Created audio capture DSP (instance 1) for bus: bus:/Music/ApplicationSource/Assembly [FMOD] Successfully initialized audio capture

[FMOD] Destroyed capture for 'bus:/Music/ApplicationSource/Assembly' (no more consumers)

[FMOD] EventInstance::update : Event {8287fc98-05b4-4312-a122-82ae8bcf3c14} has waited 10.0 seconds for DSP graph to go idle - check for plugins that may be keeping it active

The event GUID corresponds to an outro/video event with nested content and a long reverb tail, so perhaps this is also something that could cause problems as it keeps the event perhaps longer active?

I have gathered 2 full crash dumps, one with the fmodstudio.dll and one with the fmodstudioL.dll ~2-3 gb each that could share privately where I hope may would be helpful in the search of the issue as you perhaps can make more out of these as I.

Thanks in advance

Savas

Can you please share a code snippet of how you are removing and cleaning up the DSP connection?

Does this event or any of its referenced events contain this DSP capture node?

If you have a project registered you can upload these crash dumps to your FMOD Profile to share with us privately.
If you could also please send the full log that would be helpful as well.

EDIT: I have been informed that you do not need a project registered to upload to your FMOD Profile, apologies for the misinformation.

Hey jeff,
sorry for the long silence.

We are working hard on a deadline for an upcoming public demo release of our game and this thread kinda has gone under in the stress.

We had continued our search and found two things that we now identify as the cause of this issue.

  1. An event that had an DSP attached at some point survived and kept running in FMOD but the DSP was removed at some point. We saw it with FMOD debugger attached that this event kept running.
  2. An event in FMOD did create a looping child event that also continued running because the game itself was not aware of this one and just cleared the original event.

So both issues were a mix of a gap/bug in the code (issue 1) and also a not so clean setup in fmod (issue 2)

I believe the first issue was the one causing the mixer thread to crash after some time. After fixing these two issues we were not able to reproduce the issue anymore and we also had multiple players test the whole thing over some time and it does seem to be resolved now.

I would still provide the logs/dmp files for the case that you may be interested in improving handling on FMOD side so that this may not result in a crash but an error message instead.

Thanks for your answer and again sorry for the delay in my answer!

Best Regards

Savas

Thanks for the update, glad to hear you have resolved the issue.
Yes if you could please upload the crash dump whenever you get time, I will see if there is anything we could do to prevent such crashes in the future.