{"record":{"id":"9c1787332bd4dde4","repo":"stride3d/stride","slug":"property-key-path-parse-error-could-not-parse-indexer-value","errorCode":null,"errorMessage":"Property Key path parse error: could not parse indexer value '{indexerName}'","messagePattern":"Property Key path parse error: could not parse indexer value '(.+?)'","errorType":"exception","errorClass":"InvalidOperationException","httpStatus":null,"severity":"error","filePath":"sources/engine/Stride.Engine/Engine/Design/ParameterCollectionResolver.cs","lineNumber":29,"sourceCode":"namespace Stride.Engine.Design\n{\n    public class ParameterCollectionResolver : UpdateMemberResolver\n    {\n        [ModuleInitializer]\n        internal static void InitializeModule()\n        {\n            UpdateEngine.RegisterMemberResolver(new ParameterCollectionResolver());\n        }\n\n        public override Type SupportedType => typeof(ParameterCollection);\n\n        [UnconditionalSuppressMessage(\"Trimming\", \"IL2076\", Justification = \"Accessor instantiations rooted by UpdateEngineProcessor (InstantiateValueAccessor<KeyType>).\")]\n        [UnconditionalSuppressMessage(\"AOT\", \"IL3050\", Justification = \"Accessor instantiation rooted by UpdateEngineProcessor (InstantiateValueAccessor<KeyType>).\")]\n        public override UpdatableMember ResolveIndexer(string indexerName)\n        {\n            var key = ParameterKeys.FindByName(indexerName);\n            if (key == null)\n                throw new InvalidOperationException($\"Property Key path parse error: could not parse indexer value '{indexerName}'\");\n\n            switch (key.Type)\n            {\n                case ParameterKeyType.Value:\n                    var accessorType = typeof(ValueParameterCollectionAccessor<>).MakeGenericType(key.PropertyType);\n                    return (UpdatableMember)Activator.CreateInstance(accessorType, key);\n                case ParameterKeyType.Object:\n                    return new ObjectParameterCollectionAccessor(key);\n                default:\n                    throw new NotSupportedException($\"{nameof(ParameterCollectionResolver)} can only handle Value and Object keys\");\n            }\n        }\n\n        // Needed for AOT platforms\n        public static void InstantiateValueAccessor<T>() where T : struct\n        {\n            new ValueParameterCollectionAccessor<T>(null);\n        }","sourceCodeStart":11,"sourceCodeEnd":47,"githubUrl":"https://github.com/stride3d/stride/blob/96fad776d210c221682aac1ccdf4c79dc046fc38/sources/engine/Stride.Engine/Engine/Design/ParameterCollectionResolver.cs#L11-L47","documentation":"ParameterCollectionResolver.ResolveIndexer maps an indexer string to a registered ParameterKey via ParameterKeys.FindByName. It throws InvalidOperationException when no parameter key with that name exists, meaning the property path references an unregistered or misspelled key.","triggerScenarios":"Property path indexer string that matches no ParameterKey registered in ParameterKeys (typos, key removed/renamed, key registered in a different module after resolution).","commonSituations":"Shader/parameter keys renamed in a Stride upgrade, referencing keys from an effect/module that was never loaded, or hand-edited asset property paths.","solutions":["Verify the exact key name exists (search ParameterKeys registrations) and fix typos in the path.","Ensure the module/assembly that registers the key (static ParameterKeys class) is loaded before resolution.","Update asset/script property paths after renaming a ParameterKey."],"exampleFix":"// before\n// indexer 'MyKeys.WrongName' -> FindByName returns null\n// after\n// indexer 'MyKeys.CorrectName' or register:\npublic static readonly ParameterKey<bool> CorrectName = ParameterKeys.New(\"MyKeys.CorrectName\");","handlingStrategy":"validation","validationCode":"if (ParameterKeys.FindByName(keyName) == null)\n    Log.Warning($\"ParameterKey '{keyName}' not registered; fix the property path or register the key.\");","typeGuard":null,"tryCatchPattern":"try { resolver.ResolveIndexer(keyName); }\ncatch (InvalidOperationException) { Log.Error($\"Unknown parameter key '{keyName}' in property path.\"); }","preventionTips":["Reference keys via typed constants (ParameterKeys class) instead of raw strings where possible.","Update property paths whenever a ParameterKey is renamed.","Ensure the assembly registering the keys is loaded before resolution."],"tags":["parameters","property-resolution","key-lookup"],"backgroundTag":"resource-not-found","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"}