godotengine / godot

Godot Engine – Multi-platform 2D and 3D game engine
https://godotengine.org
MIT License
86.47k stars 19.27k forks source link

[4.2] Unsaved BlendSpace2D crashes editor when changing to discrete mode #93924

Closed terminalmax closed 2 days ago

terminalmax commented 3 days ago

Tested versions

System information

Godot v4.2.2.stable - Windows 10.0.19045 - Vulkan (Forward+) - dedicated NVIDIA GeForce GTX 1070 (NVIDIA; 31.0.15.3623) - Intel(R) Core(TM) i5-6600K CPU @ 3.50GHz (4 Threads)

Issue description

Editor crashes when a new AnimationTree is added to the scene and the blend mode is changed to discrete. This happens if the scene tree is not saved after adding the AnimationTree (having a different scene with an animation tree working may alter behavior). On saving the scene tree or adding a point on the blend space, the issue resolves itself, for that particular scene. crash

Steps to reproduce

  1. Create Node2D root node (you may save the scene).
  2. Create AnimationTree child node (do not save the scene)
  3. Create new BlendSpace2D in the AnimationTree.
  4. Change the blend mode to discrete.

Note: Saving at different stages alters behavior. If a different scene has AnimationTree working, then this might not reproduce the crash.

Minimal reproduction project (MRP)

N/A (Project Independent)

TokageItLab commented 3 days ago

Fixed by https://github.com/godotengine/godot/pull/92636 in 4.3 (Needs to cherrypick)

akien-mga commented 2 days ago

Fixed for 4.2.3 by #93938 (already fixed in 4.3).