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

Regression: .NET editor build 4.2-beta2 is leaking resources at exit #83717

Closed
ttencate opened this issue Oct 21, 2023 · 3 comments · Fixed by #83809
Closed

Regression: .NET editor build 4.2-beta2 is leaking resources at exit #83717

ttencate opened this issue Oct 21, 2023 · 3 comments · Fixed by #83809

Comments

@ttencate
Copy link
Contributor

ttencate commented Oct 21, 2023

Godot version

4.2-beta2_mono (official build downloaded from the website)

System information

Godot v4.2.beta2.mono - Arch Linux #1 SMP PREEMPT_DYNAMIC Wed, 13 Sep 2023 08:37:40 +0000 - X11 - Vulkan (Forward+) - dedicated AMD Radeon RX 6600 (amdgpu) - 13th Gen Intel(R) Core(TM) i7-13700K (24 Threads)

Issue description

Upon exiting the editor, the following is printed to the console:

ERROR: Condition "!EditorSettings::get_singleton() || !EditorSettings::get_singleton()->has_setting(p_setting)" is true. Returning: Variant()
   at: _EDITOR_GET (editor/editor_settings.cpp:1140)
ERROR: 2 RID allocations of type 'N10RendererRD12LightStorage11ShadowAtlasE' were leaked at exit.
ERROR: 2 RID allocations of type 'N10RendererRD14TextureStorage12RenderTargetE' were leaked at exit.
ERROR: 7 RID allocations of type 'N10RendererRD14TextureStorage7TextureE' were leaked at exit.
ERROR: 14 RID allocations of type 'N18RendererCanvasCull4ItemE' were leaked at exit.
ERROR: 2 RID allocations of type 'N18RendererCanvasCull6CanvasE' were leaked at exit.
ERROR: 2 RID allocations of type 'N16RendererViewport8ViewportE' were leaked at exit.
WARNING: 14 RIDs of type "Texture" were leaked.
     at: finalize (drivers/vulkan/rendering_device_vulkan.cpp:9623)
ERROR: 14 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:2207)

This doesn't happen in 4.2-beta2 without mono, and it doesn't happen in 4.1.2 stable with mono.

Running with --verbose doesn't provide much more useful info:

EditorSettings: Save OK!
Unloading: Disposing tracked instances...
ERROR: Condition "!EditorSettings::get_singleton() || !EditorSettings::get_singleton()->has_setting(p_setting)" is true. Returning: Variant()
   at: _EDITOR_GET (editor/editor_settings.cpp:1140)
Unloading: Finished disposing tracked instances.
XR: Clearing primary interface
XR: Removed interfaceNative mobile
XR: Removed interfaceOpenXR
PulseAudio: context terminated
ERROR: 2 RID allocations of type 'N10RendererRD12LightStorage11ShadowAtlasE' were leaked at exit.
ERROR: 2 RID allocations of type 'N10RendererRD14TextureStorage12RenderTargetE' were leaked at exit.
ERROR: 7 RID allocations of type 'N10RendererRD14TextureStorage7TextureE' were leaked at exit.
ERROR: 14 RID allocations of type 'N18RendererCanvasCull4ItemE' were leaked at exit.
ERROR: 2 RID allocations of type 'N18RendererCanvasCull6CanvasE' were leaked at exit.
ERROR: 2 RID allocations of type 'N16RendererViewport8ViewportE' were leaked at exit.
WARNING: 14 RIDs of type "Texture" were leaked.
     at: finalize (drivers/vulkan/rendering_device_vulkan.cpp:9623)
