godot
godot copied to clipboard
Memory leak and crash when creating custom shapes for ShapeCast
Tested versions
Reproducible in 4.3 stable and 4.2.2 stable
System information
Godot v4.3.stable - macOS 14.6.1 - GLES3 (Compatibility) - Apple M1 Pro - Apple M1 Pro (8 Threads)
Issue description
Attempting to create a Convex or Concave PolygonShape2D makes Godot freeze, until a memory error appears when reaching 86 GB of memory used for Godot, which keeps going up if the app is not forced to quit. This doesn't occur when selecting any of the premade shapes.
The only error I found on the logs that may be related are the following:
ERROR: 1 RID allocations of type 'P12GodotShape2D' were leaked at exit.
USER WARNING: 1 RID of type "CanvasItem" was leaked.
at: _free_rids (servers/rendering/renderer_canvas_cull.cpp:2483)
USER WARNING: ObjectDB instances leaked at exit (run with --verbose for details).
at: cleanup (core/object/object.cpp:2284)
USER ERROR: 1 resources still in use at exit (run with --verbose for details).
at: clear (core/io/resource.cpp:604)
Steps to reproduce
- Create a ShapeCast2D
- For the Shape field, click a Convex or Concave PolygonShape2D
I tested this on an empty project and was able to reproduce just as in my other projects
Minimal reproduction project (MRP)
N/A