{"record":{"id":"7df889108b024d57","repo":"stride3d/stride","slug":"property-path-parse-error-could-not-parse-indexer-value","errorCode":null,"errorMessage":"Property path parse error: could not parse indexer value '{indexerName}'","messagePattern":"Property path parse error: could not parse indexer value '(.+?)'","errorType":"exception","errorClass":"InvalidOperationException","httpStatus":null,"severity":"error","filePath":"sources/engine/Stride.Engine/Updater/ArrayUpdateResolver.cs","lineNumber":21,"sourceCode":"using System;\nusing System.Globalization;\n\nnamespace Stride.Updater\n{\n    /// <summary>\n    /// Resolver for <see cref=\"Array\"/> with elements of type <typeparamref name=\"T\"/>.\n    /// </summary>\n    /// <typeparam name=\"T\">The type of array items.</typeparam>\n    public class ArrayUpdateResolver<T> : UpdateMemberResolver\n    {\n        public override Type SupportedType => typeof(T[]);\n\n        public override UpdatableMember ResolveIndexer(string indexerName)\n        {\n            // Transform index into integer\n            int indexerValue;\n            if (!int.TryParse(indexerName, NumberStyles.Any, CultureInfo.InvariantCulture, out indexerValue))\n                throw new InvalidOperationException(string.Format(\"Property path parse error: could not parse indexer value '{0}'\", indexerName));\n\n            var updatableField = new UpdatableArrayAccessor<T>(indexerValue);\n\n            return updatableField;\n        }\n    }\n}\n","sourceCodeStart":3,"sourceCodeEnd":29,"githubUrl":"https://github.com/stride3d/stride/blob/96fad776d210c221682aac1ccdf4c79dc046fc38/sources/engine/Stride.Engine/Updater/ArrayUpdateResolver.cs#L3-L29","documentation":"ArrayUpdateResolver.ResolveIndexer converts a property-path indexer string (e.g. the '[3]' inside 'MyArray[3]') into an integer index and throws InvalidOperationException when the text is not parseable as an integer. This powers Stride's animation/scripting property path system, so the error means a malformed property path was compiled.","triggerScenarios":"Compiling a property path (UpdateEngine.Compile / animation binding) whose indexer segment contains non-numeric text, e.g. 'Materials[color]' or 'Keys[first]' targeting an array member.","commonSituations":"Typos in animation/blender property paths; paths written for dictionaries (string keys) applied to arrays or lists; locale or whitespace issues inside the bracket; tooling that interpolates an empty or symbolic index into the path.","solutions":["Use a numeric index in brackets for array members: 'FieldName[0]' not 'FieldName[name]'.","Validate the generated property path string before compiling (regex like ^[A-Za-z_][\\w]*(\\[\\d+\\])*$).","If you need keyed access, ensure the target member is a Dictionary with a matching blittable key type, not an array.","Trim whitespace and ensure no empty brackets '[]' remain in the path."],"exampleFix":"// before\nvar path = \"Meshes[body]\"; // non-numeric indexer for array\n// after\nvar path = \"Meshes[1]\";","handlingStrategy":"validation","validationCode":"bool isValidIndexer(string s) => int.TryParse(s, NumberStyles.Any, CultureInfo.InvariantCulture, out _);","typeGuard":null,"tryCatchPattern":"try { engine.Compile(myObject, path, ...); } catch (InvalidOperationException ex) when (ex.Message.Contains(\"indexer value\")) { log.Error($\"Bad property path: {path}\"); }","preventionTips":["Use numeric indices for array/list members in property paths","Regex-validate paths before Compile","Never build paths with uninterpolated or symbolic index placeholders","Use dictionary resolvers/paths for keyed members"],"tags":["property-path","animation","parsing"],"backgroundTag":"invalid-argument-format","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"}