Overtime the game will use more and more memory causing chunks to not load, the game to freeze/crash and even make other programms crash because java will use up all your memory. this is called "memory leak"
Steps to Reproduce:
open/close a singleplayer world or use a netherportal a couple times
look at your overall memory usage, java will use more and more everytime
Observed Results:
chunks dont load,mobs dont move, projectiles dont fly,chat doesnt work, game and even other programms crash
Expected Results:
chunks load, mobs move, projectiles fly,chat works, game and other programms dont crash
Linked issues
is duplicated by
Attachments
Comments


I don't know if it's a memory leak per se, but Mem
is going up and down significantly faster than in 1.17.1, and the game is also taking hundreds of megabytes of RAM more than said version. Some change in the world generation code is causing the garbage collector to go crazy.

Can confirm, was loading and leaving worlds to verify MC-236650 and after leaving and joining for a few times my fps absolutely tanked and ram usage was at 2gb and would not go back down after waiting for 2 minutes

According to cortex, this is caused by the new jfr profiler support.
[media]
Yeah, the issue is the event registered in MinecraftServer::registerJFRHooks
which keeps a reference to this
(the server) through the Runnable
.
The fix would be to store the Runnable
in a field and call FlightRecorder::removePeriodicEvent
when the server shuts down.
Can confirm, I try to change it to a higher Memory but it resets it back to 2GB every time I close the game
Can confirm.
The memory leak is seriously bad compared to most memory leaks...