stride3d/stride · error · InvalidOperationException
Property path parse error: could not parse indexer value
Error message
Property path parse error: could not parse indexer value '{indexerName}' What it means
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.
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.
Example fix
// before var path = "Meshes[body]"; // non-numeric indexer for array // after var path = "Meshes[1]";
Defensive patterns
Strategy: validation
Validate before calling
bool isValidIndexer(string s) => int.TryParse(s, NumberStyles.Any, CultureInfo.InvariantCulture, out _);
Try / catch
try { engine.Compile(myObject, path, ...); } catch (InvalidOperationException ex) when (ex.Message.Contains("indexer value")) { log.Error($"Bad property path: {path}"); } Prevention
- 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
When it happens
Trigger: 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.
Common situations: 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.
Understand the failure class
Background: "Invalid ... format", "must be in format X", "does not look like a ..." — invalid argument format errors across CLI tools and libraries — this error's family across 17 libraries.
- Parsing and encoding errors: unexpected token, malformed input — why parsers reject input and how to find the real culprit.
Related errors
- Property path parse error: could not find cast operation…
- Property path parse error: could not find indexer end ']'
- Property path parse error: could not parse indexer value
- Could not resolve type
- Property path parse error: could not find binding info for…
AI-assisted analysis of stride3d/stride@96fad776d2 (2026-09-14).
Data as JSON: /api/errors/7df889108b024d57.
Report an issue: GitHub.
Appendix: source
Thrown at sources/engine/Stride.Engine/Updater/ArrayUpdateResolver.cs:21
using System;
using System.Globalization;
namespace Stride.Updater
{
/// <summary>
/// Resolver for <see cref="Array"/> with elements of type <typeparamref name="T"/>.
/// </summary>
/// <typeparam name="T">The type of array items.</typeparam>
public class ArrayUpdateResolver<T> : UpdateMemberResolver
{
public override Type SupportedType => typeof(T[]);
public override UpdatableMember ResolveIndexer(string indexerName)
{
// Transform index into integer
int indexerValue;
if (!int.TryParse(indexerName, NumberStyles.Any, CultureInfo.InvariantCulture, out indexerValue))
throw new InvalidOperationException(string.Format("Property path parse error: could not parse indexer value '{0}'", indexerName));
var updatableField = new UpdatableArrayAccessor<T>(indexerValue);
return updatableField;
}
}
}
View on GitHub (pinned to 96fad776d2)