Open Mantissa-23 opened 10 months ago
I guess this is a bug related to the GraphNode rework since this bug might appeared at a time unrelated to the animation rework. It would be helpful if you could bisect.
cc @Geometror
I guess this is a bug related to the GraphNode rework since this bug might appeared at a time unrelated to the animation rework.
GUI code must be called from the main thread. You should check if any methods of the animation editor are calling methods of GUI nodes, especially related to tree manipulation, from a sub-thread. I don't think there is any threading in GraphEdit so it shouldn't be the cause of the issue.
I believe I'm encountering the same bug. Version 4.2.1 stable. My project also uses BlendSpace2D as mentioned.
I'm not sure if this is the same bug or a different, but related bug..
I'm getting the following error 3 times any time I save a change to my code while my animation tree is open. I don't have any blend trees, just an animation state machine with a nested animation state machine and a few animation nodes.
This function in this node (/root/@EditorNode@17120/@Panel@13/@VBoxContainer@14/@HSplitContainer@17/@HSplitContainer@25/@HSplitContainer@33/@VBoxContainer@34/@VSplitContainer@36/@PanelContainer@6819/@VBoxContainer@6820/@AnimationTreeEditor@12462) can only be accessed from either the main thread or a thread group. Use call_deferred() instead.
Edit: Further testing revealed that moving all the animations into the root state machine and deleting the nested one eliminated the error.
Edit 2: Never mind.. the errors are back. I'm not sure why..
If I close the editor when a scene with an animation tree in it is open, when opening the project again I get a number of errors as per
This function in this node (/root/@EditorNode@17120/@Panel@13/@VBoxContainer@14/@HSplitContainer@17/@HSplitContainer@25/@HSplitContainer@33/@VBoxContainer@34/@VSplitContainer@36/@PanelContainer@6819/@VBoxContainer@6820/@AnimationTreeEditor@12462) can only be accessed from either the main thread or a thread group. Use call_deferred() instead.
If the scene isn't the highlighted/open scene then the errors don't occur, and if I switch to that scene then no errors are reported.
I'm getting the same behaviour on 4.2.1 and 4.2.2. Whenever I open my project with an AnimationTree in it I get 15 of these error messages. My tree has a state machine and 2 BlendSpace2D in it.
change [Callback Mode]-->[Method]-->Immediate. revise back。
@MicroGame0 I tried changing the setting to Immediate just in case that's what you meant, errors were still reported so changed back to deferred. My guess is that the blendspace code in the background isn't following the instruction.
Not sure if people are still having issue with this - very likely - but I just stumbled across this very same problem and it turns out I had both an AnimationPlayer node and an AnimationTree node, this one using said AnimationPlayer node, with the property active
on. Turning off the AnimationPlayer node active
property did the trick.
The error printed in the terminal seems very misleading and should be looked upon by the developers, assuming that is indeed the root of the problem.
@Fichberg Unchecking active on the AnimationPlayer node solved the issue for me too. Thanks!
I have the same error but in my case it seems Blend2 causes the issue. eg. blendSpace2D -> Output (this works) blendSpace2D -> Blend2 -> Output (blendSpace2D no longer works) godot 4.3 window10
Godot version
4.2.rc2.mono
System information
Godot v4.2.rc2.mono - Windows 10.0.19045 - Vulkan (Forward+) - dedicated NVIDIA GeForce RTX 3080 (NVIDIA; 31.0.15.3734) - AMD Ryzen 9 5900X 12-Core Processor (24 Threads)
Issue description
The following error is output to the console when performing the below reproduction steps:
The error will print 32 times on my machine per created point on my machine.
Steps to reproduce
Assuming the provided MRP:
res://Games/Kinship/Characters/HumanoidBase.tscn
Minimal reproduction project
AnimationTreeErrorReproduction.zip