{"record":{"id":"3b05e43a840456f7","repo":"stride3d/stride","slug":"key","errorCode":null,"errorMessage":"key","messagePattern":"key","errorType":"exception","errorClass":"ArgumentNullException","httpStatus":null,"severity":"error","filePath":"sources/engine/Stride.Rendering/Rendering/Images/ColorTransforms/ColorTransformGroup.cs","lineNumber":266,"sourceCode":"        }\n\n        /// <summary>\n        /// An internal key to cache {Key,TransformIndex} => CompositeKey\n        /// </summary>\n        private struct ParameterCompositeKey : IEquatable<ParameterCompositeKey>\n        {\n            private readonly ParameterKey key;\n\n            private readonly int index;\n\n            /// <summary>\n            /// Initializes a new instance of the <see cref=\"ParameterCompositeKey\"/> struct.\n            /// </summary>\n            /// <param name=\"key\">The key.</param>\n            /// <param name=\"transformIndex\">Index of the transform.</param>\n            public ParameterCompositeKey(ParameterKey key, int transformIndex)\n            {\n                if (key == null) throw new ArgumentNullException(\"key\");\n                this.key = key;\n                index = transformIndex;\n            }\n\n            public bool Equals(ParameterCompositeKey other)\n            {\n                return key.Equals(other.key) && index == other.index;\n            }\n\n            public override bool Equals(object obj)\n            {\n                if (ReferenceEquals(null, obj)) return false;\n                return obj is ParameterCompositeKey && Equals((ParameterCompositeKey)obj);\n            }\n\n            public override int GetHashCode()\n            {\n                unchecked","sourceCodeStart":248,"sourceCodeEnd":284,"githubUrl":"https://github.com/stride3d/stride/blob/96fad776d210c221682aac1ccdf4c79dc046fc38/sources/engine/Stride.Rendering/Rendering/Images/ColorTransforms/ColorTransformGroup.cs#L248-L284","documentation":"The ParameterCompositeKey struct constructor in ColorTransformGroup throws ArgumentNullException when the ParameterKey is null. This composite key pairs a parameter key with a transform index to uniquely identify parameters inside a color-transform group; a null key would produce an unusable dictionary key.","triggerScenarios":"new ParameterCompositeKey(null, index) — constructing the key with a null ParameterKey, typically when the key comes from a lookup or reflection that returned null.","commonSituations":"Custom color transforms registering parameters with keys that failed to resolve; refactorings where a ParameterKey field was not initialized.","solutions":["Pass a valid, non-null ParameterKey instance when constructing the composite key.","Verify that the ParameterKey field/property being used was initialized (e.g. via ParameterKeys static definitions).","Guard the construction site with a null check and log which key failed to resolve."],"exampleFix":"// before\nvar key = new ParameterCompositeKey(myKey, 0); // myKey null\n// after\nif (myKey == null) throw new InvalidOperationException(\"Parameter key not initialized\");\nvar key = new ParameterCompositeKey(myKey, 0);","handlingStrategy":"validation","validationCode":"if (parameterKey == null) throw new InvalidOperationException(\"ParameterKey not resolved\");\nvar compositeKey = new ParameterCompositeKey(parameterKey, index);","typeGuard":"bool KeyResolved(ParameterKey k) => k != null;","tryCatchPattern":"try { var key = new ParameterCompositeKey(k, i); }\ncatch (ArgumentNullException ex) { Log.Error(ex, \"Null parameter key\"); }","preventionTips":["Initialize ParameterKey fields as static readonly","Verify key resolution after reflection-based lookups","Fail fast at startup if keys are unresolved"],"tags":["null-argument","parameter-key","color-transform"],"backgroundTag":"null-argument","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"}