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? #208

Open
Stroopwafle opened this issue Nov 2, 2024 · 1 comment
Open

Memory leak? #208

Stroopwafle opened this issue Nov 2, 2024 · 1 comment

Comments

@Stroopwafle
Copy link

Hi,

New to libGDX, so sorry if this a newbie mishap!

When I create a project creating liftoff (aplicationListener template), add nothing to it, run it and close it, the application still runs in the background.

I also get this Gradle deprecated feature warning.

15:49:38: Executing 'run'...

Task :core:compileJava
Task :core:generateAssetList UP-TO-DATE
Task :core:processResources NO-SOURCE
Task :core:classes
Task :core:jar
Task :lwjgl3:compileJava UP-TO-DATE
Task :lwjgl3:generateAssetList UP-TO-DATE
Task :lwjgl3:processResources UP-TO-DATE
Task :lwjgl3:classes UP-TO-DATE
Task :lwjgl3:run

Deprecated Gradle features were used in this build, making it incompatible with Gradle 9.0.

You can use '--warning-mode all' to show the individual deprecation warnings and determine if they come from your own scripts or plugins.

For more on this, please refer to https://docs.gradle.org/8.10.2/userguide/command_line_interface.html#sec:command_line_warnings in the Gradle documentation.

BUILD SUCCESSFUL in 14s
5 actionable tasks: 3 executed, 2 up-to-date
15:49:53: Execution finished 'run'.

I'm on a windows laptop using Intellij.

Cheerios.

@tommyettinger
Copy link
Member

The deprecation warning is not an issue. Gradle deprecates a significant chunk of their code every year or two, it's insane, and there's no way to keep up with how often they deprecate code. The best option we have is to fix things when we absolutely have to at the 9.x update, since then we get more useful options to replace the deprecated stuff, instead of sometimes having to remove code without replacements available.

The process not terminating is weird, and it has happened to me intermittently in different situations. I just built a new ApplicationListener-template project and tried the same steps, also on Windows x64, also on a laptop:

8:51:54 PM: Executing 'run'...

> Task :core:compileJava
> Task :core:generateAssetList UP-TO-DATE
> Task :core:processResources NO-SOURCE
> Task :core:classes
> Task :core:jar
> Task :lwjgl3:compileJava
> Task :lwjgl3:generateAssetList UP-TO-DATE
> Task :lwjgl3:processResources
> Task :lwjgl3:classes
> Task :lwjgl3:run

Deprecated Gradle features were used in this build, making it incompatible with Gradle 9.0.

You can use '--warning-mode all' to show the individual deprecation warnings and determine if they come from your own scripts or plugins.

For more on this, please refer to https://docs.gradle.org/8.10.2/userguide/command_line_interface.html#sec:command_line_warnings in the Gradle documentation.

BUILD SUCCESSFUL in 7s
5 actionable tasks: 5 executed
8:52:02 PM: Execution finished 'run'.

In my case closing the window works fine. Is it possible something running passively on your machine, such as an antivirus or backup program, might have locked some (temporary) file that libGDX extracted from itself and now wants to delete? The LWJGL3 native libraries all get extracted to a temporary directory, which in Liftoff projects being run on Windows, is set to (almost always) "C:\ProgramData\libGDX-temp". If that folder, or wherever libGDX-temp is, is getting archived or backed up, the program might not close until that process is done. Similarly, antivirus might be scanning any number of files created and won't let them be deleted until it has finished. If your project is in a DropBox or OneDrive folder (or some similar backup service), those are known to mess up how libGDX, and maybe all Java, projects are able to run normally. If your project is in one of those directories, try moving or copying it to somewhere not tracked by that backup tool, and then opening that project and running it. If this happens intermittently, it might not reproduce immediately even if the project wasn't moved.

Well, good luck! I don't know exactly what happened, and by the nature of this type of bug, it may have been some rare occurrence...

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