Search Unity

  1. Unity 6 Preview is now available. To find out what's new, have a look at our Unity 6 Preview blog post.
    Dismiss Notice
  2. Unity is excited to announce that we will be collaborating with TheXPlace for a summer game jam from June 13 - June 19. Learn more.
    Dismiss Notice
  3. Dismiss Notice

Question Help Needed: Debugging Unity Crash Log

Discussion in 'Getting Started' started by Mordek, Apr 12, 2024.

  1. Mordek

    Mordek

    Joined:
    May 26, 2019
    Posts:
    3
    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:

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

    tylerpeterson7797180

    Joined:
    Apr 16, 2024
    Posts:
    1
    - 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
     
  3. Mordek

    Mordek

    Joined:
    May 26, 2019
    Posts:
    3
    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:

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