I had this error pop up randomly and I’m not quite sure where it’s coming from. I am using the 4.3 beta version so I’m assuming it has something to do with that. I just haven’t seen any mention of others running into this error and it only just appeared this morning after a few weeks of using this version.
E 0:00:01:0230 instantiate: Condition "!valid" is true. Continuing.
<C++ Source> scene/resources/packed_scene.cpp:534 @ instantiate()
I get this error three times in sequential order at the start of the scene. I’ve tried removing all scenes in the played scene that is even remotely responsible of instantiating any of my own assets, but the error persists. It doesn’t appear to be breaking anything, so while it isn’t “mission critical” to have this solved ASAP, it is a little annoying seeing it constantly appear each time I run a scene. Just curious if anyone has run into this particular issue.
Here’s a snippet of some code instantiating some inventory slots for the player. Initialized() is called on ready. All other code involved with instantiating follows the same pattern.
using Godot;
using Godot.Collections;
using System;
public partial class ActiveInventoryDialog : Control
{
[Export] private GridContainer gridContainer;
[Export] private PackedScene InventorySlot;
private Array<inventory_slot> activeSlots = new();
public override void _EnterTree()
{
SetVisibility(false);
Connect(SignalName.InvToPlayerUpdate, new Callable(RootUI.Instance, RootUI.MethodName.UpdatePlayerInventory));
RootUI.Instance.Connect(RootUI.SignalName.AddItemToActiveInventory, new Callable(this, MethodName.AddItem));
RootUI.Instance.Connect(RootUI.SignalName.InitializeActiveInventory, new Callable(this, MethodName.Initialize));
RootUI.Instance.Connect(RootUI.SignalName.ToggleActiveInventoryUI, new Callable(this, MethodName.ToggleActiveInventoryDialog));
}
internal void Initialize(int index)
{
//Initialize active pocket inventory of the player based on the player's active inventory size
//Will create number of pockets based on the index passed into the initialization method
for(int i = 0; i < index; i++)
{
inventory_slot newSlot = InventorySlot.Instantiate<inventory_slot>();
newSlot.itemSlotType = inventory_slot.ItemSlotType.GENERAL;
activeSlots.Add(newSlot);
gridContainer.AddChild(newSlot);
newSlot.Connect(inventory_slot.SignalName.InventorySlotsUpdate, new Callable(this, MethodName.UpdateActiveInventory));
newSlot.Connect(inventory_slot.SignalName.InventorySlotSelected, new Callable(this, MethodName.GetSlot));
}
}
}
That is an error caused by having a corrupted NodePath or property export in your loaded scene.
Commonly caused by using export NodePaths or export properties in scripts or animations that point to something that does no exist on scene load or a path that is corrupted in the first place because whatever was targeted got deleted or renamed without the property or path updating.
Basically that function tries to replace the property path with the actual object behind that path after having done the other steps of the scene load and that path resolution fails and triggers this error (the dnp.base->get() tries to get the property from the node and fails).
That did it! What Smix suggested lead me down the correct path.
Essentially, I had a deprecated version of a UI scene buried in some containers on my test scene. I had been editing some code earlier that the old UI was communicating with, and that’s when the errors started appearing. I had thought I removed the old UI already so I didn’t think to check it. In any case, after I got rid of it the errors disappeared! All of this basically means I need to have better Node organization in my scene
Thank you both so much for taking the time to look into this! I would’ve just brushed this off since it wasn’t affecting anything at the time, but I’m super happy that I get to keep a clean debugger log. You guys are the best!