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

Resource Leak Investigation #34

Closed
Kehom opened this issue Mar 31, 2021 · 0 comments
Closed

Resource Leak Investigation #34

Kehom opened this issue Mar 31, 2021 · 0 comments
Labels
bug Something isn't working

Comments

@Kehom
Copy link
Owner

Kehom commented Mar 31, 2021

Hello everyone.

I'm opening this issue to let you know that I'm aware of a problem with resource leaks, more specifically with the Inventory, Network and DebugHelper plugins.

Specifically for the Network and the DebugHelpers the error message will appear only if at least one of those plugins is enabled. I have tested forcefully freeing the two automatically created singletons at the plugin's _exit_tree() function and the error message went away. I will further investigate to identify if this is a problem with the code or a bug in the EditorPlugin.add_autoload_singleton() function.

As for the Inventory, the problem is a bit more complicated. On my preliminary tests it seems the root cause of the problem is in any script class that static types "itself", something like this:

extends whatever_that_is_a_reference
class_name some_class

func some_func(some_arg: some_class)....

Just having a script with code like this will result in resource leak error message.

Based on this information, I'm not sure about the severity of the problem on the Inventory plugin, however it's probably harmless on the Network and the DebugHelpers plugins, as the problem seems to be that the singletons are not freed in time during the exit process.

@Kehom Kehom added the bug Something isn't working label Mar 31, 2021
@Kehom Kehom closed this as completed in 10b9c00 Jul 20, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant