godot icon indicating copy to clipboard operation
godot copied to clipboard

AnimationPlayer RootNode null crash

Open therabug opened this issue 10 months ago • 2 comments

Tested versions

-4.2.2.stable

System information

Godot v4.2.2.stable - Windows 10.0.22631 - Vulkan (Mobile) - dedicated NVIDIA GeForce GT 1030 (NVIDIA; 31.0.15.5161) - AMD Ryzen 3 1300X Quad-Core Processor (4 Threads)

Issue description

If you add a property track or idk any track and change the root node of scene and click this thing image godot will crash. (sorry for bad english lol)

Steps to reproduce

-Create a scene -Add a node and a animationplayer -Add a key to animationplayer that is on root node -Change the root node and click that thing on the image in description

Minimal reproduction project (MRP)

project.zip

therabug avatar Apr 23 '24 08:04 therabug

Although the above MRP works, I couldn't reproduce the crash using those exact steps but was able reproduce it in a4fbe4c (4.3) by:

  1. Create a scene
  2. Add a root node and an AnimationPlayer to that node
  3. Add a track to the AnimationPlayer and chose the root node to animate
  4. Add a node as a child of the root node
  5. Make the new node the root node of the scene
  6. Make both the original root node and AnimationPlayer direct children (siblings) of the root node
  7. Set the AnimationPlayer to be the root node

This results in that text that crashes the engine on click (as described in the original issue) to display "." (It's path in the scene) and also crash Godot when clicked. The inspector will display the AnimationMixer root node as being "../Node3D".

The stack trace when running in console mode is also seemingly useless, only displaying "couldn't map PC to fn name" 15 times in a row.

Dannode36 avatar Apr 24 '24 11:04 Dannode36

Although the above MRP works, I couldn't reproduce the crash using those exact steps but was able reproduce it in a4fbe4c (4.3) by:

  1. Create a scene
  2. Add a root node and an AnimationPlayer to that node
  3. Add a track to the AnimationPlayer and chose the root node to animate
  4. Add a node as a child of the root node
  5. Make the new node the root node of the scene
  6. Make both the original root node and AnimationPlayer direct children (siblings) of the root node
  7. Set the AnimationPlayer to be the root node

This results in that text that crashes the engine on click (as described in the original issue) to display "." (It's path in the scene) and also crash Godot when clicked. The inspector will display the AnimationMixer root node as being "../Node3D".

The stack trace when running in console mode is also seemingly useless, only displaying "couldn't map PC to fn name" 15 times in a row.

oh maybe it is changed in 4.3

therabug avatar Apr 24 '24 14:04 therabug

@NotRabug50 @Dannode36 I can't reproduce the crash of the issue even after doing as described in the comments, can you put up a video that shows the steps that cause the crash?

TokageItLab avatar Aug 31 '24 21:08 TokageItLab

Here is a video showing the crash in the current master branch [61598c5c88d95b96811d386cb20d714c35f4c6d7]. I did the exact steps described by @Dannode36 in the comments of the issue.

AnimPlayer Master Crash.webm


Here is the video that shows this PR's behaviour when the same steps are performed.

AnimPlayer Master Fixed.webm

The PR also fixes the issue for 4.2.2 where the reproduction steps are to simply make the AnimationPlayer node the scene root. I can add a video for this as well if you'd like.

ArshPanesar avatar Sep 01 '24 19:09 ArshPanesar