{"record":{"id":"7cf588b03bdf54ed","repo":"stride3d/stride","slug":"mismatches-content-reference-s-were-not-rooted-see-errors","errorCode":null,"errorMessage":"{mismatches} content reference(s) were not rooted (see errors above); this would break bundling and runtime loading.","messagePattern":"(.+?) content reference\\(s\\) were not rooted \\(see errors above\\); this would break bundling and runtime loading\\.","errorType":"exception","errorClass":"InvalidOperationException","httpStatus":null,"severity":"error","filePath":"sources/assets/Stride.AssetCompiler/BundlePacker.cs","lineNumber":358,"sourceCode":"                    // (a target in a bare package is meant to stay bare).\n                    if (reference.Length == 0 || reference[0] == '/' || contentIndexMap.TryGetValue(reference, out _))\n                        continue;\n\n                    // Bare and not found as-is: flag it only if the rooted version is in the index.\n                    foreach (var assetNamespace in assetNamespaces)\n                    {\n                        if (contentIndexMap.TryGetValue(\"/\" + assetNamespace + \"/\" + reference, out _))\n                        {\n                            logger.Error($\"Content '{entry.Key}' references '{reference}' without its /namespace/ prefix, but that target is indexed as '/{assetNamespace}/{reference}'. The reference was not rooted.\");\n                            mismatches++;\n                            break;\n                        }\n                    }\n                }\n            }\n\n            if (mismatches > 0)\n                throw new InvalidOperationException($\"{mismatches} content reference(s) were not rooted (see errors above); this would break bundling and runtime loading.\");\n        }\n\n        /// <summary>\n        /// Gets and cache the asset url referenced by the chunk with the given identifier.\n        /// </summary>\n        /// <param name=\"objectId\">The object identifier.</param>\n        /// <returns>The list of asset url referenced.</returns>\n        private List<string> GetChunkReferences(DatabaseFileProvider databaseFileProvider, ref ObjectId objectId)\n        {\n            List<string> references;\n\n            // Check the cache\n            if (!referencesByObjectId.TryGetValue(objectId, out references))\n            {\n                // First time, need to scan it\n                referencesByObjectId[objectId] = references = new List<string>();\n\n                // Open stream to read list of chunk references","sourceCodeStart":340,"sourceCodeEnd":376,"githubUrl":"https://github.com/stride3d/stride/blob/96fad776d210c221682aac1ccdf4c79dc046fc38/sources/assets/Stride.AssetCompiler/BundlePacker.cs#L340-L376","documentation":"ObjectNode.Remove supports only CollectionDescriptor and DictionaryDescriptor node types; when the Descriptor is neither, it throws NotSupportedException. Sets and other unsupported collection kinds cannot have items removed through this API.","triggerScenarios":"Calling ObjectNode.Remove(item, index) on a node whose Descriptor is not a CollectionDescriptor (with HasRemoveAt path) and not a DictionaryDescriptor — e.g. a set-backed node or an unrecognized custom collection.","commonSituations":"Generic 'delete selected item' handlers in editors that invoke Remove for every collection-like node, including sets; removing from custom collection types lacking descriptor support.","solutions":["Verify the Descriptor is CollectionDescriptor or DictionaryDescriptor before calling Remove.","For set-backed nodes, replace the set value via Update/SetValue instead of removing an element.","Implement or register a descriptor for custom collection types if removal support is required."],"exampleFix":"// before\nnode.Remove(unwantedItem, itemIndex);\n// after\nif (node.Descriptor is CollectionDescriptor || node.Descriptor is DictionaryDescriptor)\n    node.Remove(unwantedItem, itemIndex);","handlingStrategy":"validation","validationCode":"bool canRemove = node.Descriptor is CollectionDescriptor { HasRemoveAt: true } or DictionaryDescriptor;\nif (!canRemove) throw new InvalidOperationException(\"Node does not support item removal\");","typeGuard":"bool IsRemovableCollection(ObjectNode node) => node.Descriptor is CollectionDescriptor or DictionaryDescriptor;","tryCatchPattern":"try { node.Remove(item, itemIndex); }\ncatch (NotSupportedException ex) { /* replace the whole value via Update/SetValue instead */ }","preventionTips":["Dispatch removal on Descriptor kind","Handle sets by replacing the whole set value","Register descriptors for custom collections needing removal"],"tags":["unsupported-collection","quantum","not-supported"],"backgroundTag":"unsupported-operation","analyzedSha":"96fad776d210c221682aac1ccdf4c79dc046fc38","analyzedAt":"2026-09-14T02:59:31.279Z","contentChangedAt":"2026-09-14T02:59:31.279Z","schemaVersion":2},"datasetVersion":"2026-09-15T23:17:13.987Z"}