Superflat world with very tall layers cause OutOfMemoryError on world rendering

I was testing out a few changes to my world's data pack. That consisted of increasing the height 512 blocks further down, and adding a new flat world generation overriding the old layers specified when creating the world a decade ago. Every time I made a change, I deleted the world, and pasted in a backup, additionally including the data pack changes. The last change I made, was changing the second layer, stone, from a height (tallness, not offset) of 1 block to 255 blocks. When I started the game and loaded in the world, it pretty much froze. Not exactly. It's running. But very slowly. And uselessly. And spewing lots of errors. See the endlessly long log file generated from this...
14 Replies
hardester
hardester4mo ago
This feels to me like memory pressure. The world generator work way too fast, causing the lod generator to choke with a huge amount of incoming tasks. Can you push the memory higher? If not, then I suggest lowering youe CPU load.
Andreas shrieks of confusion
Not really, I only have 32 GB, with 8 given to the JVM. DH claims the rest in native space, and if I give more, I risk freezing up the entire computer, needing a force shutdown. I'll try reducing the CPU load. Either way, this should not happen; it should reduce the load like vanilla does, and instead load slower. Well, the game is running fine after I set the CPU load to "minimal impact", however, I'm getting the "DH overloaded" message in the chat. Even with minimal impact, the game is stalling when I move a few chunks away. That was not the case before. Clearly, I didn't pressure it so much with generating new chunks so filled, though. I'll quit the game and try with all mods disabled. Should've done that before posting here. My bad. Eh, the game stopped responding completely. Might corrupt some chunks being generated if I force quit it. (Edit: the framebuffer just blacked out? Could move the window and close it with the titlebar button)
hardester
hardester4mo ago
Just for sanity check, try going into DH settings > Advance settings > Threading, set the world generator thread to 1 and the world generator runtime% to 0.1 to really force the generator to slow down.
Andreas shrieks of confusion
Already set by "minimal impact".
hardester
hardester4mo ago
This may need James to investigate then. At no point during testing where anyone tested Distant Horizons on a superflat world type. Maybe there's one or two that I missed, but I don't think I've seen a single message talking about it in general or off-topic up until recently.
Andreas shrieks of confusion
Sorry, what do you mean? Remove "where"?
hardester
hardester4mo ago
Nobody tested superflat worlds with Distant Horizons until now, from what I see.
Andreas shrieks of confusion
Ah. How beefy where the noise worlds that were tested? Bedrock at 1, and stone from 2 to 255, is quite a lot.
hardester
hardester4mo ago
Superflat worlds have predictable block placement. Compared to normal worlds where block placements can be procedurally placed, world generator just chews through superflat like how Google Chrome chews RAM for breakfast. I'm typing on my slower phone so, bear with me.
Andreas shrieks of confusion
Vanilla, 0 mods, 32 chunks render distance. Nothing else changed, simply disabled the mods in Prism. So, 8 GB to the JVM. No issues flying around in spectator mode at full speed in all newly generating chunks. Slightly noticeably lag spikes (lasting max 0.01 seconds (estimate)), but doesn't really interfere with the 100-140 fps. The chunks also generate very fast, keeping up with my flying speed. I quit the game, re-enabled all the mods in Prism, launched the game, and went directly into my world. No errors, now. No OOM issues. No stuttering or freezing. A few "DH overloaded", but that's expected, as the CPU load is still set to "minimum impact". Flew into the chunks I generated in vanilla, as well as into ungenerated chunks. Worked fine for a short while, then the game stalled like it normally does when DH is generating lots of LODs. Let the game work, and eventually it came back to life, unlike last time. Vanilla chunks are seriously struggling. They either don't load, or flash in for a second, before disappearing again (vanilla chunks eventually stopped loading entirely). LODs struggle, too, but load somewhat at higher CPU loads:
Andreas shrieks of confusion
Older screenshot from a few days ago to show how it's supposed to look. The two last screenshots were taken right behind that bridge, to the left. (Ignore the rendering issues on the bridge far behind, they're caused by DH's cave culling.)
No description
Andreas shrieks of confusion
After quitting the world, the game has now been stuck on the "Saving world" screen for 50 minutes (assumed the game was deadlocked, so I killed it). Last log output:
Andreas shrieks of confusion
Did I post this in help-me and not bug-report...? Sigh... Reposted in the appropriate location: https://discord.com/channels/881614130614767666/1281676594037002420
Want results from more Discord servers?
Add your server