Godot version
v4.0.beta10.official
System information
Debian GNU/Linux 11 (bullseye), Intel Core i3-8130U CPU, Mesa Intel UHD Graphics 620 (KBL GT2)
Issue description
Memory leaks occur while using RenderingServer.create_local_rendering_device(). Moreover, the engine crashes after creating many local rendering devices (even if this is done in a scoped environment, see below). If rendering_device.free() is called, the following warning appears: drivers/vulkan/rendering_device_vulkan.cpp:8957 - 1 RID of type "<...>" was leaked., where <...> is any object, created with local rendering device (Shader, Texture, ...).
Steps to reproduce
The following code reproduces the bug:
extends Node
func _ready() -> void:
for step in range(199): # 199 times are enogh to crash the engine on my system.
create_lrd()
print(step)
func create_lrd() -> void:
var rd := RenderingServer.create_local_rendering_device()
# If something is done with rd here, it remains in memory even upon
# return from this function.
#rd.free() # No memory leaks occur, but Vulkan warnings are printed.
# this line also fixes crashes.
Minimal reproduction project
RDMemoryLeak.zip
Godot version
v4.0.beta10.official
System information
Debian GNU/Linux 11 (bullseye), Intel Core i3-8130U CPU, Mesa Intel UHD Graphics 620 (KBL GT2)
Issue description
Memory leaks occur while using
RenderingServer.create_local_rendering_device(). Moreover, the engine crashes after creating many local rendering devices (even if this is done in a scoped environment, see below). Ifrendering_device.free()is called, the following warning appears:drivers/vulkan/rendering_device_vulkan.cpp:8957 - 1 RID of type "<...>" was leaked., where<...>is any object, created with local rendering device (Shader, Texture, ...).Steps to reproduce
The following code reproduces the bug:
Minimal reproduction project
RDMemoryLeak.zip