-
-
Notifications
You must be signed in to change notification settings - Fork 21.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix AnimationPlayer
crash when it's made the scene root
#94945
Fix AnimationPlayer
crash when it's made the scene root
#94945
Conversation
AnimationPlayer
crashing godot when it's made the scene root
As I wrote in #91043 (comment), I can't actually reproduce the crash of issue #91043. Can you raise a video or something that reproduces the occurrence of the crash? As the this PR change is understandable, so for approving, we need to actually see the crash reproduced and if this PR fix it. |
AnimationPlayer
crashing godot when it's made the scene rootAnimationPlayer
crashing when it's made the scene root
AnimationPlayer
crashing when it's made the scene rootAnimationPlayer
crash when it's made the scene root
When an AnimationPlayer is made root of a scene, the track links may become broken and clicking on them will crash. Current master branch also breaks node links when AnimationPlayer is made scene root, and can also crash the engine if another node was made scene root prior to the AnimationPlayer. This happens because when made root, the editor loses track of AnimPlayer's root node. By keeping a copy of the AnimPlayer's root_node, the track links remain functional. Fixes godotengine#91043.
0e53572
to
e905be8
Compare
I updated the PR branch to squash the commits and tweaked the commit message a bit. Should be ready to merge once CI passes. |
Thanks! |
Cherry-picked for 4.3.1. |
When an AnimationPlayer node is made the root of a scene, the node links on the Animation Track can become broken and clicking on them will crash Godot 4.2.2-stable. The current master branch also breaks the node links when AnimationPlayer is made scene root, and can also crash the engine if another node was made the scene root prior to the AnimationPlayer (See Issue #91043)
This happens because when made root, the editor loses track of AnimationPlayer's
root_node
. By keeping a cached pointer to theroot_node
, the track links can remain functional.Fixes Crash in 4.2.2-stable and Fixes Broken Node Links and Potential Crash in current master branch.