godotengine / godotengine/godot
[ShapeCast2d] Adding a ConvexPolygonShape2d causes Godot to crash
- Dominant language
- C++
- Stars
- 117k
- Forks
- 26.8k
- PR merge metrics
- PR metrics pending
Description
### Tested versions
- Reproducible in :
- Godot v4.2.1.stable - macOS 14.3.1 - Vulkan (Mobile) - integrated Apple M1 Pro - Apple M1 Pro (8 Threads)
- Godot v4.3.dev3 - macOS 14.3.1 - GLES3 (Compatibility) - Apple M1 Pro - Apple M1 Pro (8 Threads)
- Godot v4.1.3.stable - macOS 14.3.1 - Vulkan (Compatibility) - Apple M1 Pro - Apple M1 Pro (8 Threads)
### System information
Godot v4.2.1.stable - macOS 14.3.1 - Vulkan (Mobile) - integrated Apple M1 Pro - Apple M1 Pro (8 Threads)
### Issue description
When adding a ConvexPolygonShape2D or ConcavePolygonShape2D to any ShapeCast2d nodes, Godot freezes and then crash. This happens just after pressing the "New ConvexPolygonShape2d" as shown in the screenshot.
### Steps to reproduce
The reproduce: create a new empty project, create a root Node2d node and then add a ShapeCast2d as children. Select "ConvexPolygonShape2D" as the shape - Godot crashes freezes for 1-2min and then crashes.
### Minimal reproduction project (MRP)
[test.zip](https://github.com/godotengine/godot/files/14394260/test.zip)
Contributor guide
Research direction
Open the attached test.zip minimal reproduction, create the Node2D and ShapeCast2D setup described, and reproduce the freeze and crash when selecting ConvexPolygonShape2D or ConcavePolygonShape2D. Trace the ShapeCast2D shape-handling path from that reproduction and verify that both shape types can be added without freezing or crashing on the reported configurations.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- cpp
- Domain
- game-dev
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Active
- Clarity
- Mostly clear
- Newbie friendliness
- 48/100