How to Fix “Exit Code -1073741819” in Minecraft?
When launching Minecraft: Java Edition, the game may crash immediately and show “Exit code -1073741819”, preventing it from getting past the launcher or loading into a world.

This often points to the Windows error 0xC0000005 (Access Violation), which means Java (or a native library Minecraft uses) tried to access protected or invalid memory.
Most common causes: corrupted/buggy GPU drivers, overlay/hook conflicts, incompatible mods/shaders, or system instability (overclocks/XMP/EXPO, unstable RAM, or a misconfigured pagefile).
1. Update (or Clean Install) Your Graphics Driver
This exit code often appears when Minecraft’s rendering pipeline fails during startup. Updating drivers helps, but a driver can be “latest” and still be corrupted. A clean install removes bad leftovers and resets key driver components that Minecraft (OpenGL/DirectX) relies on.
- Identify your GPU: press Windows + R, type dxdiag, press Enter, then open the Display tab (or Render tab on some systems).

Tip (laptops): You may see two GPUs (Intel iGPU + NVIDIA/AMD dGPU). Note both.
- Download the correct driver from the official NVIDIA/AMD/Intel site.
- Avoid third-party “driver updater” tools, wrong packages can break OpenGL/DirectX components and increase crashes.
- If the crash started after a recent update, try:
- Clean install using the vendor installer (NVIDIA often offers Perform a clean installation).

- Advanced (optional): Use DDU to remove leftover driver components, then reinstall.
- Clean install using the vendor installer (NVIDIA often offers Perform a clean installation).
- Restart the PC and launch Minecraft again.
2. Stop Any Conflicting Applications
Overlays, recorders, FPS counters, RGB tools, and hardware monitors can inject (“hook”) into Java/OpenGL. If a hook attaches at the wrong time during Minecraft’s startup, it can trigger an access violation. Closing them is the fastest way to confirm an overlay conflict.
- Press Ctrl + Shift + Esc to open Task Manager.
- End overlay/recording/monitoring apps (then relaunch Minecraft).

- If Minecraft launches only after closing an app, disable that app’s overlay/hooking feature (so it doesn’t come back next boot).
3. Disable Mods (Test Vanilla)
Mods/shaders can crash Minecraft before the menu, especially after updating Minecraft, Fabric/Forge/NeoForge, OptiFine/Iris, or shader packs. Version mismatches can cause Java to load incompatible native code or rendering hooks, which may trigger this exit code. Testing vanilla quickly tells you if the modded environment is the problem.
- Open your Minecraft data folder:
- Windows: Press Windows + R, type %appdata%\.minecraft, and press Enter.
- Note: If you use CurseForge/Prism/GDLauncher, open the instance folder for that profile (each instance has its own
modsand config).
- Open the mods folder:
- If there’s no mods folder, you’re likely vanilla (skip to the next fixes).
- Do not delete it, rename it to mods_old (safe backup).

- Also temporarily rename (if present) to rule out shaders/config corruption:
- shaderpacks
- resourcepacks
- config
- Launch Minecraft. If it works, restore mods in small batches until the crash returns, this usually reveals a version mismatch (Minecraft version + loader + mod/shader version).
4. Lower Minecraft Xmx Allocation
If -Xmx is set too high, Java can become unstable during early startup, especially with limited RAM, heavy background usage, or a disabled/small pagefile. Lowering -Xmx reduces memory pressure and can prevent startup-level access violations while you test stability.
- Open the Minecraft Launcher.
- Go to Installations and click More Options on your profile.
- Find
-Xmxand set it to-Xmx2Gor-Xmx4G(vanilla typically runs well on 2G–4G).
- Tip: Check RAM in Task Manager > Performance > Memory.
- For testing: Don’t set
-Xmxextremely high, more RAM can increase paging/instability and worsen crashes on some systems.
5. Increase Virtual Memory (Pagefile)
The Windows pagefile is a safety net when RAM is tight. If it’s disabled or too small, Java can crash during startup, especially with mods/shaders or high -Xmx values, because Windows can’t provide enough committed memory when Minecraft initializes.
- Search View advanced system settings and open it.

- Under Performance, click Settings.

- Open the Advanced tab and click Change under Virtual memory.

- Recommended (safest): Enable Automatically manage paging file size for all drives.
If you want manual values for troubleshooting, choose Custom size:
- Initial size (MB): ~1.5× your RAM (example: 16GB ≈ 24576MB)
- Maximum size (MB): ~2× your RAM
- Note: With 32GB+ RAM, System managed is usually better than oversized manual values.
Click Set > OK.

- Restart the PC and test Minecraft again.
6. Reset Video Settings
A bad fullscreen/resolution/graphics value stored in config can crash Minecraft before the menu. Renaming the options files forces Minecraft to rebuild clean defaults, which can remove invalid video settings that trigger crashes at startup.
- Close Minecraft and the launcher fully.
- Open %appdata%\.minecraft (or your launcher’s instance folder).

- Rename options.txt to options_old.txt.

- If you use OptiFine, also rename optionsof.txt to optionsof_old.txt.
- Launch Minecraft again. If it opens now, the crash was likely caused by a corrupted or invalid graphics setting.
If the crash still happens: try launching a different Minecraft version (older/newer) from the Launcher to rule out a specific build issue, and re-check what changed right before the problem started (new driver, new mod, new shader, new overlay, or new RAM/BIOS settings). If you’re using an overclock or XMP/EXPO, disable it temporarily to confirm stability.





