godotengine / godot

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

gd4.3.beta1 animation_tree sub thread bug #93050

Open yythlj opened 3 weeks ago

yythlj commented 3 weeks ago

Tested versions

4.3.beta1

System information

windows10

Issue description

ERROR: Condition "!process_state->tree->property_parent_map[node_state.base_path].has(p_name)" is true. at: set_parameter (scene/animation/animation_tree.cpp:79) ERROR: Parameter "process_state" is null. at: set_parameter (scene/animation/animation_tree.cpp:74) ERROR: Parameter "process_state" is null. at: set_parameter (scene/animation/animation_tree.cpp:74) ERROR: Parameter "process_state" is null.

Steps to reproduce

func OpenWorld(nodeName, idx, data=null):
    var worldNew = widx_map[idx].instantiate()
    var newwindow = WorldWindow.new()
    newwindow.setWorldNode(worldNew)
    newwindow.set_embedding_subwindows(true)
    newwindow.set_flag(Window.FLAG_NO_FOCUS, true)
    newwindow.set_transient(true)
    newwindow.set_as_audio_listener_3d(false)
    newwindow.set_disable_input(true)
    newwindow.set_handle_input_locally(false)
    newwindow.set_name(nodeName)
    newwindow.set_world_3d(World3D.new())
    newwindow.set_process_thread_group(Node.PROCESS_THREAD_GROUP_SUB_THREAD)
    get_tree().get_root().add_child(newwindow)

#on WorldWindow
func _process(delta):
   Thread.set_thread_safety_checks_enabled(false)

func _physics_process(delta):
   Thread.set_thread_safety_checks_enabled(false)

Minimal reproduction project (MRP)

N/A

AThousandShips commented 3 weeks ago

How is this different from:

Please explain what makes this a separate bug

yythlj commented 3 weeks ago

the https://github.com/godotengine/godot/issues/93037 its can not go on first @AThousandShips and I use the Jolt plugin, which godot addons support multi thread physics call move_and_slide

and then can see this new bug on animation tree,maybe its same bug,I am not sure

yythlj commented 3 weeks ago

on the godot default physics engine, call move_and_slide will occur a different bug call process_body(!is_main_thread)

AThousandShips commented 3 weeks ago

and I use the Jolt plugin

Please remove any plugins when testing, or report bugs with the plugin to the plugin page, this is for bugs in the engine

For threading with physics you need to enable the threaded mode for physics

matheusmdx commented 3 weeks ago

This looks to be a duplicate of #92446