godotengine / godotengine/godot

AnimationPlayerEditor crashes sometimes when switching scene tabs

Open
#90,550 1 comment 2 reactions 0 assignees View on GitHub
bug crash topic:animation topic:editor
Dominant language
C++
Stars
117k
Forks
26.8k
PR merge metrics
PR metrics pending

Description

### Tested versions

Godot v4.3.dev (b2f425fe6)

### System information

Godot v4.3.dev (b2f425fe6) - Windows 10.0.22631 - Vulkan (Forward+) - dedicated NVIDIA GeForce RTX 3060 (NVIDIA; 31.0.15.1748) - 11th Gen Intel(R) Core(TM) i7-11700F @ 2.50GHz (16 Threads)

### Issue description

With this simple script, you can accidentally crash your editor:
```gdscript
@tool
extends AnimationPlayer

func _process(delta):
stop()
```
The editor will crash if the Animation editor view displays an animation from the AnimationPlayer node with the script, and the Scene view is selecting a different node then the AnimationPlayer node, if you switch to a different scene tab and back to the current.

### Steps to reproduce

* Open the provided scene
* Click on the AnimationPlayer node in the Scene view
* Click on the Node2D node in the Scene view
* Click the "Add a new scene" button next to the current scene's tab
* Click back to original the "Test" scene
* Editor crashes

### Minimal reproduction project (MRP)

[EditorAnimationPlayerCrash.zip](https://github.com/godotengine/godot/files/14951843/EditorAnimationPlayerCrash.zip)

Contributor guide

Open the contributing guide

Research direction

Start with the provided EditorAnimationPlayerCrash.zip and reproduce the crash using the listed scene-tab and node-selection steps. Trace the AnimationPlayer editor path involved when switching back to the Test scene; done means the editor no longer crashes in this scenario.

Written by the indexing model from the issue text.

Assessment

Tech stack
cpp
Domain
desktop, 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.