-
Bug
-
Resolution: Fixed
-
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
-
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 21.20.16.4550
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 21.20.16.4550
-
Confirmed
-
Creative
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.
To Reproduce
- 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.
Render Distance
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.
Older Versions
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.
Video
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.
Video:
World:
http://www.mediafire.com/file/pt13bqdxsja59p5/New_World-.zip
Video Highlights:
- 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
- is duplicated by
-
MC-125013 Sudden and random lag spikes + reoccurring spikes
- Resolved
-
MC-129811 freezing entity
- Resolved
-
MC-129878 Game crash when you are in new ocean biome
- Resolved
-
MC-129898 the game consumes 1GB of memory, sometimes it crashes when I'm playing
- Resolved
-
MC-130163 Running out of memory (memory leak)
- Resolved
-
MC-130173 OOM in dedicated server 18w21a (18w20c did not trip)
- Resolved
-
MC-130703 [18w22c] Exception in server tick loop java.lang.OutOfMemoryError: Java heap space
- Resolved
- relates to
-
MC-128163 Worldgen worker thread crash - Out of Memory error
- Resolved
-
MC-130162 Exception generating new chunk - OutOfMemoryError: Java heap space (32 bit Java)
- Resolved
-
MC-130427 Chunk loading stops and game crashes
- Resolved
-
MC-130959 Multiplayer world crashing "description: watching server" caused by Out of Memory
- Resolved