{"record":{"id":"ab646b0107b9203d","repo":"stride3d/stride","slug":"cyclic-dependency-found-involving-0","errorCode":null,"errorMessage":"Cyclic dependency found, involving {0}","messagePattern":"Cyclic dependency found, involving (.+?)","errorType":"exception","errorClass":"InvalidOperationException","httpStatus":null,"severity":"error","filePath":"sources/assets/Stride.AssetCompiler/BundlePacker.cs","lineNumber":479,"sourceCode":"        {\n            var result = new List<T>();\n            var temporaryMark = new HashSet<T>();\n            var mark = new HashSet<T>();\n\n            foreach (var item in source)\n                TopologicalSortVisit(item, temporaryMark, mark, result, dependencies);\n\n            return result;\n        }\n\n        private static void TopologicalSortVisit<T>(T item, HashSet<T> temporaryMark, HashSet<T> mark, List<T> result, Func<T, IEnumerable<T>> dependencies)\n        {\n            // Already processed?\n            if (mark.Contains(item))\n                return;\n\n            if (temporaryMark.Contains(item))\n                throw new InvalidOperationException(string.Format(\"Cyclic dependency found, involving {0}\", item));\n\n            temporaryMark.Add(item);\n\n            foreach (var dep in dependencies(item))\n                TopologicalSortVisit(dep, temporaryMark, mark, result, dependencies);\n\n            mark.Add(item);\n            result.Add(item);\n        }\n    }\n}\n","sourceCodeStart":461,"sourceCodeEnd":491,"githubUrl":"https://github.com/stride3d/stride/blob/96fad776d210c221682aac1ccdf4c79dc046fc38/sources/assets/Stride.AssetCompiler/BundlePacker.cs#L461-L491","documentation":"In Update, after set-dictionary handling, only CollectionBaseDescriptor nodes support item assignment; if the Descriptor is anything else the method throws NotSupportedException. This catches updates routed to node kinds with no settable item semantics.","triggerScenarios":"Calling ObjectNode.Update(newValue, index, sendNotification) on a node whose Descriptor is a DictionaryDescriptor or is not a CollectionBaseDescriptor — e.g. updating items of a dictionary through the collection path, or updating a plain-object node with an index.","commonSituations":"Generic property-update pipelines that route both dictionary and list changes through Update; updating items of custom collection types lacking a CollectionBaseDescriptor.","solutions":["Route dictionary item updates through the dictionary-specific path/descriptor instead of Update.","Confirm the node's Descriptor is a CollectionBaseDescriptor before updating items.","For non-collection nodes, update members via MemberNode APIs rather than indexed Update."],"exampleFix":"// before\nnode.Update(newValue, NodeIndex.Create(dictKey), true); // node is a dictionary\n// after\nif (node.Descriptor is DictionaryDescriptor dd)\n    dd.SetValue? /* use dictionary update path */ : node.Update(newValue, NodeIndex.Create(dictKey), true);","handlingStrategy":"validation","validationCode":"if (node.Descriptor is not CollectionBaseDescriptor)\n    throw new InvalidOperationException($\"Update not supported for descriptor {node.Descriptor?.GetType().Name}\");","typeGuard":"bool SupportsIndexedUpdate(ObjectNode node) => node.Descriptor is CollectionBaseDescriptor;","tryCatchPattern":"try { node.Update(newValue, index, true); }\ncatch (NotSupportedException ex) { /* route to dictionary or member update path depending on descriptor */ }","preventionTips":["Route dictionary changes through dictionary-specific APIs","Check for CollectionBaseDescriptor before indexed updates","Keep a single mutation dispatcher keyed on descriptor type"],"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"}