godotengine / godotengine/godot

Crash when quickly dragging Sprite2Ds in the editor while holding Ctrl or Shift

Open
#94,294 0 comments 0 reactions 0 assignees View on GitHub
bug crash topic:2d topic:editor
Dominant language
C++
Stars
117k
Forks
26.8k
PR merge metrics
PR metrics pending

Description

### Tested versions

- Reproducible in: 4.1.3.stable, 4.2.2.stable, 4.3.beta 92c8e87cd

### System information

Godot v4.3.beta (92c8e87cd) - Fedora Linux 40 (KDE Plasma) - X11 - Vulkan (Forward+) - dedicated NVIDIA GeForce RTX 4090 (nvidia; 555.58.02) - 13th Gen Intel(R) Core(TM) i9-13900K (32 Threads)

### Issue description

The editor occasionally crashes when quickly dragging Sprite2Ds in the editor while holding Ctrl or Shift.

See the video below where I get it to crash:

https://github.com/user-attachments/assets/80db02cb-5239-40ba-9ddf-4a2ddc23875c

I've been able to reproduce this at least twice so far.

Backtrace:

```
handle_crash: Program crashed with signal 11
Engine version: Godot Engine v4.3.beta.custom_build (92c8e87cd987e8d55d176608c3038e9c4646cb2c)
Dumping the backtrace. Please include this when reporting the bug to the project developer.
[1] /lib64/libc.so.6(+0x40d00) [0x7f3be11edd00] (??:0)
[2] godot() [0x4e21c20] (/home/hugo/Documents/Git/godotengine/godot/core/variant/dictionary.cpp:111)
[3] godot() [0x3383919] (/home/hugo/Documents/Git/godotengine/godot/scene/2d/node_2d.cpp:47 (discriminator 1))
[4] godot() [0x33c3f43] (/home/hugo/Documents/Git/godotengine/godot/scene/2d/sprite_2d.cpp:44)
[5] godot() [0x1f57ee9] (/home/hugo/Documents/Git/godotengine/godot/./core/templates/list.h:71)
[6] godot() [0x1f70552] (/home/hugo/Documents/Git/godotengine/godot/editor/plugins/canvas_item_editor_plugin.cpp:2125)
[7] godot() [0x1f95658] (/home/hugo/Documents/Git/godotengine/godot/editor/plugins/canvas_item_editor_plugin.cpp:2656 (discriminator 1))
[8] godot() [0x1f9959d] (/home/hugo/Documents/Git/godotengine/godot/./core/object/ref_counted.h:209)
[9] godot() [0x5113082] (/home/hugo/Documents/Git/godotengine/godot/core/object/object.cpp:1188)
[10] godot() [0x2c61668] (/home/hugo/Documents/Git/godotengine/godot/./core/variant/variant.h:308)
[11] godot() [0x2b28ea1] (/home/hugo/Documents/Git/godotengine/godot/scene/main/viewport.cpp:1570 (discriminator 1))
[12] godot() [0x2b3bab1] (/home/hugo/Documents/Git/godotengine/godot/./core/object/ref_counted.h:223)
[13] godot() [0x2b51ef9] (/home/hugo/Documents/Git/godotengine/godot/./core/object/ref_counted.h:223)
[14] godot() [0x2ba283d] (/home/hugo/Documents/Git/godotengine/godot/./core/object/ref_counted.h:209)
[15] godot() [0x47ad30] (/home/hugo/Documents/Git/godotengine/godot/./core/variant/variant.h:308)
[16] godot() [0x4daa648] (/usr/include/c++/14/x86_64-redhat-linux/bits/gthr-default.h:762)
[17] godot() [0x4dadaac] (/home/hugo/Documents/Git/godotengine/godot/./core/object/ref_counted.h:209)
[18] godot() [0x4836fe] (/home/hugo/Documents/Git/godotengine/godot/./core/templates/local_vector.h:339)
[19] godot() [0x4572a0] (/home/hugo/Documents/Git/godotengine/godot/platform/linuxbsd/os_linuxbsd.cpp:960)
[20] godot() [0x4319a5] (/home/hugo/Documents/Git/godotengine/godot/platform/linuxbsd/godot_linuxbsd.cpp:85)
[21] /lib64/libc.so.6(+0x2a088) [0x7f3be11d7088] (??:0)
[22] /lib64/libc.so.6(__libc_start_main+0x8b) [0x7f3be11d714b] (??:0)
[23] godot() [0x454835] (??:?)
-- END OF BACKTRACE --
```

### Steps to reproduce

- Create a new 2D scene with a Sprite2D node under a root Node2D. Add a GradientTexture2D to the Sprite2D.
- Duplicate the Sprite2D a few times, then drag it around by holding down Ctrl, Shift or both. You'll need to do this randomly in quick succession a few times before getting a crash.

### Minimal reproduction project (MRP)

N/A

Contributor guide

Open the contributing guide

Research direction

Start with the reported backtrace locations in editor/plugins/canvas_item_editor_plugin.cpp, scene/2d/sprite_2d.cpp, scene/2d/node_2d.cpp, and core/variant/dictionary.cpp. Reproduce the crash using the listed Sprite2D, GradientTexture2D, duplication, and rapid Ctrl/Shift dragging steps; done means the editor no longer crashes during that interaction.

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
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.