ERROR: 14 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:2207)
Leaked instance: ImageTexture:-9222664501122301707 - Resource path: 
Leaked instance: ImageTexture:-9222662851854860006 - Resource path: 
Leaked instance: ImageTexture:-9222654605517651640 - Resource path: 
Leaked instance: StyleBoxFlat:-9222557848494407328 - Resource path: 
Leaked instance: FontFile:-9222680444040904284 - Resource path: 
Leaked instance: StyleBoxFlat:-9222557298738592657 - Resource path: 
Leaked instance: StyleBoxFlat:-9222556748982778768 - Resource path: 
Leaked instance: StyleBoxFlat:-9222556199226964879 - Resource path: 
Leaked instance: StyleBoxFlat:-9222555649471150990 - Resource path: 
Leaked instance: StyleBoxFlat:-9222555099715337101 - Resource path: 
Leaked instance: StyleBoxEmpty:-9222547952889756544 - Resource path: 
Leaked instance: StyleBoxFlat:-9222539156796734320 - Resource path: 
Leaked instance: StyleBoxFlat:-9222538607040920431 - Resource path: 
Leaked instance: StyleBoxFlat:-9222538057285106542 - Resource path: 
Leaked instance: StyleBoxFlat:-9222514417785109315 - Resource path: 
Leaked instance: AcceptDialog:36904558030544093 - Node name: 
Leaked instance: World2D:-9186466929068417826 - Resource path: 
Leaked instance: ViewportTexture:-9186465279800976161 - Resource path: 
Leaked instance: Object:36907306809613536
Leaked instance: Panel:36907856565427425 - Node name: @Panel@17151
Leaked instance: Object:36908406321241314
Leaked instance: HBoxContainer:36908956077055203 - Node name: @HBoxContainer@17153
Leaked instance: Object:36909505832869092
Leaked instance: Label:36910055588682981 - Node name: @Label@17152
Leaked instance: Object:36910605344496870
Leaked instance: Control:36911155100310759 - Node name: @Control@17154
Leaked instance: Object:36911704856124648
Leaked instance: Button:36912254611938537 - Node name: @Button@17155
Leaked instance: Object:36912804367752426
Leaked instance: TextParagraph:-9186458682731209493
Leaked instance: Control:36913903879380204 - Node name: @Control@17156
Leaked instance: Object:36914453635194093
Leaked instance: ConfirmationDialog:36915003391007982 - Node name: 
Leaked instance: World2D:-9186456483707953937 - Resource path: 
Leaked instance: ViewportTexture:-9186454834440512272 - Resource path: 
Leaked instance: Object:36917752170077425
Leaked instance: Panel:36918301925891314 - Node name: @Panel@17157
Leaked instance: Object:36918851681705203
Leaked instance: HBoxContainer:36919401437519092 - Node name: @HBoxContainer@17159
Leaked instance: Object:36919951193332981
Leaked instance: Label:36920500949146870 - Node name: @Label@17158
Leaked instance: Object:36921050704960759
Leaked instance: Control:36921600460774648 - Node name: @Control@17160
Leaked instance: Object:36922150216588537
Leaked instance: Button:36922699972402426 - Node name: @Button@17161
Leaked instance: Object:36923249728216315
Leaked instance: TextParagraph:-9186448237370745604
Leaked instance: Control:36924349239844093 - Node name: @Control@17162
Leaked instance: Object:36924898995657982
Leaked instance: Button:36925448751471871 - Node name: @Button@17163
Leaked instance: Object:36925998507285760
Leaked instance: TextParagraph:-9186445488591676159
Leaked instance: Control:36927098018913538 - Node name: @Control@17164
Leaked instance: Object:36927647774727427
Leaked instance: TextLine:-9174431125034966658
Leaked instance: TextLine:-9174431674790780545
Leaked instance: TextLine:-9174430575279152768
Leaked instance: TextLine:-9174430025523338879
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: ... [lots of these]
StringName: 117 unclaimed string names at exit.

Steps to reproduce

Open an empty project in the editor. Using the Forward+ renderer, not sure if it matters. Then exit the editor.

Minimal reproduction project

Simply running mkdir repro && cd repro && touch project.godot is enough.

@Thomas-X
Copy link

Possible duplicate of #83247

@ttencate
Copy link
Contributor Author

I don't think it's a dupe. This one consistently happens, not only sometimes; it happens in the editor, rather than the running game; and it didn't happen in 4.1.2; and the types of leaked resources are different.

@raulsntos
Copy link
Member

It seems to be a regression from #82683. I unparented the dialogs and now they are not freed with the scene when exiting the editor.

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

Successfully merging a pull request may close this issue.

4 participants