When closing the build version of my project (on Windows, which is the OS I’m editing it on), the following errors appear in the Command line:
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:5758)
The errors have been there for quite some time now, so I don’t know after what change they appeared. The builds of any other project work fine and there are no errors when running from the editor. Do you know why they appear in the build or how I can fix them?
(When I run an export of the game with all the process functions removed and without a main menu, the errors don’t appear, so I think it can’t be directly because of the GUI scene or the program opening files)
I finally figured out what the problem was!
For some reason, whenever I set a custom mouse cursor (in any project), these leak errors appear in the exported executable.
I got rid of them by keeping the custom cursor but setting the mouse cursor to null when the program is closed (in my case, when a base node exits the tree).