-
-
Notifications
You must be signed in to change notification settings - Fork 21.4k
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
await
results in GDScriptFunctionState
memory leaks
#74449
Comments
GDScriptFunctionState
memory leaksawait
results in GDScriptFunctionState
memory leaks
The same in the current |
Hello, what is the current status on the subject? |
I can see/tell as much as you do: no one said anything in here, no linked PR / other issues. So I'd guess no one investigated this. I'll put a link at the contributor's chat, maybe someone will get interested. |
it sill occurs on v4.1.stable.official [9704596] |
After more than one year, this bug is still open ;( |
# Why Running tests via CMD line shows a lot of memory leaks at program exit. # What - fixed releasing of all singletons - `func_assert` has problems with lambdas when using inside `timer.timeout.connect`, converted lambda into function - Handling of stored asserts in the thread context results in inconsistency during cleanup - fixed cleanup on `GdUnitCommandHandlerTest` ## Finally, I have reduced most of the memory leaks nodes, but there are still `GDScriptFunctionState` orphaned nodes that I can't solve because these are handled internally by Godot see [74449](godotengine/godot#74449) ``` Statistics: | 947 tests cases | 0 error | 0 failed | 1 flaky | 13 skipped | 0 orphans | Executed test suites: (100/104), 4 skipped Executed test cases: (934/947), 13 skipped Total time: 3min 0s 409ms Open Report at: file:///home/runner/work/gdUnit4/gdUnit4/reports/report_1/index.html Exit code: 0 ---------------------------------------------------------------- Cleanup singletons ["GdUnitThreadManager", "GdUnitDefaultValueDecoders", "GdUnitCommandHandler"] Unregister singleton 'GdUnitThreadManager' Free singleton instance 'GdUnitThreadManager:<Object#507678557642>' Successfully freed 'GdUnitThreadManager' Unregister singleton 'GdUnitDefaultValueDecoders' Free singleton instance 'GdUnitDefaultValueDecoders:<Object#509540832395>' Successfully freed 'GdUnitDefaultValueDecoders' Unregister singleton 'GdUnitCommandHandler' Free singleton instance 'GdUnitCommandHandler:<Object#3858659025580>' Successfully freed 'GdUnitCommandHandler' ---------------------------------------------------------------- Finallize .. done Finallize .. -Orphan nodes report----------------------- Finallize .. done XR: Clearing primary interface XR: Removed interface "Native mobile" XR: Removed interface "OpenXR" WARNING: ObjectDB instances leaked at exit (run with --verbose for details). at: cleanup (core/object/object.cpp:2327) Leaked instance: GDScriptFunctionState:9223373291404658414 Leaked instance: GDScriptFunctionState:92233732947[6010](https://github.com/MikeSchulze/gdUnit4/actions/runs/11956449331/job/33331231410?pr=599#step:4:6018)1646 Leaked instance: GDScriptFunctionState:9223373292545509197 Leaked instance: GDScriptFunctionState:9223373291673093970 Leaked instance: GDScriptFunctionState:9223373293719914330 Leaked instance: GDScriptFunctionState:9223373292881053539 Leaked instance: GDScriptFunctionState:9223373296521709422 Leaked instance: GDScriptFunctionState:9223378085393468557 Leaked instance: GDScriptFunctionState:9223382060754801221 Leaked instance: GDScriptFunctionState:9223373293753472331 Leaked instance: GDScriptFunctionState:9223377142497156399 Leaked instance: GDScriptFunctionState:9223378085359924447 Leaked instance: GDScriptFunctionState:9223382060788375283 Hint: Leaked instances typically happen when nodes are removed from the scene tree (with `remove_child()`) but not freed (with `free()` or `queue_free()`). Orphan StringName: test_case1 (static: 0, total: 1) Orphan StringName: _validate_callback (static: 0, total: 1) Orphan StringName: await_millis (static: 0, total: 5) Orphan StringName: test_timeout_single_yield_wait (static: 0, total: 1) Orphan StringName: test_timeout_2s (static: 0, total: 1) Orphan StringName: _execute (static: 0, total: 1) Orphan StringName: test_timeout_4s (static: 0, total: 1) Orphan StringName: timeout (static: 2, total: 8) Orphan StringName: cb_is_equal (static: 0, total: 2) Orphan StringName: test_timeout_long_running_test_abort (static: 0, total: 1) Orphan StringName: test_timeout_and_assert_fails (static: 0, total: 1) StringName: 11 unclaimed string names at exit. Run tests ends with 0 ```
Godot version
v4.0.stable.official [92bee43]
System information
Windows 10
Issue description
Using await results in memory leak.
I got a lot of orphan nodes at exit after execution my test coverage (using GdUnit4).
The tests uses some stuff around timeouts and await for signals and function results.
I've boiled it down so far, and it looks like a simple "await get_tree().process_frame". already suffices to get orphan nodes,
I found this issue #57126, but it is already closed.
And also a lot of orphan
StringName
are found, i guess this is already adressed.Steps to reproduce
execute the attached scene by
Godot.exe --verbose -d res://Orphans.tscn
Minimal reproduction project
orphan_await.zip
The text was updated successfully, but these errors were encountered: