Minecraft exit code -1073740791, 0xC0000409 stack buffer overrun

Exit code -1073740791 is the decimal form of Windows error 0xC0000409, STATUS_STACK_BUFFER_OVERRUN, which means native code wrote past the end of a buffer on the stack, and Windows stopped the process immediately to protect the system. In Minecraft the usual cause family is a faulty or incompatible mod, a graphics driver, or an overlay or audio tool that hooks into the game, such as NVIDIA Ansel or Nahimic audio.

The fix, in order

  1. Test with a clean, unmodded game. Move the mods folder aside and remove shader packs, then launch. If the clean game works, the cause is a mod, so add mods back a few at a time.
  2. Disable overlays and hooking software. Turn off the Discord overlay, NVIDIA Ansel, GeForce Experience overlay, screen recorders, and audio tools like Nahimic, then test again.
  3. Update the graphics driver from NVIDIA, AMD, or Intel with a clean install.
  4. Add the JVM argument -XX:StackShadowPages=32 to the launcher profile. In the launcher, open Installations, edit the profile, open More Options, and add it to the JVM Arguments. This is a reported fix for this crash on newer game versions, where the default stack shadow pages are too small.
  5. Check the antivirus. Add the Minecraft folder and Java to the antivirus exclusions, since security software can trigger this crash when it hooks into the game.
  6. Verify the game files. In the launcher, check the installation, or reinstall the game to replace any corrupt files.
  7. Update Java through the launcher. The official launcher bundles its own Java runtime, so reinstalling the launcher refreshes it.

If it still happens

If the crash report or log names a mod, a driver file, or an overlay, that name is the cause, so remove or update that one thing first. If the crash only happens with a specific mod pack, update the pack, since a single outdated mod inside it is the usual culprit.

Common questions

What is a stack buffer overrun? It means a program wrote more data than a memory buffer could hold, spilling into nearby memory. Windows detects it and stops the program at once, which is why the game closes with no warning.

Is this crash caused by too little RAM? Not directly. This code is about a native code error, not about running out of memory. Low RAM causes a different error, java.lang.OutOfMemoryError, so do not raise the RAM allocation to fix this one.

Related errors

Minecraft exit code -1073741819 · Minecraft exit code 1 · Minecraft out of memory error · Minecraft exit code 255

Was this helpful?