Closed Ughuuu closed 1 year ago
cc @Ark2000
Does this occur with version 1.0.0 of this add-on? See https://github.com/godot-extended-libraries/godot-debug-menu/pull/1 which moved some computations to a thread.
I can also replicate the issue in v4.1.dev4.official [5c2295ff5] and 1.1.0 of this plugin. When I move the mentioned computations from the thread back to the _ready
function to be called directly there then there are no errors produced.
Still reproducible as of 3aaa78709 with version 1.1.1 of the add-on/demo:
ERROR: This function in this node (/root) can only be accessed from either the main thread or a thread group. Use call_deferred() instead.
at: get_viewport_rid (scene/main/viewport.cpp:913)
ERROR: Condition "!viewport" is true.
at: viewport_set_measure_render_time (servers/rendering/renderer_viewport.cpp:1253)
ERROR: This function in this node (/root/DebugMenu/DebugMenu/VBoxContainer/Information) can only be accessed from either the main thread or a thread group. Use call_deferred() instead.
at: is_auto_translating (scene/gui/control.cpp:3047)
ERROR: Caller thread can't call this function in this node (/root/DebugMenu/DebugMenu/VBoxContainer/Information). Use call_deferred() or call_thread_group() instead.
at: queue_redraw (scene/main/canvas_item.cpp:394)
ERROR: This function in this node (/root/DebugMenu/DebugMenu/VBoxContainer/Information) can only be accessed from the main thread. Use call_deferred() instead.
at: update_minimum_size (scene/gui/control.cpp:1597)
ERROR: Caller thread can't call this function in this node (/root/DebugMenu/DebugMenu/VBoxContainer/Information). Use call_deferred() or call_thread_group() instead.
at: update_configuration_warnings (scene/main/node.cpp:3045)
ERROR: This function in this node (/root/DebugMenu/DebugMenu/VBoxContainer/Settings) can only be accessed from either the main thread or a thread group. Use call_deferred() instead.
at: is_auto_translating (scene/gui/control.cpp:3047)
ERROR: Caller thread can't call this function in this node (/root/DebugMenu/DebugMenu/VBoxContainer/Settings). Use call_deferred() or call_thread_group() instead.
at: queue_redraw (scene/main/canvas_item.cpp:394)
ERROR: This function in this node (/root/DebugMenu/DebugMenu/VBoxContainer/Settings) can only be accessed from the main thread. Use call_deferred() instead.
at: update_minimum_size (scene/gui/control.cpp:1597)
ERROR: Caller thread can't call this function in this node (/root/DebugMenu/DebugMenu/VBoxContainer/Settings). Use call_deferred() or call_thread_group() instead.
at: update_configuration_warnings (scene/main/node.cpp:3045)
ERROR: This function in this node (/root/DebugMenu/DebugMenu/VBoxContainer/Settings) can only be accessed from either the main thread or a thread group. Use call_deferred() instead.
at: is_auto_translating (scene/gui/control.cpp:3047)
ERROR: Caller thread can't call this function in this node (/root/DebugMenu/DebugMenu/VBoxContainer/Settings). Use call_deferred() or call_thread_group() instead.
at: queue_redraw (scene/main/canvas_item.cpp:394)
ERROR: This function in this node (/root/DebugMenu/DebugMenu/VBoxContainer/Settings) can only be accessed from the main thread. Use call_deferred() instead.
at: update_minimum_size (scene/gui/control.cpp:1597)
ERROR: Caller thread can't call this function in this node (/root/DebugMenu/DebugMenu/VBoxContainer/Settings). Use call_deferred() or call_thread_group() instead.
at: update_configuration_warnings (scene/main/node.cpp:3045)
ERROR: This function in this node (/root/DebugMenu/DebugMenu/VBoxContainer/Settings) can only be accessed from either the main thread or a thread group. Use call_deferred() instead.
at: is_auto_translating (scene/gui/control.cpp:3047)
ERROR: Caller thread can't call this function in this node (/root/DebugMenu/DebugMenu/VBoxContainer/Settings). Use call_deferred() or call_thread_group() instead.
at: queue_redraw (scene/main/canvas_item.cpp:394)
ERROR: This function in this node (/root/DebugMenu/DebugMenu/VBoxContainer/Settings) can only be accessed from the main thread. Use call_deferred() instead.
at: update_minimum_size (scene/gui/control.cpp:1597)
ERROR: Caller thread can't call this function in this node (/root/DebugMenu/DebugMenu/VBoxContainer/Settings). Use call_deferred() or call_thread_group() instead.
at: update_configuration_warnings (scene/main/node.cpp:3045)
ERROR: This function in this node (/root) can only be accessed from either the main thread or a thread group. Use call_deferred() instead.
at: get_content_scale_mode (scene/main/window.cpp:1309)
ERROR: This function in this node (/root) can only be accessed from either the main thread or a thread group. Use call_deferred() instead.
at: get_size (scene/main/window.cpp:353)
ERROR: This function in this node (/root) can only be accessed from either the main thread or a thread group. Use call_deferred() instead.
at: get_size (scene/main/window.cpp:353)
ERROR: This function in this node (/root) can only be accessed from either the main thread or a thread group. Use call_deferred() instead.
at: get_size (scene/main/window.cpp:353)
ERROR: This function in this node (/root/DebugMenu/DebugMenu/VBoxContainer/Settings) can only be accessed from either the main thread or a thread group. Use call_deferred() instead.
at: is_auto_translating (scene/gui/control.cpp:3047)
ERROR: Caller thread can't call this function in this node (/root/DebugMenu/DebugMenu/VBoxContainer/Settings). Use call_deferred() or call_thread_group() instead.
at: queue_redraw (scene/main/canvas_item.cpp:394)
ERROR: This function in this node (/root/DebugMenu/DebugMenu/VBoxContainer/Settings) can only be accessed from the main thread. Use call_deferred() instead.
at: update_minimum_size (scene/gui/control.cpp:1597)
ERROR: Caller thread can't call this function in this node (/root/DebugMenu/DebugMenu/VBoxContainer/Settings). Use call_deferred() or call_thread_group() instead.
at: update_configuration_warnings (scene/main/node.cpp:3045)
ERROR: This function in this node (/root) can only be accessed from either the main thread or a thread group. Use call_deferred() instead.
at: get_camera_3d (scene/main/viewport.cpp:3668)
ERROR: This function in this node (/root) can only be accessed from either the main thread or a thread group. Use call_deferred() instead.
at: get_msaa_2d (scene/main/viewport.cpp:3159)
Fixed by https://github.com/godot-extended-libraries/godot-debug-menu/commit/e73e8371dc0fed4308b0d7ffb4ba3900da0a93ab, which is designed to be backwards-compatible with 4.0.x.
About 25 errors similar to this one.