stride3d/stride · error · InvalidOperationException
Cannot find an identifier matching the index in the base…
Error message
Cannot find an identifier matching the index in the base collection
What it means
Thrown while reconciling an overridden collection with its base asset during property-graph diffing: an item identifier coming from the base collection could not be resolved to an index via IdToIndex, meaning the derived collection references an identifier that no longer exists in the base. Signals that base and derived assets have diverged (base was restructured or ids changed).
Solutions
- Re-apply the override on the derived asset so it is rebuilt against the current base collection
- Reload/refresh the base asset so both sides see the same identifiers
- If the base asset was intentionally changed, clear stale entries from the derived collection override
Defensive patterns
Strategy: validation
When it happens
Trigger: Thrown at sources/assets/Stride.Core.Assets.Quantum/AssetPropertyGraph.cs:905 when the library encounters an invalid state.
Common situations: See trigger scenarios.
AI-assisted analysis of stride3d/stride@96fad776d2 (2026-09-14).
Data as JSON: /api/errors/bbc9a64cdf2fba39.
Report an issue: GitHub.
Appendix: source
Thrown at sources/assets/Stride.Core.Assets.Quantum/AssetPropertyGraph.cs:905
{
var baseIndex = baseNode.IdToIndex(item.Value);
var baseItemValue = baseNode.Retrieve(baseIndex);
var clonedValue = CloneValueFromBase(baseItemValue, assetNode);
if (assetNode.Descriptor is CollectionDescriptor)
{
// In a collection, we need to find an index that matches the index on the base to maintain order.
// To do so, we iterate from the index in the base to zero.
var currentBaseIndex = baseIndex.Int - 1;
// Initialize the target index to zero, in case we don't find any better index.
var localIndex = new NodeIndex(0);
// Find the first item of the base that also exists (in term of id) in the local node, iterating backward (from baseIndex to 0)
while (currentBaseIndex >= 0)
{
// This should not happen since the currentBaseIndex comes from the base.
if (!baseNode.TryIndexToId(new NodeIndex(currentBaseIndex), out ItemId baseId))
throw new InvalidOperationException("Cannot find an identifier matching the index in the base collection");
// If we have an matching item, we want to insert right after it
if (objectNode.TryIdToIndex(baseId, out NodeIndex sameIndexInInstance))
{
localIndex = new NodeIndex(sameIndexInInstance.Int + 1);
break;
}
currentBaseIndex--;
}
objectNode.Restore(clonedValue, localIndex, item.Value);
}
else
{
// This case is for dictionary. Key collisions have already been handle at that point so we can directly do the add without further checks.
objectNode.Restore(clonedValue, baseIndex, item.Value);
}
}View on GitHub (pinned to 96fad776d2)