-
-
Notifications
You must be signed in to change notification settings - Fork 21.6k
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 with circular reference in GDscript #7038
Comments
I think there was something about this somewhere, but I can't remember On Sat, Nov 5, 2016 at 5:32 AM, Emmanuel Leblond notifications@github.com
|
There's |
First of all thank you for your report and sorry for the delay. We released Godot 3.0 in January 2018 after 18 months of work, fixing many old issues either directly, or by obsoleting/replacing the features they were referring to. We still have hundreds of issues whose relevance/reproducibility needs to be checked against the current stable version, and that's where you can help us. For bug reports, please also make sure that the issue contains detailed steps to reproduce the bug and, if possible, a zipped project that can be used to reproduce it right away. This greatly speeds up debugging and bugfixing tasks for our contributors. Our Bugsquad will review this issue more in-depth in 15 days, and potentially close it if its relevance could not be confirmed. Thanks in advance. Note: This message is being copy-pasted to many "stale" issues (90+ days without activity). It might happen that it is not meaningful for this specific issue or appears oblivious of the issue's context, if so please comment to notify the Bugsquad about it. |
@Noshyaar I've just reproduce the leak with Godot 3.0.2, so this issue is still valid |
GDScript probably needs something to detect cycles and warn the user, but I don't think this is a bug.. rather an enhancement. If anyone wants to work on it, feel welcome. |
Also, so far not happening for 3.1 |
I tried the reproduction code but it doesn't seem to leak. (3.3 rc7) EDIT: |
If it works in master, should the milestone be updated to 3.x? |
We should confirm that it doesn't leak in |
I can't even reproduce in 3.3.4, which makes sense considering this issue is 5 years old.
|
I can still reproduce the leak in |
I replaced it with konnect, but I don't see any memory leaks, running the project with verbose stdout. Do I need to do anything else to show the leaks in the console? |
I think you have to run it directly (not through the editor) so that the Here's the output for me running the project directly (truncated because it was spammy):
|
Okay, I see the leaked references with |
I don't think this is solved in master. If you create a circular reference it will leak, since there's still no mechanism to check for this. |
Would be nice to test this again, after @adamscott's improvements 👀 |
@YuriSizov Unfortunately, I just tested and it still leaks. I'm investigating this. |
Hi,
Godot reference counting mechanism doesn't support circular references. This is fine for simple construction (e.g. loading References) but given GDscript is build on this, you can write leaking program pretty easily:
This is not a trouble for me (beside a circular dependency checker is complex to code and slow to run) but I think it's something users should be aware of.
I couldn't see any information about this behavior in the documentation so I think there should be a warning about this in GDscript more efficiently
The text was updated successfully, but these errors were encountered: