Affects Version/s: Minecraft 18w19b, Minecraft 18w20a, Minecraft 18w20c, Minecraft 18w21a, Minecraft 18w22b, Minecraft 18w22c, Minecraft 1.13-pre1, Minecraft 1.13-pre2, Minecraft 1.13-pre3, Minecraft 1.13-pre5, Minecraft 1.13-pre7, Minecraft 1.13-pre8, Minecraft 1.13-pre9
Fix Version/s: Minecraft 1.13
Environment:Windows 8.1 Pro 64bit
Intel Core i7
JAVA 1.8.0_25 64bit
1GB allocated to MC (also tested with 2GB allocation)
NVidia GeForce GTX 770/PIC/SSE2
4.6.0 NVIDIA 391.35
*Also Tested On*
Intel Core i7
JAVA 1.8.0_25 64bit
1GB allocated to MC
Intel HD Graphics 620
4.4.0 - Build 220.127.116.1150
Windows 8.1 Pro 64bit Intel Core i7 16GB RAM JAVA 1.8.0_25 64bit 1GB allocated to MC (also tested with 2GB allocation) NVidia GeForce GTX 770/PIC/SSE2 4.6.0 NVIDIA 391.35 *Also Tested On* Windows 10 Intel Core i7 16GB RAM JAVA 1.8.0_25 64bit 1GB allocated to MC Intel HD Graphics 620 4.4.0 - Build 18.104.22.16850
Simply moving through the world gradually uses up all allocated memory and eventually causes the game to stutter and become unplayable as it struggles to free RAM. Sometimes the game crashes as a result.
Although my reproduction steps below mention Creative Mode, this also happens in Survival. Creative Mode merely allows recreation of the issue more quickly/easily.
- Create a new world/creative mode (default)
- After spawning, toggle the debug screen on
- Fly up into the sky a fair amount
- Begin sprint-flying in a single direction
- Continue flying straight while watching the memory usage
Alternatively, instead of traveling straight, you can reproduce the issue by simply flying in a large enough square that chunk loading/unloading is actively taking place while traveling. In my tests, I used 800 blocks square.
Memory usage appears normal at the start (in my environment 40-60%), but over time the max percentage that is being used slowly increases and eventually peaks in the 90-98% range where the game can no longer operate smoothly and may crash.
In my environment, this is 100% repeatable and I have tested this with the following world types. After the indicated blocks traveled, allocated RAM hits 100%, memory usage reaches and/or stays above 90% and the game soon begins to stutter dramatically as it tries to free up ram every few seconds.
- Default ~1700 blocks
- Amplified, No Structures, Peaceful ~2800 blocks
- Superflat, Classic, Structures, Easy ~4600 blocks
- Superflat, Classic, No Structures, Peaceful ~6700 blocks
- Superflat, The Void ~7400 blocks
- Default on Win10 ~4100 blocks
Please note above that the issue even occurs in a Void Superflat world with no (additional) blocks or entities, though it does take a bit longer to occur.
Allocating Additional RAM
Allocating more RAM to Minecraft only seems to minimally impact these results. In a freshly generated Default world with 2GB allocated to Minecraft, it only took ~2000 blocks for the issue to occur. In other words, an extra GB of RAM only gave me about 300 blocks (as compared to my earlier test) additional travel before the game had problems. Edit: It does seem that the pauses happen less-often with more RAM, but they still exist.
Unsurprisingly, changing the render distance to 2 chunks and then back up to 12 chunks, causes the RAM usage to temporarily drop down 40-50% (although allocation is still 100%), making this a potential workaround.
Also note that I see a similar issue in 1.12.2, so this isn't entirely new. However, when v1.12.2 peaks at 90%+ memory usage, it appears to cull about 30% each time, keeping it from getting too out of control. In the 18w19b snapshot it is much more pronounced and the game is unable to recover.
Game Output Log
I've attached a snapshot of the warnings and errors from the output of my Windows 10 test. Note that other than the "can't keep up" server thread errors, there is nothing else unusual. When the game does crash, no additional messages appear in the output. The game simply quits and/or JAVA reports that it has stopped working.
I have included links to video illustrating the issue and to download the game files used in the video. The video begins with the generation of a new default world and then illustrates the same issue after loading the same world.
- At 02:35 you begin to see the game rubberband
- At 02:41 the game begins to full-stop at is tries to clear RAM
- At 03:35 I reload the world
- At 04:53 The game crashes