Out of memoryjava.lang.OutOfMemoryError: null (LWJGL Native Memory Exhausted)
What the log looks like
java\.lang\.OutOfMemoryError: null
java\.lang\.OutOfMemoryError: null[\s\S]{0,160}?org\.lwjgl\.system\.MemoryUtil\.nmemReallocChecked
How to fix it
- Lower—do not increase—the RAM allocated to Minecraft in your launcher (for example, 4 GB to 6 GB on a 16 GB PC) so your operating system retains enough free native RAM for Sodium, shaders, and GPU drivers.
- Restart your computer and close memory-heavy background apps (such as web browsers) to clear committed native memory.
- Open Windows Advanced System Settings > Performance > Virtual Memory and set the paging file to 'System managed size' on your main drive instead of disabling or capping it.
- Reduce Render Distance in Video Settings or temporarily disable heavy Iris shaderpacks to cut down off-heap chunk vertex buffer allocations.
- Remove Not Enough Crashes if installed, as it leaves rendering state corrupted after minor errors and triggers secondary memory crashes in Sodium and Iris.
| Loaders | Fabric, Quilt, Forge, Neoforge, Vanilla |
|---|
| Severity | Stops the game |
|---|
| Category | Out of memory |
|---|
Check your own log