stride3d/stride · error · InvalidOperationException
Property Key path parse error: could not parse indexer value
Error message
Property Key path parse error: could not parse indexer value '{indexerName}' What it means
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.
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.
Example fix
// before
// indexer 'MyKeys.WrongName' -> FindByName returns null
// after
// indexer 'MyKeys.CorrectName' or register:
public static readonly ParameterKey<bool> CorrectName = ParameterKeys.New("MyKeys.CorrectName"); Defensive patterns
Strategy: validation
Validate before calling
if (ParameterKeys.FindByName(keyName) == null)
Log.Warning($"ParameterKey '{keyName}' not registered; fix the property path or register the key."); Try / catch
try { resolver.ResolveIndexer(keyName); }
catch (InvalidOperationException) { Log.Error($"Unknown parameter key '{keyName}' in property path."); } Prevention
- 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.
When it happens
Trigger: Property path indexer string that matches no ParameterKey registered in ParameterKeys (typos, key removed/renamed, key registered in a different module after resolution).
Common situations: Shader/parameter keys renamed in a Stride upgrade, referencing keys from an effect/module that was never loaded, or hand-edited asset property paths.
Understand the failure class
Background: 'Could not be found', 'does not exist', 'not found in database': the resource-not-found family when an ID, slug, key, or URI lookup comes back empty — this error's family across 20 libraries.
- Parsing and encoding errors: unexpected token, malformed input — why parsers reject input and how to find the real culprit.
Related errors
- can only handle Value and Object keys
- Unable to find registered ParameterKey
- Could not find child entity named
- Key [ ] must be a registered key
- SetObject can only be used for Permutation or Object keys
AI-assisted analysis of stride3d/stride@96fad776d2 (2026-09-14).
Data as JSON: /api/errors/9c1787332bd4dde4.
Report an issue: GitHub.
Appendix: source
Thrown at sources/engine/Stride.Engine/Engine/Design/ParameterCollectionResolver.cs:29
namespace Stride.Engine.Design
{
public class ParameterCollectionResolver : UpdateMemberResolver
{
[ModuleInitializer]
internal static void InitializeModule()
{
UpdateEngine.RegisterMemberResolver(new ParameterCollectionResolver());
}
public override Type SupportedType => typeof(ParameterCollection);
[UnconditionalSuppressMessage("Trimming", "IL2076", Justification = "Accessor instantiations rooted by UpdateEngineProcessor (InstantiateValueAccessor<KeyType>).")]
[UnconditionalSuppressMessage("AOT", "IL3050", Justification = "Accessor instantiation rooted by UpdateEngineProcessor (InstantiateValueAccessor<KeyType>).")]
public override UpdatableMember ResolveIndexer(string indexerName)
{
var key = ParameterKeys.FindByName(indexerName);
if (key == null)
throw new InvalidOperationException($"Property Key path parse error: could not parse indexer value '{indexerName}'");
switch (key.Type)
{
case ParameterKeyType.Value:
var accessorType = typeof(ValueParameterCollectionAccessor<>).MakeGenericType(key.PropertyType);
return (UpdatableMember)Activator.CreateInstance(accessorType, key);
case ParameterKeyType.Object:
return new ObjectParameterCollectionAccessor(key);
default:
throw new NotSupportedException($"{nameof(ParameterCollectionResolver)} can only handle Value and Object keys");
}
}
// Needed for AOT platforms
public static void InstantiateValueAccessor<T>() where T : struct
{
new ValueParameterCollectionAccessor<T>(null);
}View on GitHub (pinned to 96fad776d2)