godotengine / godotengine/godot
Crash when changing CanvasItemMaterial's Blend Mode in GPUParticles2D
- Dominant language
- C++
- Stars
- 117k
- Forks
- 26.8k
- PR merge metrics
- PR metrics pending
Description
### Tested versions
Reproducible in: 4.7-dev3, 4.6.2-stable.
### System information
Godot v4.7.dev3 - Windows 11 (build 26200) - Multi-window, 1 monitor - OpenGL 3 (Compatibility) - NVIDIA GeForce RTX 5060 Ti (NVIDIA; 32.0.15.9579) - AMD Ryzen 7 9800X3D 8-Core Processor (16 threads) - 31.11 GiB memory
### Issue description
Changing the Blend Mode property of a CanvasItemMaterial assigned to the GPUParticles2D node causes the Godot editor to crash.
The crash often occurs when changing the Blend Mode a couple of times (e.g. Mix -> Add -> Mix).
https://github.com/user-attachments/assets/e2013dd7-c154-44ad-9bbb-1e2903be5fb5
### Steps to reproduce
1. Open Minimal reproduction project.
2. Change the **Blend Mode** property of the **CanvasItemMaterial** from **Mix** to **Add** a couple of times.
3. Result: The editor crashes.
### Minimal reproduction project (MRP)
[Fire particles.zip](https://github.com/user-attachments/files/26458885/Fire.particles.zip)
Contributor guide
Research direction
Start with the attached Fire particles.zip minimal reproduction project and reproduce the crash by changing CanvasItemMaterial's Blend Mode on GPUParticles2D from Mix to Add repeatedly. Trace the editor path involved in that property change and verify that repeated Blend Mode changes no longer crash the editor on the reported setup.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- cpp
- Domain
- computer-graphics
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Quiet
- Clarity
- Mostly clear
- Newbie friendliness
- 48/100