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 leakage in project, even in editor #30

Closed
1 of 2 tasks
qarmin opened this issue Feb 1, 2020 · 3 comments
Closed
1 of 2 tasks

Memory leakage in project, even in editor #30

qarmin opened this issue Feb 1, 2020 · 3 comments
Labels
bug Something isn't working

Comments

@qarmin
Copy link

qarmin commented Feb 1, 2020

  • Bug report.
  • Feature request.

Bug report

When I open project(even in editor) and close it, then I see leak:

ERROR: ~List: Condition "_first != __null" is true.
   At: ./core/self_list.h:112.
ERROR: ~List: Condition "_first != __null" is true.
   At: ./core/self_list.h:112.
WARNING: cleanup: ObjectDB Instances still exist!
   At: core/object.cpp:2071.
ERROR: clear: Resources Still in use at Exit!
   At: core/resource.cpp:476.

When I add -v argument to Godot run command, then I see that res://src/Main/StateMachine/State.gd leaks

Orphan StringName: msg
Orphan StringName: owner
Orphan StringName: unhandled_input
Orphan StringName: GDScriptNativeClass
Orphan StringName: is_in_group
Orphan StringName: node
Orphan StringName: res://src/Main/StateMachine/State.gd
Orphan StringName: enter
Orphan StringName: _parent
Orphan StringName: _state_machine
Orphan StringName: _get_state_machine
Orphan StringName: get_parent
Orphan StringName: Node
Orphan StringName: InputEvent
Orphan StringName: event
Orphan StringName: physics_process
Orphan StringName: _init
Orphan StringName: _ready
Orphan StringName: exit
Orphan StringName: GDScript
Orphan StringName: delta
Orphan StringName: process

I'm not sure what cause leaks, but probably returning inside class, objects of this class or parent class.

@NathanLovato
Copy link
Collaborator

Thanks. I don't know what would be causing this. It's just a virtual class, it doesn't run in the editor (i.e. it's not using tool mode) and as users, we're not managing memory. Do you have a more precise idea of what could be causing that?

@NathanLovato NathanLovato added the bug Something isn't working label Feb 1, 2020
@qarmin
Copy link
Author

qarmin commented Feb 1, 2020

Seems that leak happens in this line
https://github.com/GDQuest/godot-3d-mannequin/blob/e34df30e431e9d11d099e64a1a84742de43844d0/src/Main/StateMachine/State.gd#L11
and this is almost same bug as godotengine/godot#30668

as workaround I suggest to remove all information's about types, where type of variable is same as class in which is(until of course the bug is fixed in Godot).
Changing line from above to:

var _parent = null 

fixes leak.

@NathanLovato
Copy link
Collaborator

Thanks!

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

2 participants