How to begin to diagnose "Native Crash - KiUserExceptionDispatcher" crash?

i also see a ton of these crash reports and no idea where to start looking

Hello,

Would you kindly please report this issue via the Bug Reporter tool?

Please make sure to write the exact steps needed to be taken so that the reproduction would be visually seen. Also make sure to attach a reproduction project and any visual material so that when testing our CQA team can verify that they got the same results. If you can, please use this template:

How to reproduce:

  1. Open the attached project
  2. Do this
  3. Do that
  4. Select this
  5. Observe that

Expected result: Something is visible, something is printed or something happens
Actual result: The opposite of what I expect happens

Reproducible with: Editor version I am using (e.g: 2021.3.xf1)

Reproduced on: The OS I am on (e.g: Windows 11, macOS Ventura 13.1 (Intel/Silicon))

@GediminasR - the thing is we don’t have anything reproducible to report. This “Native Crash - KiUserExceptionDispatcher” in my case never happened to me personally, but shows occasionally for some users. The thread was started in hopes that you would give us some pointers on how to diagnose it - asking us to provide the repro steps/project sound like a misunderstanding.

The most recent 3 crashes (separate reports) like that for me game come from a single user running:

Device
B450 AORUS ELITE (Gigabyte Technology Co., Ltd.)

OS version
Windows 10 (10.0.19045) 64bit

CPU
AMD Ryzen 5 3600 6-Core Processor

GFX
NVIDIA GeForce RTX 3070 Ti

Unity version
2021.3.30f1

Crashed Thread - Report 1

Thread 15 (crashed)
0 ntdll 0x00007ff8d230db34 NtWaitForMultipleObjects
1 KERNELBASE 0x00007ff8d0021be0 WaitForMultipleObjectsEx
2 KERNELBASE 0x00007ff8d0021ade WaitForMultipleObjects
3 UnityPlayer 0x00007ff83b9c5ccd winutils::ExternalCrashHandler::HandleCrash (C:\build\output\unity\unity\PlatformDependent\Win\ExternalCrashHandler.cpp:356)
4 UnityPlayer 0x00007ff83b9c5d72 winutils::ExternalCrashHandler::HandleCrash (C:\build\output\unity\unity\PlatformDependent\Win\ExternalCrashHandler.cpp:426)
5 UnityPlayer 0x00007ff83b9d6c98 winutils::ProcessInternalCrash (C:\build\output\unity\unity\PlatformDependent\Win\WinUtils.cpp:596)
6 KERNELBASE 0x00007ff8d00fe237 UnhandledExceptionFilter
7 ntdll 0x00007ff8d23154b0 RtlUserThreadStart$filt$0
8 ntdll 0x00007ff8d22fca06 _C_specific_handler
9 ntdll 0x00007ff8d23123af RtlpExecuteHandlerForException
10 ntdll 0x00007ff8d22c14b4 RtlDispatchException
11 ntdll 0x00007ff8d2310ebe KiUserExceptionDispatcher
12 UnityPlayer 0x0000000000e931aa (C:\build\output\unity\unity\Runtime\Math\Simd\vec-types.h:1083)
13 UnityPlayer 0x00007ff83c0331be ParticleGeomInit<0> (C:\build\output\unity\unity\Modules\ParticleSystem\ParticleSystemGeometryJob.cpp:1123)
14 UnityPlayer 0x0000000000e8c4b4 (C:\build\output\unity\unity\Runtime\Math\Simd\vec-sse.h:3956)
15 UnityPlayer 0x0000000000e8c4b4 (C:\build\output\unity\unity\Runtime\Math\Simd\vec-sse.h:3970)
16 UnityPlayer 0x0000000000e8c4b4 operator+= (C:\build\output\unity\unity\Runtime\Math\Simd\vec-oper.h:2005)
17 UnityPlayer 0x00007ff83c02c4b4 GenerateParticleGeometry<0,0,0,0> (C:\build\output\unity\unity\Modules\ParticleSystem\ParticleSystemGeometryJob.cpp:1589)
18 UnityPlayer 0x00007ff83c016bb8 DrawParticlesWithPivot<0> (C:\build\output\unity\unity\Modules\ParticleSystem\ParticleSystemGeometryJob.cpp:2039)
19 UnityPlayer 0x0000000000ead127 DrawParticles (C:\build\output\unity\unity\Modules\ParticleSystem\ParticleSystemGeometryJob.cpp:2048)
20 UnityPlayer 0x00007ff83c04d144 ParticleSystemGeometryJob::RenderJobCommon (C:\build\output\unity\unity\Modules\ParticleSystem\ParticleSystemGeometryJob.cpp:2916)
21 UnityPlayer 0x00007ff83c04cb4b ParticleSystemGeometryJob::RenderJob (C:\build\output\unity\unity\Modules\ParticleSystem\ParticleSystemGeometryJob.cpp:2771)
22 UnityPlayer 0x00000000004658bb (C:\build\output\unity\unity\Runtime\Jobs\Internal\JobQueue.cpp:462)
23 UnityPlayer 0x00007ff83b6058bb JobQueue::Exec (C:\build\output\unity\unity\Runtime\Jobs\Internal\JobQueue.cpp:634)
24 UnityPlayer 0x00007ff83b605aae JobQueue::ExecuteJobFromHighPriorityStack (C:\build\output\unity\unity\Runtime\Jobs\Internal\JobQueue.cpp:824)
25 UnityPlayer 0x00007ff83b605e86 JobQueue::ProcessJobs (C:\build\output\unity\unity\Runtime\Jobs\Internal\JobQueue.cpp:991)
26 UnityPlayer 0x00007ff83b607650 JobQueue::WorkLoop (C:\build\output\unity\unity\Runtime\Jobs\Internal\JobQueue.cpp:1115)
27 UnityPlayer 0x00007ff83b712751 Thread::RunThreadWrapper (C:\build\output\unity\unity\Runtime\Threads\Thread.cpp:82)
28 KERNEL32 0x00007ff8d0377344 BaseThreadInitThunk
29 ntdll 0x00007ff8d22c26b1 RtlUserThreadStart
30 ntdll 0x00007ff8d22c26b1 RtlUserThreadStart

Crashed Thread - Report 2

Thread 17 (crashed)
0 ntdll 0x00007ff94ebcdb34 NtWaitForMultipleObjects
1 KERNELBASE 0x00007ff94c711be0 WaitForMultipleObjectsEx
2 KERNELBASE 0x00007ff94c711ade WaitForMultipleObjects
3 UnityPlayer 0x00007ff8c2195ccd winutils::ExternalCrashHandler::HandleCrash (C:\build\output\unity\unity\PlatformDependent\Win\ExternalCrashHandler.cpp:356)
4 UnityPlayer 0x00007ff8c2195d72 winutils::ExternalCrashHandler::HandleCrash (C:\build\output\unity\unity\PlatformDependent\Win\ExternalCrashHandler.cpp:426)
5 UnityPlayer 0x00007ff8c21a6c98 winutils::ProcessInternalCrash (C:\build\output\unity\unity\PlatformDependent\Win\WinUtils.cpp:596)
6 KERNELBASE 0x00007ff94c7ee237 UnhandledExceptionFilter
7 ntdll 0x00007ff94ebd54b0 RtlUserThreadStart$filt$0
8 ntdll 0x00007ff94ebbca06 _C_specific_handler
9 ntdll 0x00007ff94ebd23af RtlpExecuteHandlerForException
10 ntdll 0x00007ff94eb814b4 RtlDispatchException
11 ntdll 0x00007ff94ebd0ebe KiUserExceptionDispatcher
12 UnityPlayer 0x00000000000f7690 (C:\build\output\unity\unity\Runtime\Utilities\dynamic_array.h:672)
13 UnityPlayer 0x00007ff8c1a67690 dynamic_array<unsigned char,0>::~dynamic_array<unsigned char,0> (C:\build\output\unity\unity\Runtime\Utilities\dynamic_array.h:183)
14 UnityPlayer 0x00007ff8c1dbf543 PrepareScriptableLoopObjectData (C:\build\output\unity\unity\Runtime\Graphics\ScriptableRenderLoop\ScriptableDrawRenderers.cpp:1173)
15 UnityPlayer 0x00007ff8c1dbe9b6 PrepareScriptableDrawRenderersJob (C:\build\output\unity\unity\Runtime\Graphics\ScriptableRenderLoop\ScriptableDrawRenderers.cpp:1206)
16 UnityPlayer 0x00000000004658c0 AtomicSub (C:\build\output\unity\unity\Runtime\Threads\AtomicOps.h:57)
17 UnityPlayer 0x00007ff8c1dd58c0 JobQueue::Exec (C:\build\output\unity\unity\Runtime\Jobs\Internal\JobQueue.cpp:636)
18 UnityPlayer 0x00007ff8c1dd7181 JobQueue::Steal (C:\build\output\unity\unity\Runtime\Jobs\Internal\JobQueue.cpp:750)
19 UnityPlayer 0x00007ff8c1dd5ba5 JobQueue::ExecuteJobFromQueue (C:\build\output\unity\unity\Runtime\Jobs\Internal\JobQueue.cpp:886)
20 UnityPlayer 0x00007ff8c1dd5eb1 JobQueue::ProcessJobs (C:\build\output\unity\unity\Runtime\Jobs\Internal\JobQueue.cpp:997)
21 UnityPlayer 0x00007ff8c1dd7650 JobQueue::WorkLoop (C:\build\output\unity\unity\Runtime\Jobs\Internal\JobQueue.cpp:1115)
22 UnityPlayer 0x00007ff8c1ee2751 Thread::RunThreadWrapper (C:\build\output\unity\unity\Runtime\Threads\Thread.cpp:82)
23 KERNEL32 0x00007ff94ea47344 BaseThreadInitThunk
24 ntdll 0x00007ff94eb826b1 RtlUserThreadStart
25 ntdll 0x00007ff94eb826b1 RtlUserThreadStart

Crashed Thread - Report 3

Thread 14 (crashed)
0 ntdll 0x00007ffd05e2db34 NtWaitForMultipleObjects
1 KERNELBASE 0x00007ffd037e1be0 WaitForMultipleObjectsEx
2 KERNELBASE 0x00007ffd037e1ade WaitForMultipleObjects
3 UnityPlayer 0x00007ffc90165ccd winutils::ExternalCrashHandler::HandleCrash (C:\build\output\unity\unity\PlatformDependent\Win\ExternalCrashHandler.cpp:356)
4 UnityPlayer 0x00007ffc90165d72 winutils::ExternalCrashHandler::HandleCrash (C:\build\output\unity\unity\PlatformDependent\Win\ExternalCrashHandler.cpp:426)
5 UnityPlayer 0x00007ffc90176c98 winutils::ProcessInternalCrash (C:\build\output\unity\unity\PlatformDependent\Win\WinUtils.cpp:596)
6 KERNELBASE 0x00007ffd038be237 UnhandledExceptionFilter
7 ntdll 0x00007ffd05e354b0 RtlUserThreadStart$filt$0
8 ntdll 0x00007ffd05e1ca06 _C_specific_handler
9 ntdll 0x00007ffd05e323af RtlpExecuteHandlerForException
10 ntdll 0x00007ffd05de14b4 RtlDispatchException
11 ntdll 0x00007ffd05e30ebe KiUserExceptionDispatcher
12 UnityPlayer 0x0000000000e931dc (C:\build\output\unity\unity\Runtime\Math\Simd\vec-types.h:1083)
13 UnityPlayer 0x00007ffc907d31e0 ParticleGeomInit<0> (C:\build\output\unity\unity\Modules\ParticleSystem\ParticleSystemGeometryJob.cpp:1126)
14 UnityPlayer 0x0000000000e8c4b4 (C:\build\output\unity\unity\Runtime\Math\Simd\vec-sse.h:3956)
15 UnityPlayer 0x0000000000e8c4b4 (C:\build\output\unity\unity\Runtime\Math\Simd\vec-sse.h:3970)
16 UnityPlayer 0x0000000000e8c4b4 operator+= (C:\build\output\unity\unity\Runtime\Math\Simd\vec-oper.h:2005)
17 UnityPlayer 0x00007ffc907cc4b4 GenerateParticleGeometry<0,0,0,0> (C:\build\output\unity\unity\Modules\ParticleSystem\ParticleSystemGeometryJob.cpp:1589)
18 UnityPlayer 0x00007ffc907b6bb8 DrawParticlesWithPivot<0> (C:\build\output\unity\unity\Modules\ParticleSystem\ParticleSystemGeometryJob.cpp:2039)
19 UnityPlayer 0x0000000000ead127 DrawParticles (C:\build\output\unity\unity\Modules\ParticleSystem\ParticleSystemGeometryJob.cpp:2048)
20 UnityPlayer 0x00007ffc907ed144 ParticleSystemGeometryJob::RenderJobCommon (C:\build\output\unity\unity\Modules\ParticleSystem\ParticleSystemGeometryJob.cpp:2916)
21 UnityPlayer 0x00007ffc907ecb4b ParticleSystemGeometryJob::RenderJob (C:\build\output\unity\unity\Modules\ParticleSystem\ParticleSystemGeometryJob.cpp:2771)
22 UnityPlayer 0x00000000004658bb (C:\build\output\unity\unity\Runtime\Jobs\Internal\JobQueue.cpp:462)
23 UnityPlayer 0x00007ffc8fda58bb JobQueue::Exec (C:\build\output\unity\unity\Runtime\Jobs\Internal\JobQueue.cpp:634)
24 UnityPlayer 0x00007ffc8fda7181 JobQueue::Steal (C:\build\output\unity\unity\Runtime\Jobs\Internal\JobQueue.cpp:750)
25 UnityPlayer 0x00007ffc8fda5ba5 JobQueue::ExecuteJobFromQueue (C:\build\output\unity\unity\Runtime\Jobs\Internal\JobQueue.cpp:886)
26 UnityPlayer 0x00007ffc8fda5eb1 JobQueue::ProcessJobs (C:\build\output\unity\unity\Runtime\Jobs\Internal\JobQueue.cpp:997)
27 UnityPlayer 0x00007ffc8fda7650 JobQueue::WorkLoop (C:\build\output\unity\unity\Runtime\Jobs\Internal\JobQueue.cpp:1115)
28 UnityPlayer 0x00007ffc8feb2751 Thread::RunThreadWrapper (C:\build\output\unity\unity\Runtime\Threads\Thread.cpp:82)
29 KERNEL32 0x00007ffd041b7344 BaseThreadInitThunk
30 ntdll 0x00007ffd05de26b1 RtlUserThreadStart
31 ntdll 0x00007ffd05de26b1 RtlUserThreadStart

Please advise on how we can help you diagnose these Native Crashes.

Hi all, after checking all the forums and pages regarding this Native Crash - KiUserExceptionDispatcher crash I can tell that this is happening to all different versions of the engine. Today for the first time the crash has happend to me when I was playing my build. Build had DebugBuild option enabled and I was using HDRP renderer along with RTX pp profile configured. Stack trace for this crash is leading toward rtx cpp code but I know that is not related as I saw it from other compilations without RTX. Also other users are reporting this from various different places. Sometimes it is comming when scene is loading and sometimes when App exit is performed. Looks like some threds or semaphores issue.
Unity version 2021.3.0f1. Windows 10, AMD Ryzen 5 4600H, NVIDIA GeForce RTX 2060. Up to this point i has happened with both debug and release builds. In all cases I’ve seen that WinApi is involved but also other OSes are reporting this. The only solution that comes to my mind is to change Unity version and hope for best but unfortunately when my game is in advanced development it is not an easy decision.

Thread 0
0 ntdll 0x00007ffa40a8d064 NtWaitForSingleObject
1 KERNELBASE 0x00007ffa3e2130ce WaitForSingleObjectEx
2 UnityPlayer 0x0000000001d74972 ResolveErrorCode (C:\buildslave\unity\build\External\baselib\builds\Source\WinApi\Baselib_Utilities_WinApi.h:20)
3 UnityPlayer 0x0000000001d74964 Baselib_SystemSemaphore_Acquire (C:\buildslave\unity\build\External\baselib\builds\Source\WinApi\Baselib_SystemSemaphore_WinApi.inl.h:35)
4 UnityPlayer 0x00007ff9e22c4972 UnityClassic::Baselib_SystemSemaphore_Acquire (C:\buildslave\unity\build\External\baselib\builds\Source\CProxy\Baselib_SystemSemaphore_CProxy.inl.h:19)
5 UnityPlayer 0x00000000010d1ea6 (C:\buildslave\unity\build\Runtime\Profiler\Profiler.h:554)
6 UnityPlayer 0x00000000010d1ea6 (C:\buildslave\unity\build\Runtime\Threads\Semaphore.h:24)
7 UnityPlayer 0x00007ff9e1621ea6 GfxDeviceClient::CreateGpuProgram (C:\buildslave\unity\build\Runtime\GfxDevice\threaded\GfxDeviceClient.cpp:1085)
8 UnityPlayer 0x00007ff9e10aa2cd ShaderLab::SubProgram::Compile (C:\buildslave\unity\build\Runtime\Shaders\ShaderImpl\ShaderProgram.cpp:436)
9 UnityPlayer 0x0000000000b5b8cb (C:\buildslave\unity\build\Runtime\Shaders\ShaderImpl\ShaderProgram.h:256)
10 UnityPlayer 0x0000000000b5b8cb (C:\buildslave\unity\build\Runtime\Shaders\ShaderImpl\ShaderProgram.cpp:913)
11 UnityPlayer 0x00007ff9e10ab8cb ShaderLab::program::GetMatchingSubProgram (C:\buildslave\unity\build\Runtime\Shaders\ShaderImpl\ShaderProgram.cpp:1128)
12 UnityPlayer 0x00007ff9e10b183d ShaderLab::ShaderState::FindSubProgramsToUse (C:\buildslave\unity\build\Runtime\Shaders\ShaderImpl\ShaderState.cpp:409)
13 UnityPlayer 0x0000000000b03fd4 (C:\buildslave\unity\build\Runtime\Core\Containers\hash_set.h:239)
14 UnityPlayer 0x00007ff9e1053fd4 RayTracingShadersSetupContext::CompilePendingShaders (C:\buildslave\unity\build\Runtime\Shaders\RayTracingInstanceShadersSetup.cpp:143)
15 UnityPlayer 0x00007ff9e1056230 RayTracingShadersSetupContext::IntegrateMainThread (C:\buildslave\unity\build\Runtime\Shaders\RayTracingInstanceShadersSetup.cpp:753)
16 UnityPlayer 0x00007ff9e1016766 RayTracingAccelerationStructure::UpdateInstanceShaderProperties

