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

Possible memory leak in HmGui #208

Open
Flatfingers opened this issue Dec 3, 2023 · 3 comments
Open

Possible memory leak in HmGui #208

Flatfingers opened this issue Dec 3, 2023 · 3 comments

Comments

@Flatfingers
Copy link
Collaborator

I've noticed that when I run my current test app for the new HmGui features from the Command window, if I leave it running for a minute or two, it is very slow to shut down (click the "Launch" button, press Esc and then "Quit", or click the window X).

Worse, if I leave the application running for 10+ minutes, not touching my PC, not only does it not shut down when I tell it to, forcing me to stop it through Task Manager, it produces very strange behavior in my other Windows applications, requiring me to restart my PC completely.

In one case after this happened but before I restarted my PC, my text editor popped up an error message (when I tried to save my HmGui test code) that all 2GB of system RAM had been used and the editor needed to be reloaded.

This is leading me to guess that there might be a memory leak of some kind in HmGui. The reason I suspect HmGui, and not the engine, is that I ran another test: I started up the actual current version of LTR itself. It loaded, and I tapped it into the Main Menu page; after about 30 seconds, it automatically went back to the splash screen. I then left it alone to run for 30 minutes -- when I came back and exited, the game quit normally with no apparent issues of any kind.

TestHmGui.txt

I have attached a copy of my TestHmGui test application. If you're up for it, you can attempt to reproduce this issue by saving the attached file, renaming it to TestHmGui.lua, starting it with the latest engine code, and leaving it alone to let it run onscreen for 10 minutes or so.

@IllustrisJack
Copy link
Member

it´s easier for everyone if you push a branch containing these changes ^^

@Flatfingers
Copy link
Collaborator Author

it´s easier for everyone if you push a branch containing these changes ^^

I've had trouble in the past with trying to use alternate branches. I wind up confusing GitHub Desktop, which corrupts my local working instance of the code, which then requires me to interrupt other people to ask for help with Git to recover. So I'm very hesitant to do that again because I'm trying to respect other peoples' time.

Also, this particular set of changes is 100% entirely contained in one file that does not overwrite any other file and is not a direct part of LTR. Running it consists of copying the single Lua script (attached above) into /script/States/App/Tests, renaming it to TestHmGui.lua, and typing .\bin\lt64 TestHmGui on the command line. If it were not that easy for everyone, I would consider -- because you're asking -- taking the risk of breaking my local environment and wasting someone else's time (again) by trying to create a new branch and push that up into GitHub.

If doing that is the only way I can convince anyone to see if they can replicate what might be a pretty serious issue, tell me and I'll do it.

@IllustrisJack
Copy link
Member

We need to check if this was related to #224

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants