{"record":{"id":"e445c1e9c313c9b0","repo":"stride3d/stride","slug":"property-path-parse-error-could-not-parse-indexer-value-e445c1","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/ListUpdateResolver.cs","lineNumber":23,"sourceCode":"using System.Globalization;\n\nnamespace Stride.Updater\n{\n    /// <summary>\n    /// Resolver for <see cref=\"IList{T}\"/> in property path.\n    /// </summary>\n    /// <typeparam name=\"T\">The type of list items.</typeparam>\n    public class ListUpdateResolver<T> : UpdateMemberResolver\n    {\n        public override Type SupportedType => typeof(IList<T>);\n\n        /// <inheritdoc/>\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            return new UpdatableListAccessor<T>(indexerValue);\n        }\n    }\n}\n","sourceCodeStart":5,"sourceCodeEnd":29,"githubUrl":"https://github.com/stride3d/stride/blob/96fad776d210c221682aac1ccdf4c79dc046fc38/sources/engine/Stride.Engine/Updater/ListUpdateResolver.cs#L5-L29","documentation":"ListUpdateResolver.ResolveIndexer parses the indexer segment of a property path into an integer list index and throws InvalidOperationException when parsing fails. Same mechanism as the array resolver but for List<T> members; the path must address list elements numerically.","triggerScenarios":"Compiling a property path addressing a List<T> member with a non-integer indexer, e.g. 'Points[first]' or 'Points[]' via UpdateEngine.Compile / animation keys.","commonSituations":"Hand-written animation paths with symbolic indices; paths copied from dictionary-style bindings; generated paths where the index variable was empty or non-numeric at string-build time.","solutions":["Ensure the indexer is a plain integer: 'Points[2]'.","Validate/normalize the path before Compile (int.TryParse each bracketed segment).","Check that the target member is actually a list and the intended syntax; for dictionaries use the dictionary resolver path instead.","Handle the InvalidOperationException at Compile time and surface the offending path in your own error message."],"exampleFix":"// before\nvar path = $\"Points[{indexName}]\"; // indexName = 'last'\n// after\nvar path = $\"Points[{indexInt}]\"; // indexInt = 0","handlingStrategy":"validation","validationCode":"bool isValidListPath(string path) { var m = System.Text.RegularExpressions.Regex.Match(path, @\"\\[([^\\]]*)\\]\"); return m.Success && int.TryParse(m.Groups[1].Value, out _); }","typeGuard":null,"tryCatchPattern":"try { engine.Compile(target, path, ...); } catch (InvalidOperationException ex) when (ex.Message.Contains(\"indexer value\")) { log.Error($\"Invalid list indexer in path: {path}\"); }","preventionTips":["Ensure list indexer segments are integers","Normalize/trim paths before compilation","Keep animation path generation and member types in sync","Surface the offending path in your own error handling"],"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"}