godotengine / godot

Godot Engine – Multi-platform 2D and 3D game engine
https://godotengine.org
MIT License
89.15k stars 20.21k forks source link

Godot leaks GDScriptEditorTranslationParserPlugin after recent commits #40132

Closed qarmin closed 4 years ago

qarmin commented 4 years ago

Godot version: 4.0.dev.custom_build. 0287508dc

Issue description: When running godot with command godot4 -e -q -v, then even with project manager leaks 1 node

WARNING: ObjectDB instances leaked at exit (run with --verbose for details).
     at: cleanup (core/object.cpp:2041)
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: GDScriptEditorTranslationParserPlugin
StringName: 1 unclaimed string names at exit.

CC @SkyLucilfer

SkyLucilfer commented 4 years ago

Hello @qarmin , thank you very much for reporting the issue and notifying me.

I tried running godot from the command line with "-e -q -v" , but I couldn't get the exact same message as yours. I'm on commit 0287508dcdf51c7349b41aabb7679061a5147fdf too. May I know if running "-e -q -v" or "--verbose" is all I need to print out the message you had?

The message that I had was a crashed backtrace:

WARNING: ObjectDB instances leaked at exit (run with --verbose for details).
     at: ObjectDB::cleanup (core\object.cpp:2041)
CrashHandlerException: Program crashed
Dumping the backtrace.
[0] ObjectDB::cleanup (D:\Game Dev\Godot\_engineDev\godot\core\object.cpp:2055)
[1] unregister_core_types (D:\Game Dev\Godot\_engineDev\godot\core\register_core_types.cpp:317)
[2] Main::cleanup (D:\Game Dev\Godot\_engineDev\godot\main\main.cpp:2398)
[3] widechar_main (D:\Game Dev\Godot\_engineDev\godot\platform\windows\godot_windows.cpp:163)
[4] _main (D:\Game Dev\Godot\_engineDev\godot\platform\windows\godot_windows.cpp:183)
[5] main (D:\Game Dev\Godot\_engineDev\godot\platform\windows\godot_windows.cpp:195)
[6] __scrt_common_main_seh (d:\agent\_work\3\s\src\vctools\crt\vcstartup\src\startup\exe_common.inl:288)
[7] BaseThreadInitThunk
-- END OF BACKTRACE --

Regarding the issue itself, it might be because I didn't clear the vectors in EditorTranslationParser in the destructor, in editor_translation_parser.cpp. However, after clearing the vectors I still have the same crashed backtrace as above.. So if I could have the same message as yours I could see if I'm making progress.

qarmin commented 4 years ago

Crash is different issue, and to get proper info you need to apply workaround from https://github.com/godotengine/godot/issues/39937#issuecomment-650998048