Create a Mesh for a CSGMesh3D will trigger caller thread can't call this function in this node
#86381
Labels
Milestone
caller thread can't call this function in this node
#86381
Tested versions
Godot v4.3.dev (3ce73e5)
System information
Windows 10.0.19045 - Vulkan (Forward+) - dedicated NVIDIA GeForce RTX 3060 (NVIDIA; 31.0.15.3619) - 11th Gen Intel(R) Core(TM) i7-11700K @ 3.60GHz (16 Threads)
Issue description
When debugging #86356, I noticed that sometimes when I use the mesh droplist of CSGMesh3d node to assign a new PrismMesh, It will give this error:
Caller thread can't call this function in this node (/root/@EditorNode@17141/@Panel@13/@VBoxContainer@14/@HSplitContainer@17/@HSplitContainer@25/@HSplitContainer@33/@VBoxContainer@34/@VSplitContainer@36/@VSplitContainer@62/@VBoxContainer@63/@PanelContainer@110/MainScreen/@CanvasItemEditor@9463/@VSplitContainer@9282/@HSplitContainer@9284/@HSplitContainer@9286/@Control@9287/@SubViewportContainer@9288/@SubViewport@9289/3d/CSGMesh3D). Use call_deferred() or call_thread_group() instead.
I know it's only printed out when
DEBUG_ENABLED
, but better needs some consideration.I did some quick test, it seems all mesh types that has a concrete shape will lead to this error (box, cylinder,quad,torus...), while arrayMesh or placeholderMesh will not trigger this error. Also after some operation, it seems the error will not be triggered everytime I set mesh.
Steps to reproduce
Minimal reproduction project (MRP)
N/A
The text was updated successfully, but these errors were encountered: