Chunky (Bukkit)

Chunky (Bukkit)

20.6k Downloads

Documentation suggestion regarding pausing the game

purple512 opened this issue ยท 3 comments

commented

Hello, I've been using Chunky to pre-generate a singleplayer world (not on a server.) I ran into a trap that perhaps other people might stumble onto, and I couldn't find it in the documentation, so I thought I'd report it.

The trap is this: if you pause the game (with F3 + Esc) or just hit Esc to go into the menu, Chunky will appear to continue generating chunks. The progress meter at the top of the screen continues to update and the log contains the periodic progress reports. I thought this would be ideal since I could leave the game paused to not waste CPU rendering anything and let Chunky work in the background.

Except that when the game is paused by either of these methods, it seems that the part of the game that writes out chunks is also paused. This means that Chunky will continue to build up unwritten data. I had my Java heap set large (24 GB) so I didn't notice it immediately but apparently what happened was it eventually ran out of heap and hard froze the game, requiring that I force-kill the process as there was no way to get it to respond to quit gracefully.

This resulted in all the time spent pre-generating being wasted, since it was never written out. The world was also probably corrupt. I didn't really investigate, but I tried looking at it with MCASelector and it looked very strange. It didn't really matter as it was a new world and I could just start over.

So, as a trap for newbies, don't pause the game if you're in singleplayer. Maybe this could warrant a Wiki entry? I don't know, but if it can save someone else some wasted time it might be worth it.

Thank you!

commented

Oh! And I should add that my workaround for this issue was to set a 10 FPS limit, leave F3 debug open (so I could keep an eye on the memory used figure), and then go into spectator and hit tab to get an inventory screen (so that the window wouldn't capture my mouse if I happened to alt-tab into it.) I don't know if that's a particularly good solution but it seemed to work for me.

commented

Thanks for the report. This sounds like an interesting issue with single player.

My general recommendation is to set up a dedicated server to pre-generate your world with, as that way you don't need to keep the game client open. Chunky for single player (integrated servers) is more of a "because it works" rather than a "because you should" for the most part.

That said, I'll keep this issue open and see if there is something that can be done to address it so this doesn't crash anyone else's game. I wouldn't call it a bug, because this is technically how it should currently work, but it's not desirable.

I think I will try to make it a fix rather than a wiki entry, as I don't trust that everyone will read that to find information on such an obscure problem, even if it can easily be worked around.

commented

I can't find any evidence to back up the claims you've made here, if I load a single player world and pause it while pre-generating, everything seems to be unloading and saving normally.

My suspicion is that you have some other memory leak. This is not something that I can fix.