Open gelvinp opened 1 year ago
Beta8 animations and Beta7 animations can be converted (there is no converter yet), but are not directly compatible.
This is a known problem as commented in https://github.com/godotengine/godot/pull/69627#issuecomment-1339108241, caused by animations that use CaptureMode or TriggerMode. If you find an "update_mode" entry in the tscn or tres file, rewrite it as 3->2, 2->1, to solve the problem as temporary workaround.
e.g.
"times": PackedFloat32Array(1),
"transitions": PackedFloat32Array(1),
"update": 3,
"values": [Vector3(0, 1.5708, 0)]
↓
"times": PackedFloat32Array(1),
"transitions": PackedFloat32Array(1),
"update": 2,
"values": [Vector3(0, 1.5708, 0)]
I think I can reproduce this in the TPS demo. I got the crash in RC 1 and then I reproduced with debug symbols in 929ee61170ec4d431d6d2cfeddccdec2a59a11b7
================================================================
handle_crash: Program crashed with signal 11
Engine version: Godot Engine v4.0.rc.custom_build (929ee61170ec4d431d6d2cfeddccdec2a59a11b7)
Dumping the backtrace. Please include this when reporting the bug to the project developer.
[1] /lib/x86_64-linux-gnu/libc.so.6(+0x42520) [0x7fcb45242520] (??:0)
[2] RefCounted::reference() (/usr/bin/../lib/gcc/x86_64-linux-gnu/12/../../../../include/c++/12/bits/atomic_base.h:488)
[3] Ref<Texture2D>::ref(Ref<Texture2D> const&) (/home/clayjohn/dev/godot/./core/object/ref_counted.h:71)
[4] Ref<Texture2D>::Ref(Ref<Texture2D> const&) (/home/clayjohn/dev/godot/./core/object/ref_counted.h:178)
[5] AnimationTrackEdit::_notification(int) (/home/clayjohn/dev/godot/editor/animation_track_editor.cpp:1980)
[6] AnimationTrackEdit::_notificationv(int, bool) (/home/clayjohn/dev/godot/./editor/animation_track_editor.h:206)
[7] Object::notification(int, bool) (/home/clayjohn/dev/godot/core/object/object.cpp:790)
[8] CanvasItem::_redraw_callback() (/home/clayjohn/dev/godot/scene/main/canvas_item.cpp:135)
[9] void call_with_variant_args_helper<CanvasItem>(CanvasItem*, void (CanvasItem::*)(), Variant const**, Callable::CallError&, IndexSequence<>) (/home/clayjohn/dev/godot/./core/variant/binder_common.h:298)
[10] void call_with_variant_args<CanvasItem>(CanvasItem*, void (CanvasItem::*)(), Variant const**, int, Callable::CallError&) (/home/clayjohn/dev/godot/./core/variant/binder_common.h:408)
[11] CallableCustomMethodPointer<CanvasItem>::call(Variant const**, int, Variant&, Callable::CallError&) const (/home/clayjohn/dev/godot/./core/object/callable_method_pointer.h:105)
[12] Callable::callp(Variant const**, int, Variant&, Callable::CallError&) const (/home/clayjohn/dev/godot/core/variant/callable.cpp:51)
[13] MessageQueue::_call_function(Callable const&, Variant const*, int, bool) (/home/clayjohn/dev/godot/core/object/message_queue.cpp:229)
[14] MessageQueue::flush() (/home/clayjohn/dev/godot/core/object/message_queue.cpp:277)
[15] SceneTree::physics_process(double) (/home/clayjohn/dev/godot/scene/main/scene_tree.cpp:430)
[16] Main::iteration() (/home/clayjohn/dev/godot/main/main.cpp:3093)
[17] OS_LinuxBSD::run() (/home/clayjohn/dev/godot/platform/linuxbsd/os_linuxbsd.cpp:880)
[18] /home/clayjohn/dev/godot/bin/godot.linuxbsd.editor.dev.x86_64.llvm(main+0x1fe) [0x557a0187d82e] (/home/clayjohn/dev/godot/platform/linuxbsd/godot_linuxbsd.cpp:73)
[19] /lib/x86_64-linux-gnu/libc.so.6(+0x29d90) [0x7fcb45229d90] (??:0)
[20] /lib/x86_64-linux-gnu/libc.so.6(__libc_start_main+0x80) [0x7fcb45229e40] (??:0)
[21] /home/clayjohn/dev/godot/bin/godot.linuxbsd.editor.dev.x86_64.llvm(_start+0x25) [0x557a0187d565] (??:?)
-- END OF BACKTRACE --
================================================================
I have no idea how to convert that option since we can't tell the difference between the past enum and the new one. I suppose we could clamp it in a setter, but that would cause problems if another enum is added in the future.
I think it is possible if we get an explicit project version and clamp it, but that should not be done in the setter, we need to add the functionality to the converter. Is there any way to do this (e.g. detecting older than beta.7 -> newer beta.8)?
update
I can confirm your workaround in the previous comment works. In this case I reduced "capture" from 3 to 2.
I don't know enough about the converter to know if it can rename enums inside of resources like that.
@qarmin Do you have any ideas? I guess the core of this issue is opening an Animation player containing an Animation track with an "update" mode set to an invalid enum
Godot version
4.0 beta 8 official
System information
Windows 10
Issue description
I noticed when running my game with beta 8, that some (not all) of my animations were not playing. The nodes in question would stay put for the duration of the animation, and then snap to the correct position at the end. Trying to debug this, I opened the animation editor in Godot which immediately crashed.
Behavior in beta 7: https://user-images.githubusercontent.com/61520531/206849470-d94b0933-6662-403a-a06c-a8e6e7407c49.mp4 https://user-images.githubusercontent.com/61520531/206840038-dcbb4db9-7de9-4050-828e-baf56f2343e5.mp4
Behavior in beta 8: https://user-images.githubusercontent.com/61520531/206849475-33d81af5-6534-4bd3-a7b8-3b25f6ebe544.mp4 https://user-images.githubusercontent.com/61520531/206840042-21a9816f-c663-47fc-84f8-f5b86eb0dea0.mp4
The crash happens with no log messages to the console, even in verbose mode. Having seen similar behavior before I then ran the beta 8 editor with ASAN enabled, and got this when clicking on the AnimationPlayer node:
I've git bisected between the commits for beta 7 and beta 8, and found 83135aa122dcd1a260830767b119b33984364838 to be the commit that introduced the regression. However, this is based on the animations playing in game, as I was unable to reproduce the crash when building the editor myself. Even building the same commit that the official beta 8 build was based off on only crashed when building with ASAN, whereas the official build (as seen in the video above) does reliably crash every time.
Steps to reproduce
I'm not sure what specifically is causing the crash, I've only noticed this behavior with one of the animation players in my game, thus I am not sure how to reproduce.
Minimal reproduction project
Here's a project that just has a copy of the scene with everything besides the offending AnimationPlayer removed. If you open this project in the official build, open Bridge.tscn, and double click the animation player to edit it, it should crash. AnimationCrash.zip