~ Creating/loading different worlds during the same session in Terasology; trying out each module in its own separate test world.
~ System memory consumption increased with each world creation/loading. Game configuration is set to "Maximum Memory" 2gb. I would shutdown the session when 5gb were surpassed. Eventually I had to reboot my entire system during long periods of modules trials.
~ Terasology: Stable #74
~ Gameplay Template: Core Gameplay
~ Linux Mint 18.3
~ 16gb RAM
~ Intel i7
Thanks for the report :-)
This might be a good fit for @TheFlash98's GSOC project as he aims to rework some of the UI flow in that area. As part of that module environment setup may change to more cleanly swap back and forth, avoiding this memory issue. At least we should re-check this with the new setup to make sure it doesn't occur anymore.
Loading a different module each time is actually irrelevant for reproducing this issue. Every time you create or load a game, it creates a new Context, and none of these are garbage-collected when returning to the main menu or start a new game, so all of the systems and things from previous games remain.
I still haven't managed to find out what's keeping the old Context alive, but there is a lot of rendering stuff that also remains even without the references to it from the Context, so it's quite likely that something there is the issue.
Most helpful comment
Loading a different module each time is actually irrelevant for reproducing this issue. Every time you create or load a game, it creates a new Context, and none of these are garbage-collected when returning to the main menu or start a new game, so all of the systems and things from previous games remain.
I still haven't managed to find out what's keeping the old Context alive, but there is a lot of rendering stuff that also remains even without the references to it from the Context, so it's quite likely that something there is the issue.