godotengine / godot

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

The custom mouse image set in the project prompts a memory leak when the game exits. #98806

Open snail-slow-development opened 1 day ago

snail-slow-development commented 1 day ago

Tested versions

The custom mouse image set in the project prompts a memory leak when the game exits, and can be reproduced in the following versions. v4.2.1.stable.official [b09f793f5] v4.3.stable.official [77dcf97d8] v4.4.dev3.official [f4af8201b]

System information

Windows 11 - Godot v4.3.stable.official [77dcf97d8] (Forward+)

Issue description

The following content is translated by machine translation. My English is not very good, so I apologize here and hope you can understand. When I set the mouse image in the project settings, and during the game, I click the close button of the window or use get_tree().quit(), the following error appears in the Console:

ERROR: 1 RID allocations of type 'N10RendererRD14TextureStorage7TextureE' were leaked at exit. ERROR: Parameter "RenderingServer::get_singleton()" is null. at: ~CompressedTexture2D (scene/resources/compressed_texture.cpp:464) WARNING: 2 RIDs of type "Texture" were leaked. at: finalize (servers/rendering/rendering_device.cpp:5829)

The project in which I reproduced this error is an empty project, and the mouse texture uses the built-in default icon.svg. I am not a professional developer. After I removed the custom content for the mouse image, the error no longer appeared.I don't know how to solve this problem.

Steps to reproduce

Set a custom mouse image in the project settings, then run the game, and exit through the window's close button or by using the get_tree().quit() function.

Minimal reproduction project (MRP)

“N/A”

matheusmdx commented 17 hours ago

I wasn't able to reproduce the issue

Godot v4.3.stable - Windows 10.0.19045 - Vulkan (Forward+) - dedicated AMD Radeon RX 580 2048SP (Advanced Micro Devices, Inc.; 31.0.21921.1000) - AMD Ryzen 5 3600 6-Core Processor (12 Threads)