Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Memory Leak when Creating New Worlds During the Same Session #3342

Open
LazyJ opened this issue Apr 27, 2018 · 2 comments
Open

Memory Leak when Creating New Worlds During the Same Session #3342

LazyJ opened this issue Apr 27, 2018 · 2 comments
Labels
Category: Performance Requests, Issues and Changes targeting performance Topic: UI/UX Requests, Issues and Changes related to screens, artwork, sound and overall user experience Type: Bug Issues reporting and PRs fixing problems

Comments

@LazyJ
Copy link

LazyJ commented Apr 27, 2018

What you were trying to do

~ Creating/loading different worlds during the same session in Terasology; trying out each module in its own separate test world.

What actually happened

~ 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.

How to reproduce

  • Step 1: Create a new world with only one module.
  • Step 2: Exit that world while leaving Terasology running.
  • Step 3: Repeat Step 1 except deselecting all modules and selecting a different one. Then repeat this process for three more, new worlds.

Log details and game version

~ Terasology: Stable #74
~ Gameplay Template: Core Gameplay

Computer details

~ Linux Mint 18.3
~ 16gb RAM
~ Intel i7

@Cervator
Copy link
Member

Cervator commented May 7, 2018

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.

@Cervator Cervator added Type: Bug Issues reporting and PRs fixing problems Category: Performance Requests, Issues and Changes targeting performance Topic: UI/UX Requests, Issues and Changes related to screens, artwork, sound and overall user experience labels May 7, 2018
@4Denthusiast
Copy link
Contributor

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Category: Performance Requests, Issues and Changes targeting performance Topic: UI/UX Requests, Issues and Changes related to screens, artwork, sound and overall user experience Type: Bug Issues reporting and PRs fixing problems
Projects
None yet
Development

No branches or pull requests

3 participants