Sorry I missed your reply to this quite a while ago, but I wanted to reiterate what @YD_JMysior has just stated, in hopes of establishing a proper channel for reporting bugs of this nature:

These are crashes that occur extremely sporadically, typically on actual user’s hardware (not on dev machines). These reports get to me via Unity Cloud Diagnostics, which contains basic metadata, some log entries, and the stacktrace of the exception. These are not errors that I can reproduce in my own environment, and they don’t occur reliably on user’s hardware.

Again, the recurring theme here is: These occur rarely to any single user, but across the whole breadth of users playing my game, I receive errors like this fairly often. But no single error comes with any meaningful way for me to diagnose or troubleshoot it.

Unity’s bug reporting procedure all but requires a reproducible test case before a bug report ever gets past the initial triage stage. That’s simply not viable for bugs of this class. I’d like to propose that Unity introduce an internal procedure for reporting and addressing bugs of this nature, which almost certain aren’t reproducible by end users. The only thing we can really provide is the data that Unity Cloud Diagnostics provides.

Is there something Unity can do to give me the impression that it’s doing something about these KiUserExceptionDispatcher crashes? The tool’s Unity currently provides me doesn’t allow me to provide Unity with the normal bug report content.

I got a crash with this label when using Fullscreen Window mode

The issue did not occur in Fullscreen Exclusive mode…

100% agree. Having this problem now. It’s rare and unreproducible on dev or tester machines. Did anyone find any solution?

The CPU is AMD Ryzen 7 5700G. I noticed in a few threads about this error they’re also AMD CPUs.

Would be great if Crash Diagnostics could help more considering they know the game engine we’re using better than we do, plus they get more data from different games. I would think they’d be able to diagnose rare crashes like this for us.

Currently, Firebase Crashlytics is a better product that gives more free features. But, if Unity was able to make crashes like this easier to debug because it’s their own service debugging a game made in their own game engine, that would be a huge selling point.

I don’t have anything much to go on other than a hunch, but I’m starting to get the feeling that many/most crashes of this nature really aren’t Unity doing something wrong, and are instead the downstream result of someone’s graphics driver crashing, or their GPU misbehaving in some way. I’m not sure exactly what has convinced me of that…

In any case, if this ever gets reported by a user, I remind them to update their graphics drivers. I don’t think I’ve ever seen anyone get this reliably/consistently.

When I encountered this crash I had newest possible drivers. It might be the case that on some configurations and drivers this will happen on on some it will not.
This is what ChatGPT says about this: KiUserExceptionDispatcher" in Unity is related to a crash at the Windows operating system level. KiUserExceptionDispatcher is a Windows system function responsible for handling hardware and system-level exceptions. When this error appears, it indicates that something went wrong at a low level, often related to memory or improper interaction with native libraries.
Below are some possible causes of this error:

  1. Memory Management Issues
  2. Graphics Card or GPU Driver Issues
  3. Unity Version Issues
  4. RAM Issues
  5. Plugin Issues

What to Do:

  1. Update Unity: Make sure you’re using the latest version of Unity. Newer versions often include fixes for known issues.
  2. Check Plugins: If you’re using plugins, ensure they are up to date and compatible with your version of Unity and system.
  3. Diagnose Drivers: Make sure your graphics drivers and other hardware drivers are up to date.

I’ll probably do the same if I get reported by a user I remind them to update their graphics drivers. I’m also thinking about bumping up Unity version to the newest LTS but I know it won’t be smooth as I’m almost done with game development and I do not want to see million of things that do not work after upgrade. Cheers!