# Crash Upon Exiting Game Build

**URL:** <https://qa.fmod.com/t/crash-upon-exiting-game-build/23263>\
**Category:** Unity\
**Tags:** unity\
**Created:** [August 23, 2025, 11:27am UTC](https://qa.fmod.com/t/crash-upon-exiting-game-build/23263 "2025-08-23T11:27:23Z")\
**Posts on this page:** 14\
**Page:** 1

<div class="post-metadata">

**Author:** ![Lemior](https://avatars.discourse-cdn.com/v4/letter/l/919ad9/32.png) [@Lemior](https://qa.fmod.com/u/Lemior)\
**Post date:** [August 23, 2025, 11:27am UTC](https://qa.fmod.com/t/crash-upon-exiting-game-build/23263/1 "2025-08-23T11:27:23Z")

</div>

Hey,

almost everytime when i close my game with application.quit() it crashes before closing.

When i have a look at the error it states the following (see below)

Everytime the first non SYSTEM32 dll is the fmodstudio.dll. Previously the steam audio phonon dll was at last position. but i removed it because i dont need it anymore. so it looks like this now.

Any known issues or advice on how to fix this?

Crash!!!

“Some long trace here”

S:\Builds\Unity\_6\_2\Data\Plugins\x86\_64\fmodstudio.dll:fmodstudio.dll (00007FF888280000), size: 3461120 (result: 0), SymType: ‘-deferred-’, PDB: ‘’, fileVersion: 0.2.2.30C:\Windows\System32\MMDevApi.dll:MMDevApi.dll (00007FF93D790000), size: 647168 (result: 0), SymType: ‘-deferred-’, PDB: ‘’, fileVersion: 10.0.22621.4111C:\Windows\SYSTEM32\AUDIOSES.DLL:AUDIOSES.DLL (00007FF93F540000), size: 2019328 (result: 0), SymType: ‘-deferred-’, PDB: ‘’, fileVersion: 10.0.22621.4111C:\Windows\SYSTEM32\resourcepolicyclient.dll:resourcepolicyclient.dll (00007FF949F10000), size: 86016 (result: 0), SymType: ‘-deferred-’, PDB: ‘’, fileVersion: 10.0.22621.3527C:\Windows\System32\DriverStore\FileRepository\nv\_dispi.inf\_amd64\_adf5a840df867035\nvrtum64.dll:nvrtum64.dll (00007FF8AE760000), size: 78561280 (result: 0), SymType: ‘-deferred-’, PDB: ‘’, fileVersion: 32.0.15.6614C:\Windows\SYSTEM32\CoreUIComponents.dll:CoreUIComponents.dll (00007FF945160000), size: 3592192 (result: 0), SymType: ‘-deferred-’, PDB: ‘’, fileVersion: 10.0.22621.3672C:\Windows\SYSTEM32\SspiCli.dll:SspiCli.dll (00007FF94B7A0000), size: 274432 (result: 0), SymType: ‘-deferred-’, PDB: ‘’, fileVersion: 10.0.22621.3810

========== OUTPUTTING STACK TRACE ==================

“Some long trace here”

S:\Builds\Unity\_6\_2\Data\Plugins\x86\_64\fmodstudio.dll:fmodstudio.dll (00007FF888280000), size: 3461120 (result: 0), SymType: ‘-exported-’, PDB: ‘S:\Builds\Unity\_6\_2\Data\Plugins\x86\_64\fmodstudio.dll’, fileVersion: 0.2.2.30C:\Windows\System32\MMDevApi.dll:MMDevApi.dll (00007FF93D790000), size: 647168 (result: 0), SymType: ‘-exported-’, PDB: ‘C:\Windows\System32\MMDevApi.dll’, fileVersion: 10.0.22621.4111C:\Windows\SYSTEM32\AUDIOSES.DLL:AUDIOSES.DLL (00007FF93F540000), size: 2019328 (result: 0), SymType: ‘-exported-’, PDB: ‘C:\Windows\SYSTEM32\AUDIOSES.DLL’, fileVersion: 10.0.22621.4111C:\Windows\SYSTEM32\resourcepolicyclient.dll:resourcepolicyclient.dll (00007FF949F10000), size: 86016 (result: 0), SymType: ‘-exported-’, PDB: ‘C:\Windows\SYSTEM32\resourcepolicyclient.dll’, fileVersion: 10.0.22621.3527C:\Windows\System32\DriverStore\FileRepository\nv\_dispi.inf\_amd64\_adf5a840df867035\nvrtum64.dll:nvrtum64.dll (00007FF8AE760000), size: 78561280 (result: 0), SymType: ‘-exported-’, PDB: ‘C:\Windows\System32\DriverStore\FileRepository\nv\_dispi.inf\_amd64\_adf5a840df867035\nvrtum64.dll’, fileVersion: 32.0.15.6614C:\Windows\SYSTEM32\CoreUIComponents.dll:CoreUIComponents.dll (00007FF945160000), size: 3592192 (result: 0), SymType: ‘-exported-’, PDB: ‘C:\Windows\SYSTEM32\CoreUIComponents.dll’, fileVersion: 10.0.22621.3672C:\Windows\SYSTEM32\SspiCli.dll:SspiCli.dll (00007FF94B7A0000), size: 274432 (result: 0), SymType: ‘-exported-’, PDB: ‘C:\Windows\SYSTEM32\SspiCli.dll’, fileVersion: 10.0.22621.3810ERROR: SymGetSymFromAddr64, GetLastError: ‘Es wurde versucht, auf eine unzulässige Adresse zuzugreifen.’ (Address: 00007FF8A3F769BE)0x00007FF8A3F769BE (UnityPlayer) (function-name not available)0x00007FF94E14257D (KERNEL32) BaseThreadInitThunk0x00007FF94F18AF08 (ntdll) RtlUserThreadStart

---

<div class="post-metadata">

**Author:** ![li\_fmod](https://yyz2.discourse-cdn.com/flex036/user_avatar/qa.fmod.com/li_fmod/32/6577_2.png) [@li\_fmod](https://qa.fmod.com/u/li_fmod)\
**Post date:** [August 27, 2025, 2:32am UTC](https://qa.fmod.com/t/crash-upon-exiting-game-build/23263/2 "2025-08-27T02:32:27Z")

</div>

Hi,

Thank you for sharing the information and stack trace!

I tested with Unity `6000.2.0b12` and FMOD Unity integration `2.02.30` in a game build but was unable to reproduce the issue.

Would it be possible to share a code snippet showing how you’re calling `Application.Quit()`?

It would also be helpful if you could provide more details on how to reproduce the crash. For example, any particular scene setup, timing, or audio activity happening when the game exits.

---

<div class="post-metadata">

**Author:** ![Lemior](https://avatars.discourse-cdn.com/v4/letter/l/919ad9/32.png) [@Lemior](https://qa.fmod.com/u/Lemior)\
**Post date:** [August 27, 2025, 8:53am UTC](https://qa.fmod.com/t/crash-upon-exiting-game-build/23263/3 "2025-08-27T08:53:00Z")

</div>

Hey thank you for your reply.

After removing the phonon.dll the crashes reduced by 50%.

Then i completely removed fmod from my project and reimported it.

Now i tried quitting 10 times and got no crash. So i suppose something corrupted the dlls which is weird because i updated fmod 1 day before the tests and recopied them but maybe my package download was already corrupt.

Anyway if the crashes come up again ill keep you updated.

I close the game like this. Its in a ui callback function when i click on a button.

 ![image](https://canada1.discourse-cdn.com/flex036/uploads/fmod/original/2X/b/bd39bdaea61e66d8706bda832e6ead222b834b67.png)

---

<div class="post-metadata">

**Author:** ![li\_fmod](https://yyz2.discourse-cdn.com/flex036/user_avatar/qa.fmod.com/li_fmod/32/6577_2.png) [@li\_fmod](https://qa.fmod.com/u/li_fmod)\
**Post date:** [August 28, 2025, 12:31am UTC](https://qa.fmod.com/t/crash-upon-exiting-game-build/23263/4 "2025-08-28T00:31:22Z")

</div>

Glad to hear it’s stable for now and thank you for sharing your solution here!

If the issue comes back, feel free to let me know. I’d be happy to take another look and help further.

---

<div class="post-metadata">

**Author:** ![Lemior](https://avatars.discourse-cdn.com/v4/letter/l/919ad9/32.png) [@Lemior](https://qa.fmod.com/u/Lemior)\
**Post date:** [August 31, 2025, 10:56am UTC](https://qa.fmod.com/t/crash-upon-exiting-game-build/23263/5 "2025-08-31T10:56:27Z")

</div>

Ok they are back with the same error. Here a snippet

```csharp
C:\Windows\SYSTEM32\textinputframework.dll:textinputframework.dll (00007FFD03B10000), size: 1323008 (result: 0), SymType: '-exported-', PDB: 'C:\Windows\SYSTEM32\textinputframework.dll', fileVersion: 10.0.22621.4249
C:\Users\App\Release\Data\Plugins\x86_64\lib_burst_generated.dll:lib_burst_generated.dll (00007FFC9BB70000), size: 2273280 (result: 0), SymType: '-exported-', PDB: 'C:\ App\Release\Data\Plugins\x86_64\lib_burst_generated.dll'
C:\Users\App\Release\Data\Plugins\x86_64\fmodstudio.dll:fmodstudio.dll (00007FFC9B820000), size: 3461120 (result: 0), SymType: '-exported-', PDB: 'C:\Users\App\Release\Data\Plugins\x86_64\fmodstudio.dll', fileVersion: 0.2.2.30
C:\Windows\System32\MMDevApi.dll:MMDevApi.dll (00007FFCFD3E0000), size: 647168 (result: 0), SymType: '-exported-', PDB: 'C:\Windows\System32\MMDevApi.dll', fileVersion: 10.0.22621.4111
C:\Windows\SYSTEM32\AUDIOSES.DLL:AUDIOSES.DLL (00007FFD03EB0000), size: 2019328 (result: 0), SymType: '-exported-', PDB: 'C:\Windows\SYSTEM32\AUDIOSES.DLL', fileVersion: 10.0.22621.4111
C:\Windows\SYSTEM32\resourcepolicyclient.dll:resourcepolicyclient.dll (00007FFD0D1E0000), size: 86016 (result: 0), SymType: '-exported-', PDB: 'C:\Windows\SYSTEM32\resourcepolicyclient.dll', fileVersion: 10.0.22621.3527
C:\Windows\system32\mswsock.dll:mswsock.dll (00007FFD0ED60000), size: 430080 (result: 0), SymType: '-exported-', PDB: 'C:\Windows\system32\mswsock.dll', fileVersion: 10.0.22621.2506
C:\Windows\System32\DriverStore\FileRepository\nv_dispi.inf_amd64_adf5a840df867035\nvrtum64.dll:nvrtum64.dll (00007FFC6D510000), size: 78561280 (result: 0), SymType: '-exported-', PDB: 'C:\Windows\System32\DriverStore\FileRepository\nv_dispi.inf_amd64_adf5a840df867035\nvrtum64.dll', fileVersion: 32.0.15.6614
C:\Windows\SYSTEM32\CoreUIComponents.dll:CoreUIComponents.dll (00007FFD09390000), size: 3592192 (result: 0), SymType: '-exported-', PDB: 'C:\Windows\SYSTEM32\CoreUIComponents.dll', fileVersion: 10.0.22621.3672
C:\Windows\SYSTEM32\SspiCli.dll:SspiCli.dll (00007FFD0EB60000), size: 274432 (result: 0), SymType: '-exported-', PDB: 'C:\Windows\SYSTEM32\SspiCli.dll', fileVersion: 10.0.22621.3810
  ERROR: SymGetSymFromAddr64, GetLastError: It was tried to access an invalid address.' (Address: 00007FFCA12669BE)
0x00007FFCA12669BE (UnityPlayer) (function-name not available)
0x00007FFD10E0257D (KERNEL32) BaseThreadInitThunk
0x00007FFD1254AF08 (ntdll) RtlUserThreadStart

```

---

<div class="post-metadata">

**Author:** ![li\_fmod](https://yyz2.discourse-cdn.com/flex036/user_avatar/qa.fmod.com/li_fmod/32/6577_2.png) [@li\_fmod](https://qa.fmod.com/u/li_fmod)\
**Post date:** [September 1, 2025, 12:09am UTC](https://qa.fmod.com/t/crash-upon-exiting-game-build/23263/6 "2025-09-01T00:09:01Z")

</div>

Thank you for sharing the Log!

Before calling `Application.Quit()`, could you try adding an explicit call to [Studio::System::release](https://fmod.com/docs/2.02/api/studio-api-system.html#studio_system_release) to see if it resolves the crash?

For example:

```auto
FMODUnity.RuntimeManager.CoreSystem.release();
UnityEngine.Application.Quit();

```

This ensures FMOD has time to flush commands, stop all sounds, and clean up its internal threads before Unity starts unloading native plugins, which could be the cause of the crash you’re seeing in `fmodstudio.dll`.

Let me know if this makes a difference.

---

<div class="post-metadata">

**Author:** ![Lemior](https://avatars.discourse-cdn.com/v4/letter/l/919ad9/32.png) [@Lemior](https://qa.fmod.com/u/Lemior)\
**Post date:** [September 6, 2025, 8:46am UTC](https://qa.fmod.com/t/crash-upon-exiting-game-build/23263/7 "2025-09-06T08:46:26Z")

</div>

Hey, thank you for the reply. Ill add it and see if it happens again.

I also experience crashes during runtime where FMOD is at the end of the stack trace. Im just not so sure if it is caused by fmod. When i analyse the crash.dmp file with WinDbg it does not state anything about fmod but the stack trace in the player log does.

I already posted this topic in the unity forums

> **["Random" Game Crashes](https://discussions.unity.com/t/random-game-crashes/1682309)**
>
> Hi, for a long time now i have problems with random game crashes. They appear out of nowhere Playing for 3-4 hours then crash While tabbed out of the game crash etc Im using Unity 6.2.1 with IL2CPP and Master builds with LTCG I have analysed...

---

<div class="post-metadata">

**Author:** ![Lemior](https://avatars.discourse-cdn.com/v4/letter/l/919ad9/32.png) [@Lemior](https://qa.fmod.com/u/Lemior)\
**Post date:** [September 6, 2025, 8:51am UTC](https://qa.fmod.com/t/crash-upon-exiting-game-build/23263/8 "2025-09-06T08:51:14Z")

</div>

Ok i tried it and i crashes my editor. I could screenshot this before the crash

![image](https://canada1.discourse-cdn.com/flex036/uploads/fmod/original/2X/8/8386ec845efda0525d369608b0cdc039506bc328.png)

---

<div class="post-metadata">

**Author:** ![li\_fmod](https://yyz2.discourse-cdn.com/flex036/user_avatar/qa.fmod.com/li_fmod/32/6577_2.png) [@li\_fmod](https://qa.fmod.com/u/li_fmod)\
**Post date:** [September 10, 2025, 12:06am UTC](https://qa.fmod.com/t/crash-upon-exiting-game-build/23263/9 "2025-09-10T00:06:15Z")

</div>

Unfortunately, I was still not able to reproduce the issue on my end.

Would it be possible to share your Unity project, or a stripped down version of it where you can still reproduce the issue, so I can take a closer look?

Please note that before you can upload your project to the “Uploads” section of your [FMOD user profile](https://www.fmod.com/profile#uploads), you’ll first need to register it in the [Projects](https://www.fmod.com/profile#projects) section.

---

<div class="post-metadata">

**Author:** ![Lemior](https://avatars.discourse-cdn.com/v4/letter/l/919ad9/32.png) [@Lemior](https://qa.fmod.com/u/Lemior)\
**Post date:** [September 11, 2025, 8:11am UTC](https://qa.fmod.com/t/crash-upon-exiting-game-build/23263/10 "2025-09-11T08:11:05Z")

</div>

Hey. No sorry i cant do that. When i have more time ill try to reproduce it in a sample project.

A few minutes ago i posted a big update on the crash during runtime.

I dont wanna post everything here again so please check out this.

> **["Random" Game Crashes](https://discussions.unity.com/t/random-game-crashes/1682309/12)**
>
> Tests with the new Unity versions are ongoing and i will post updates here. While still testing with the old stuff i could find the first possible reason for the crash. I added three things to all npcs and the player. automatic movement...

In summary the game crashes when the players are shooting.

As the crashes are caused by a thread accessing an invalid address and fmod being at the end of the stack trace all the time could it be that triggering the same sfx in one frame could crash fmod?

are there any known problems with thread safety?

---

<div class="post-metadata">

**Author:** ![Lemior](https://avatars.discourse-cdn.com/v4/letter/l/919ad9/32.png) [@Lemior](https://qa.fmod.com/u/Lemior)\
**Post date:** [September 11, 2025, 12:52pm UTC](https://qa.fmod.com/t/crash-upon-exiting-game-build/23263/11 "2025-09-11T12:52:17Z")

</div>

I tested a build where i removed all sfx stuff and it hasnt crashed in the past 90 mins.  
Now ill reset everything to the original state and only remove sfx.  
after that ill readd fmod again and it should crash again

if the first builds without sfx runs without a crash i know that fmod is the issue.

can you please check if triggering multiple sfx in the same frame or stopping and starting in the same frame can cause crashes?

ill report here again in a few hours when im certain that this is the issue

---

<div class="post-metadata">

**Author:** ![li\_fmod](https://yyz2.discourse-cdn.com/flex036/user_avatar/qa.fmod.com/li_fmod/32/6577_2.png) [@li\_fmod](https://qa.fmod.com/u/li_fmod)\
**Post date:** [September 12, 2025, 1:01am UTC](https://qa.fmod.com/t/crash-upon-exiting-game-build/23263/12 "2025-09-12T01:01:31Z")

</div>

Thank you for sharing the extra info!

> [@Lemior](#):
>
> As the crashes are caused by a thread accessing an invalid address and fmod being at the end of the stack trace all the time could it be that triggering the same sfx in one frame could crash fmod?

Would it be possible to share a code snippet around how you’re managing EventInstances around player shooting logic?

If the same EventInstance is reused incorrectly (e.g. released twice or accessed after release), it might lead to memory access violations.

> [@Lemior](#):
>
> can you please check if triggering multiple sfx in the same frame or stopping and starting in the same frame can cause crashes?

We haven’t seen consistent crashes from triggering multiple SFX or **starting/stopping** events in the same frame under normal use.

Creating and releasing new EventInstances per frame is generally safe, as long as:

- You avoid calling `.release()` more than once on the same instance
- You don’t try to use the instance after it has been released
- You avoid starting and immediately stopping and releasing the same instance in the same frame, especially under heavy load

---

<div class="post-metadata">

**Author:** ![Lemior](https://avatars.discourse-cdn.com/v4/letter/l/919ad9/32.png) [@Lemior](https://qa.fmod.com/u/Lemior)\
**Post date:** [September 12, 2025, 9:54am UTC](https://qa.fmod.com/t/crash-upon-exiting-game-build/23263/13 "2025-09-12T09:54:36Z")

</div>

All my sfx stuff is handled at one point.

The call order is this:

```csharp
// Create instance
data.Instance = RuntimeManager.CreateInstance(data.DataStorage.FMODPath);

// Assign 3d attributes
data.Attributes3D.position = AssignFmodVector(data.Attributes3D.position, data.Query.Context.Position);
data.Attributes3D.forward = AssignFmodVector(data.Attributes3D.forward, data.Query.Context.Forward);
data.Attributes3D.up = AssignFmodVector(data.Attributes3D.up, data.Query.Context.Up);
data.Instance.set3DAttributes(data.Attributes3D);

// start an release it (i have read somewhere in the docs to handle it like this)
data.Instance.start();
data.Instance.release();

// Some time later (maybe in same frame but i don't think so)

// Stop event
data.Instance.stop(STOP_MODE.ALLOWFADEOUT);

// Removing the data container from the list of active sfx (custom)
// So the event instance shouldn't be reused

```

Im currently in the process of creating a new project and trying to reproduce it there.

---

<div class="post-metadata">

**Author:** ![li\_fmod](https://yyz2.discourse-cdn.com/flex036/user_avatar/qa.fmod.com/li_fmod/32/6577_2.png) [@li\_fmod](https://qa.fmod.com/u/li_fmod)\
**Post date:** [September 18, 2025, 12:01am UTC](https://qa.fmod.com/t/crash-upon-exiting-game-build/23263/14 "2025-09-18T00:01:47Z")

</div>

Thank you for sharing the call order!

The overall flow looks mostly correct, but one thing that stands out is this sequence:

```auto
data.Instance.start();
data.Instance.release();

```

Then later:

```auto
data.Instance.stop(STOP_MODE.ALLOWFADEOUT);

```

The release() method doesn’t immediately destroy the instance. It marks it for deletion once playback ends and all references are cleared.

However, any interaction with the instance after calling `release()`, including `stop()`, can lead to crashes or access violations.

That said, I’ve tried to reproduce the crash locally by following this call order, but haven’t been able to trigger it on my end yet.

Let me know how your reproduction project goes, I’m happy to take another look once you have more results.
