godotengine / godotengine/godot
gd4.3.beta1 multi thread process mode bug
- Dominant language
- C++
- Stars
- 117k
- Forks
- 26.8k
- PR merge metrics
- PR metrics pending
Description
### Tested versions
4.3.beta1
### System information
windows 10
### Issue description
```
This function in this node (/root/1_10005) can only be accessed from the main thread. Use call_deferred() instead.
ERROR:ERROR:ERROR:ERROR:(scene/main/window.cpp:1286)
ERROR: at: at: This function in this node (/root/1_10008) can only be accessed from the main thread. Use call_deferred() instead.
This function in this node (/root/1_10000) can only be accessed from the main thread. Use call_deferred() instead.
ERROR:ERROR: at: This function in this node (/root/1_10001) can only be accessed from the main thread. Use call_deferred() instead.
(scene/main/window.cpp:1286)
at: (scene/main/window.cpp:1286)
This function in this node (/root/1_10007) can only be accessed from the main thread. Use call_deferred() instead.
This function in this node (/root/1_10002) can only be accessed from the main thread. Use call_deferred() instead.
(scene/main/window.cpp:1286)
at: This function in this node (/root/1_10014) can only be accessed from the main thread. Use call_deferred() instead.
at: This function in this node (/root/1_10016) can only be accessed from the main thread. Use call_deferred() instead.
at: (scene/main/window.cpp:1286)
(scene/main/window.cpp:1286)
at: (scene/main/window.cpp:1286)
at: This function in this node (/root/1_10015) can only be accessed from the main thread. Use call_deferred() instead.
(scene/main/window.cpp:1286)
This function in this node (/root/1_10012) can only be accessed from the main thread. Use call_deferred() instead.
(scene/main/window.cpp:1286)
at: (scene/main/viewport.cpp:507)
at: (scene/main/window.cpp:1286)
```
### Steps to reproduce
#open a new winodw as a child, and make it own world3d.And make it use PROCESS_THREAD_GROUP_SUB_THREAD
```gdscript
func OpenWorld(nodeName, idx, data=null):
var worldNew = widx_map[idx].instantiate()
var newwindow = WorldWindow.new()
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)
instance_map[nodeName] = newwindow
get_tree().get_root().add_child(newwindow)
worldNew.set_name(nodeName)
worldNew.hide()
worldNew.Init()
worldNew.SetGotoData(data)
newwindow.setWorldNode(worldNew)
```
### Minimal reproduction project (MRP)
#open a new winodw as a child, and make it own world3d.And make it use PROCESS_THREAD_GROUP_SUB_THREAD
# and can not call move_and_slide
Contributor guide
Assessment
This issue has not been assessed yet.