Out of memory

java.lang.OutOfMemoryError: Direct buffer memory

What it looks like in the log

java.lang.OutOfMemoryError: Direct buffer memory

How to fix it

  1. Update your rendering and shader mods—especially Iris, Oculus, Sodium, or Embeddium—to the latest build available for your Minecraft version, as older releases had direct buffer leaks when rendering entity shadows and overlays.
  2. Inspect your launcher's JVM arguments and remove any `-XX:MaxDirectMemorySize` flag so Java can manage direct memory automatically (or raise the value to at least `-XX:MaxDirectMemorySize=2G`).
  3. Check your RAM allocation (`-Xmx`) and ensure at least 2 to 4 GB of your computer's total physical RAM remains unallocated so your operating system and GPU drivers have room for off-heap buffers.
  4. Lower your shader Shadow Distance, reduce Render Distance, or remove high-resolution (256x+) resource packs if the crash happens in visually dense areas.
LoadersFabric, Quilt, Forge, Neoforge, Vanilla
SeverityStops the game
CategoryOut of memory

Check your own log

Related errors