Help Needed: Debugging Unity Crash Log

Hello Unity Community,

I’m encountering a crash in my Unity project and I’m having trouble debugging it. I would greatly appreciate any insights or advice you could provide. The crashes only occur on some systems and are not reproducible.

Here’s the crash log:

Native StackTrace:

Thread 0 (crashed)
0   ntdll                              0x00007ffe1286fec4 ZwWaitForMultipleObjects
1   KERNELBASE                         0x00007ffe0fe90479 WaitForMultipleObjectsEx
2   KERNELBASE                         0x00007ffe0fe9037e WaitForMultipleObjects
3   UnityPlayer                        0x00007ffda7e57acd winutils::ExternalCrashHandler::HandleCrash (C:\build\output\unity\unity\PlatformDependent\Win\ExternalCrashHandler.cpp:357)
4   UnityPlayer                        0x00007ffda7e6ed10 winutils::CrashHandler::HandleCrash (C:\build\output\unity\unity\PlatformDependent\Win\CrashHandler.cpp:285)
5   UnityPlayer                        0x00007ffda7e75209 winutils::ProcessInternalCrash (C:\build\output\unity\unity\PlatformDependent\Win\WinUtils.cpp:594)
6   KERNELBASE                         0x00007ffe0ff8cf1c UnhandledExceptionFilter
7   ntdll                              0x00007ffe12878abd RtlUserThreadStart$filt$0
8   ntdll                              0x00007ffe1285f197 _C_specific_handler
9   ntdll                              0x00007ffe1287441f RtlpExecuteHandlerForException
10  ntdll                              0x00007ffe127ee466 RtlDispatchException
11  ntdll                              0x00007ffe1287340e KiUserExceptionDispatcher
12  UnityPlayer                        0x0000000000be6f0f  (C:\build\output\unity\unity\Runtime\Utilities\LinkedList.h:307)
13  UnityPlayer                        0x00007ffda8046f16 SoundChannelInstance::~SoundChannelInstance (C:\build\output\unity\unity\Modules\Audio\Public\sound\SoundChannel.cpp:96)
14  UnityPlayer                        0x00007ffda8046e34 SoundChannelInstance::`scalar deleting destructor'
15  UnityPlayer                        0x0000000000be6bda  (C:\build\output\unity\unity\Runtime\Allocator\MemoryManager.cpp:457)
16  UnityPlayer                        0x00007ffda8046bda SoundChannelInstance::FMODChannelCallback (C:\build\output\unity\unity\Modules\Audio\Public\sound\SoundChannel.cpp:35)
17  UnityPlayer                        0x00007ffda8b48037 FMOD::ChannelI::stopEx (c:\build\output\unity\fmod\src\fmod_channeli.cpp:2615)
18  UnityPlayer                        0x00007ffda8b3ae61 FMOD::SystemI::updateChannels (c:\build\output\unity\fmod\src\fmod_systemi.cpp:794)
19  UnityPlayer                        0x00007ffda8b3ab9f FMOD::SystemI::update (c:\build\output\unity\fmod\src\fmod_systemi.cpp:8139)
20  UnityPlayer                        0x00007ffda8b2b32c FMOD::System::update (c:\build\output\unity\fmod\src\fmod_system.cpp:735)
21  UnityPlayer                        0x0000000000bb410d  (C:\build\output\unity\unity\Modules\Audio\Public\AudioManager.cpp:2796)
22  UnityPlayer                        0x00007ffda801410d AudioModule::Update (C:\build\output\unity\unity\Modules\Audio\AudioModule.cpp:33)
23  UnityPlayer                        0x00007ffda7a1a607 ExecutePlayerLoop (C:\build\output\unity\unity\Runtime\Misc\PlayerLoop.cpp:394)
24  UnityPlayer                        0x00007ffda7a1a7df ExecutePlayerLoop (C:\build\output\unity\unity\Runtime\Misc\PlayerLoop.cpp:418)
25  UnityPlayer                        0x00007ffda7a1ac22 PlayerLoop (C:\build\output\unity\unity\Runtime\Misc\PlayerLoop.cpp:527)
26  UnityPlayer                        0x000000000081124b InputPostprocess (C:\build\output\unity\unity\PlatformDependent\Win\Input\GetInput.cpp:392)
27  UnityPlayer                        0x00007ffda7c7124b PerformMainLoop (C:\build\output\unity\unity\PlatformDependent\WinPlayer\WinMain.cpp:313)
28  UnityPlayer                        0x00007ffda7c73c4b MainMessageLoop (C:\build\output\unity\unity\PlatformDependent\WinPlayer\WinMain.cpp:1250)
29  UnityPlayer                        0x00007ffda7c76ffb UnityMainImpl (C:\build\output\unity\unity\PlatformDependent\WinPlayer\WinMain.cpp:1804)
30  UnityPlayer                        0x00007ffda7c7729b UnityMain (C:\build\output\unity\unity\PlatformDependent\WinPlayer\WinMain.cpp:1844)
31  Keep Keepers                       0x00000000000011d1 invoke_main (d:\agent\_work\63\s\src\vctools\crt\vcstartup\src\startup\exe_common.inl:118)
32  Keep Keepers                       0x00007ff713e511f2 _scrt_common_main_seh (d:\agent\_work\63\s\src\vctools\crt\vcstartup\src\startup\exe_common.inl:288)
33  KERNEL32                           0x00007ffe1054257d BaseThreadInitThunk
34  ntdll                              0x00007ffe1282aa58 RtlUserThreadStart
35  ntdll                              0x00007ffe1282aa58 RtlUserThreadStart

It seems to be related to audio processing, particularly with FMOD.

I’m not sure what could be causing this issue or how to go about debugging it further. Any guidance on how to interpret this crash log or steps I can take to diagnose and fix the problem would be immensely helpful.

Thank you in advance for your assistance!

  • The crash originates from SoundChannelInstance::~SoundChannelInstance (line 13) which is the destructor for a sound channel instance. This suggests the crash happens during sound cleanup.
  • Lines 16-20 point to FMOD functions related to updating and stopping channels.
  • The lack of reproducibility (crashing only on some systems) suggests a potential compatibility issue

Thank you very much for your answer.

In my understanding this means the only chance to prevent this on my side is to use pooling and never destroy any sounds. Unless this crash is caused by some kind of memory corruption, which seems to cause another issue in my build:

Thread 56 (crashed)
0   ntdll                              0x00007ffe0014feb4 ZwWaitForMultipleObjects
1   KERNELBASE                         0x00007ffdfd7cfd19 WaitForMultipleObjectsEx
2   KERNELBASE                         0x00007ffdfd7cfc1e WaitForMultipleObjects
3   UnityPlayer                        0x00007ffd06437acd winutils::ExternalCrashHandler::HandleCrash (C:\build\output\unity\unity\PlatformDependent\Win\ExternalCrashHandler.cpp:357)
4   UnityPlayer                        0x00007ffd0644ed10 winutils::CrashHandler::HandleCrash (C:\build\output\unity\unity\PlatformDependent\Win\CrashHandler.cpp:285)
5   UnityPlayer                        0x00007ffd06455209 winutils::ProcessInternalCrash (C:\build\output\unity\unity\PlatformDependent\Win\WinUtils.cpp:594)
6   KERNELBASE                         0x00007ffdfd8cca6c UnhandledExceptionFilter
7   ntdll                              0x00007ffe00158a7d RtlUserThreadStart$filt$0
8   ntdll                              0x00007ffe0013f187 _C_specific_handler
9   ntdll                              0x00007ffe0015440f RtlpExecuteHandlerForException
10  ntdll                              0x00007ffe000ce466 RtlDispatchException
11  ntdll                              0x00007ffe001533fe KiUserExceptionDispatcher
12  UnityPlayer                        0x00000000003ef8da  (C:\build\output\unity\unity\artifacts\Stevedore\vs2019-toolchain_66be\include\xtree:752)
13  UnityPlayer                        0x00007ffd05e2f8da std::_Tree<std::_Tmap_traits<int,Projector *,std::less<int>,std::allocator<std::pair<int const ,Projector *> >,1> >::~_Tree<std::_Tmap_traits<int,Projector *,std::less<int>,std::allocator<std::pair<int const ,Projector *> >,1> > (C:\build\output\unity\unity\artifacts\Stevedore\vs2019-toolchain_66be\include\xtree:1191)
14  UnityPlayer                        0x000000000077a60f free_alloc_internal (C:\build\output\unity\unity\Runtime\Allocator\MemoryManager.cpp:457)
15  UnityPlayer                        0x000000000077a60f delete_internal (C:\build\output\unity\unity\Runtime\Allocator\MemoryMacros.h:203)
16  UnityPlayer                        0x000000000077a60f  (C:\build\output\unity\unity\Runtime\Scripting\ManagedReference\SerializableManagedRef.cpp:48)
17  UnityPlayer                        0x000000000077a60f  (C:\build\output\unity\unity\Runtime\Mono\MonoBehaviour.cpp:128)
18  UnityPlayer                        0x00007ffd061ba60f  (C:\build\output\unity\unity\Runtime\Mono\MonoBehaviour.h:40)
19  UnityPlayer                        0x00000000005b530f free_alloc_internal (C:\build\output\unity\unity\Runtime\Allocator\MemoryManager.cpp:457)
20  UnityPlayer                        0x00000000005b530f delete_object_internal_step2 (C:\build\output\unity\unity\Runtime\BaseClasses\BaseObject.cpp:1171)
21  UnityPlayer                        0x00007ffd05ff530f BatchDeleteStep2Threaded (C:\build\output\unity\unity\Runtime\Misc\BatchDeleteObjects.cpp:105)
22  UnityPlayer                        0x00007ffd060f7f93 Thread::RunThreadWrapper (C:\build\output\unity\unity\Runtime\Threads\Thread.cpp:108)
23  KERNEL32                           0x00007ffdfe1b257d BaseThreadInitThunk
24  ntdll                              0x00007ffe0010aa48 RtlUserThreadStart
25  ntdll                              0x00007ffe0010aa48 RtlUserThreadStart

Do you think those crashes might have same issue. If so how can I even cause memory corruption without using any pointers / any c++ code myself.