{"record":{"id":"d5f9e7d818881def","repo":"stride3d/stride","slug":"an-objectnode-value-cannot-be-modified-after-it-has-been","errorCode":null,"errorMessage":"An ObjectNode value cannot be modified after it has been constructed","messagePattern":"An ObjectNode value cannot be modified after it has been constructed","errorType":"exception","errorClass":"InvalidOperationException","httpStatus":null,"severity":"error","filePath":"sources/presentation/Stride.Core.Quantum/ObjectNode.cs","lineNumber":185,"sourceCode":"        else if (Descriptor is DictionaryDescriptor dictionaryDescriptor)\n        {\n            dictionaryDescriptor.Remove(value, itemIndexValue);\n        }\n        else\n        {\n            throw new NotSupportedException(\"Unable to set the node value, the collection is unsupported\");\n        }\n\n        UpdateReferences();\n        NotifyItemChanged(args);\n    }\n\n    /// <inheritdoc/>\n    protected internal override void UpdateFromMember(object newValue, NodeIndex index)\n    {\n        if (index == NodeIndex.Empty)\n        {\n            throw new InvalidOperationException(\"An ObjectNode value cannot be modified after it has been constructed\");\n        }\n        Update(newValue, index, true);\n    }\n\n    protected void SetValue(object newValue)\n    {\n        value = newValue;\n    }\n\n    protected void NotifyItemChanging(ItemChangeEventArgs args)\n    {\n        PrepareChange?.Invoke(this, args);\n        ItemChanging?.Invoke(this, args);\n    }\n\n    protected void NotifyItemChanged(ItemChangeEventArgs args)\n    {\n        ItemChanged?.Invoke(this, args);","sourceCodeStart":167,"sourceCodeEnd":203,"githubUrl":"https://github.com/stride3d/stride/blob/96fad776d210c221682aac1ccdf4c79dc046fc38/sources/presentation/Stride.Core.Quantum/ObjectNode.cs#L167-L203","documentation":"Thrown by ObjectNode.UpdateFromMember when it receives a value update routed through NodeIndex.Empty. ObjectNode represents the root object itself, not a member; a member-style update addressed with an empty index would mean overwriting the whole already-constructed object value, which the quantum graph forbids — content changes must go through member/item nodes, not by replacing the object node's value.","triggerScenarios":"Thrown at sources/presentation/Stride.Core.Quantum/ObjectNode.cs:185 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Do not call UpdateFromMember with NodeIndex.Empty: this internal pathway is only for member-driven updates of child nodes; use the node's SetValue/Update pathway to change the root object node's value.","Route root-level value changes through the node container/graph APIs designed for them.","Treat this as an internal invariant violation: audit callers that pass the empty index and fix them to pass the member's actual NodeIndex."],"exampleFix":null,"handlingStrategy":"validation","validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"96fad776d210c221682aac1ccdf4c79dc046fc38","analyzedAt":"2026-09-14T02:59:31.279Z","contentChangedAt":"2026-09-14T02:59:31.279Z","schemaVersion":2},"datasetVersion":"2026-09-23T08:17:48.524Z"}