My builds suddenly started crashing this weekend. It happens every time I run the game, but not always immediately, it sometimes takes 5-10 minutes before the crash occurs. I’ve been looking all over the internet for answers, but there seem to be a million reasons for this error.
How can I narrow down on what is causing this for me?
I have the memory dump from the crash, but I have no idea how to read this and it keeps opening up in Visual Studio with a summary view that doesn’t show me the exact cause.
Any advice would be great. Thanks
It looks like it is pointing me toward audio issues…

It seems it has no permission over reading the given audio file.
Which is very confusing. I recently added new audio files to my build, but they seem to be working fine for a while before the crash.
I’ve been trying to narrow it down to specific audio sources, so I am playtesting until I find a pattern. If the log is telling me it’s from a specific AudioSource, I assume that I should be able to recreate the crash by activating that AudioSource. The trick is finding that specific source, in a scene with hundreds of them.
I think I found the problem. I tried to recreate the issue in the editor play mode and while it never crashed, it did start throwing an exception on an audio source. I recently changed a property in my code from type Clip to type AudioSource and my code calls the AS.Play function. But the field is serialized and it retained the old clip value. So it was trying to play an audio source that was pointed to a clip. Once I replaced the clip with the audio source component, I was able to play a full level without a crash. I’ll keep playtesting, but I am hopeful this was the issue.
Two successful play sessions with no crash. I think that was it.
Correction: it APPEARED to retain the correct clip value.
Obviously if you have a reference to a Clip and replace it with a Source, it cannot possibly retain the previous value in actuality.
If you change the type of a serialized field, you should always rename it.
If you don’t then you should ALWAYS drag the fresh correct instance of whatever it is into that field.
I assumed it was retained because the field said something along the lines of “Type mismatch” before I replaced it with the new audio source reference.