Skip to content

Fix leaked resources - #32

Open
Muller-Castro wants to merge 1 commit into
imjp94:masterfrom
Muller-Castro:fix-leaked-resources
Open

Fix leaked resources#32
Muller-Castro wants to merge 1 commit into
imjp94:masterfrom
Muller-Castro:fix-leaked-resources

Conversation

@Muller-Castro

Copy link
Copy Markdown

Fix scene instances not being deleted when exiting the editor

Screenshot from 2025-02-08 21-19-50

@imjp94

imjp94 commented Feb 9, 2025

Copy link
Copy Markdown
Owner

I can't reproduce it on Godot 4.2.2-stable, can you show me how you reproduce it?

Screenshot 2025-02-09 161230

@Muller-Castro

Copy link
Copy Markdown
Author

Open project with Godot...exe project.godot --verbose, wait for the editor to open then close it. Search for PieMenu or PieMenuGroup in the terminal, you should see the leaked resources output.

@imjp94

imjp94 commented Feb 10, 2025

Copy link
Copy Markdown
Owner

This is the output I get, but it didn't mention anything about PieMenu or PieMenuGroup.
And it output the same thing with this PR

TextServer: Primary interface set to: "ICU / HarfBuzz / Graphite (Built-in)".
CORE API HASH: 2995524600
EDITOR API HASH: 3767149329
EditorSettings: Load OK!
Loaded system CA certificates
Creating VMA small objects pool for memory type index 4
EditorSettings: Save OK!
EditorSettings: Save OK!
XR: Clearing primary interface
XR: Removed interface "Native mobile"
XR: Removed interface "OpenXR"
Leaked instance: FontFile:9223372057624970297 - Resource path:
Leaked instance: StyleBoxEmpty:9223372061668279416 - Resource path:
Leaked instance: TextLine:9223373483017297958
Leaked instance: TextLine:9223373483000520743
Leaked instance: TextLine:9223373483034075176
Leaked instance: TextLine:9223373483050852393
Leaked instance: Object:1469382190383
Leaked instance: Label:1469365413169 - Node name:
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: _make_custom_tooltip (static: 0, total: 1)
Orphan StringName: _enter_tree (static: 0, total: 1)
Orphan StringName: shadow_offset_x (static: 0, total: 1)
Orphan StringName: shadow_offset_y (static: 0, total: 1)
Orphan StringName: _unhandled_input (static: 0, total: 1)
Orphan StringName: _ready (static: 1, total: 2)
Orphan StringName: _has_point (static: 0, total: 1)
Orphan StringName: _exit_tree (static: 0, total: 1)
Orphan StringName: _setup_local_to_scene (static: 0, total: 2)
Orphan StringName: _test_mask (static: 0, total: 1)
Orphan StringName: shadow_outline_size (static: 0, total: 1)
Orphan StringName: font_shadow_color (static: 1, total: 2)
Orphan StringName: _get_draw_rect (static: 0, total: 1)
Orphan StringName: font_size (static: 13, total: 14)
Orphan StringName: Font (static: 0, total: 1)
Orphan StringName: _drop_data (static: 0, total: 1)
Orphan StringName: _input (static: 0, total: 1)
Orphan StringName: normal (static: 7, total: 8)
Orphan StringName: _shortcut_input (static: 0, total: 1)
Orphan StringName: font_outline_color (static: 1, total: 2)
Orphan StringName: _process (static: 0, total: 1)
Orphan StringName: Node (static: 4, total: 5)
Orphan StringName: _unhandled_key_input (static: 0, total: 1)
Orphan StringName: _gui_input (static: 0, total: 1)
Orphan StringName: _get_tooltip (static: 0, total: 1)
Orphan StringName: _can_drop_data (static: 0, total: 1)
Orphan StringName: _get_configuration_warnings (static: 0, total: 1)
Orphan StringName: _draw (static: 0, total: 2)
Orphan StringName: line_spacing (static: 0, total: 1)
Orphan StringName: font (static: 13, total: 14)
Orphan StringName: _get_minimum_size (static: 0, total: 2)
Orphan StringName: _structured_text_parser (static: 0, total: 1)
Orphan StringName: _get_drag_data (static: 0, total: 1)
Orphan StringName: outline_size (static: 1, total: 2)
Orphan StringName: font_color (static: 14, total: 15)
Orphan StringName: _physics_process (static: 0, total: 1)
StringName: 36 unclaimed string names at exit.
WARNING: GENERAL - Message Id Number: 0 | Message Id Name: Loader Message
        windows_read_data_files_in_registry: Registry lookup failed to get layer manifest files.
        Objects - 1
                Object[0] - VK_OBJECT_TYPE_INSTANCE, Handle 2047718218976
     at: _debug_messenger_callback (drivers/vulkan/vulkan_context.cpp:264)
WARNING: Blend file import is enabled in the project settings, but no Blender path is configured in the editor settings. Blend files will not be imported.
     at: _editor_init (modules/gltf/register_types.cpp:63)
WARNING: 1 RID of type "CanvasItem" was leaked.
     at: _free_rids (servers/rendering/renderer_canvas_cull.cpp:2176)
ERROR: 5 RID allocations of type 'PN18TextServerAdvanced22ShapedTextDataAdvancedE' were leaked at exit.
ERROR: 1 RID allocations of type 'PN18TextServerAdvanced12FontAdvancedE' were leaked at exit.
WARNING: ObjectDB instances leaked at exit (run with --verbose for details).
     at: cleanup (core/object/object.cpp:2209)

@Muller-Castro

Copy link
Copy Markdown
Author

This is the output I get with 4.3.stable.

image

  • Are you testing the main branch?
  • Did you compile the editor with dev_build=yes debug_symbols=yes ?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants