Resources still in use at exit
Opened this issue · 2 comments
Cyxo commented
System Info
- Godot Version: 3.3.2
- Operating System: Windows 10
- Compilation Method: I used the precompiled versions from the demo and github actions (release)
Describe the bug
I get the following message when closing the game (see below for the verbose log):
WARNING: cleanup: ObjectDB instances leaked at exit (run with --verbose for details).
At: core/object.cpp:2132
ERROR: clear: Resources still in use at exit (run with --verbose for details).
At: core/resource.cpp:450
To Reproduce
- Create the core in _ready
- Update the activity in _ready
- Run the callbacks in _process
- Close the game (using Alt+F4 or calling
get_tree().quit()
)
Expected behaviour
No leaks
Additional context
Full verbose log at exit:
WARNING: cleanup: ObjectDB instances leaked at exit (run with --verbose for details).
At: core/object.cpp:2132
Leaked instance: Resource:1449 - Resource path:
Leaked instance: Resource:1446 - Resource path:
Leaked instance: NativeScript:1280 - Resource path: res://discord_sdk/activity_timestamps.gdns
Leaked instance: Resource:1448 - Resource path:
Leaked instance: Resource:1450 - Resource path:
Leaked instance: NativeScript:1288 - Resource path: res://discord_sdk/activity_secrets.gdns
Leaked instance: NativeScript:1284 - Resource path: res://discord_sdk/party_size.gdns
Leaked instance: NativeScript:1286 - Resource path: res://discord_sdk/activity_party.gdns
Leaked instance: GDNativeLibrary:1232 - Resource path: res://discord_sdk/discord_game_sdk.gdnlib
Leaked instance: ConfigFile:1233
Hint: Leaked instances typically happen when nodes are removed from the scene tree (with `remove_child()`) but not freed (with `free()` or `queue_free()`).
ERROR: clear: Resources still in use at exit (run with --verbose for details).
At: core/resource.cpp:450
Resource still in use: res://discord_sdk/party_size.gdns (NativeScript)
Resource still in use: res://discord_sdk/activity_timestamps.gdns (NativeScript)
Resource still in use: res://discord_sdk/activity_party.gdns (NativeScript)
Resource still in use: res://discord_sdk/activity_secrets.gdns (NativeScript)
Resource still in use: res://discord_sdk/discord_game_sdk.gdnlib (GDNativeLibrary)
Orphan StringName: NativeScript
Orphan StringName: GDNativeLibrary
Orphan StringName: Resource
Orphan StringName: ConfigFile
StringName: 4 unclaimed string names at exit.
Checklist
- [ X ] I have checked for duplicate issues.
- [ X ] I have provided a detailed description of the issue.
- [ X ] I have provided reproduction steps (if applicable).
LennyPhoenix commented
I am aware of this issue, and it seems to be a problem with how Godot is dealing with the references.
I will look for solutions, but this is something I have been unable to resolve for a while.
LennyPhoenix commented
Been experimenting with using godot-rust, I think the rust rewrite should fix this issue