Godot Version
Godot 4.4.1.stable.mono
Question
Hi all, I’ve been getting this weird error message which I’ve had some trouble deciphering:
E 0:00:04:524 NativeCalls.cs:7293 @ void Godot.NativeCalls.godot_icall_3_828(nint, nint, nint, Godot.NativeInterop.godot_bool, int): Node not found: "../../root/@EditorNode@21301/@Panel@14/@VBoxContainer@15/DockHSplitLeftL/DockHSplitLeftR/DockHSplitMain/@VBoxContainer@26/DockVSplitCenter/@VSplitContainer@54/@VBoxContainer@55/@EditorMainScreen@102/MainScreen/@CanvasItemEditor@11482/@VSplitContainer@11134/@HSplitContainer@11136/@HSplitContainer@11138/@Control@11139/@SubViewportContainer@11140/@SubViewport@11141/gold_storage" (relative to "/root/TestScene/Grid/gold_storage/Node3D/MeshInstance3D").
<C++ Error> Method/function failed. Returning: nullptr
<C++ Source> scene/main/node.cpp:1877 @ get_node()
<Stack Trace> NativeCalls.cs:7293 @ void Godot.NativeCalls.godot_icall_3_828(nint, nint, nint, Godot.NativeInterop.godot_bool, int)
Node.cs:793 @ void Godot.Node.AddChild(Godot.Node, bool, Godot.Node+InternalMode)
Grid.cs:42 @ void AstraeSoftware.TownDefence.Core.Grid.PlaceBuilding(Godot.Vector2I, AstraeSoftware.TownDefence.Core.Building)
TurnManager.cs:51 @ void AstraeSoftware.TownDefence.Core.TurnManager._placeBuilding(AstraeSoftware.TownDefence.Core.BuildingInfo, Godot.Vector2I)
TurnManager.cs:83 @ bool AstraeSoftware.TownDefence.Core.TurnManager._tryPlace(AstraeSoftware.TownDefence.Core.BuildingInfo)
TurnManager.cs:174 @ void AstraeSoftware.TownDefence.Core.TurnManager._Process(double)
Node.cs:2540 @ bool Godot.Node.InvokeGodotClassMethod(Godot.NativeInterop.godot_string_name&, Godot.NativeInterop.NativeVariantPtrArgs, Godot.NativeInterop.godot_variant&)
AstraeSoftware.TownDefence.Core.TurnManager_ScriptMethods.generated.cs:100 @ bool AstraeSoftware.TownDefence.Core.TurnManager.InvokeGodotClassMethod(Godot.NativeInterop.godot_string_name&, Godot.NativeInterop.NativeVariantPtrArgs, Godot.NativeInterop.godot_variant&)
CSharpInstanceBridge.cs:24 @ Godot.NativeInterop.godot_bool Godot.Bridge.CSharpInstanceBridge.Call(nint, Godot.NativeInterop.godot_string_name*, Godot.NativeInterop.godot_variant**, int, Godot.NativeInterop.godot_variant_call_error*, Godot.NativeInterop.godot_variant*)
All of my code is working as intended, and nothing in the game is going wrong at all, so I’m not sure why I’m getting this.
Line 42 of Grid.cs is:
public void PlaceBuilding(Vector2I position, Building building)
{
building.Position = _getBuildingMeshPosition(position, building.Size);
AddChild(building); // line 42
// Register building in grid - probably irrelevant to the error
Vector2I[] cells = GridState.GetCellsInArea(position, building.Size);
foreach (Vector2I cell in cells)
{
GridState[cell.X, cell.Y] = building;
}
// adds to list of buildings
Buildings.Add(building);
building._OnPlaced();
}
Which in turn is called from:
private void _placeBuilding(BuildingInfo building, Vector2I gpos)
{
Building scene = building.Scene.Instantiate<Building>(); // building.Scene is of type PackedScene
Grid.Instance.PlaceBuilding(gpos, scene); // line 51
}
I can’t think of anything else that would be relevant here, but do let me know if you need more information.
Any and all help is appreciated, thank you<3

