stride3d/stride · error · NotImplementedException

params of strings is not yet implemented

Error message

params of strings is not yet implemented

What it means

OperandEnumerator.MoveNext throws this NotImplementedException when it encounters a variadic (ZeroOrMore) operand of Kind LiteralString. Multi-word strings in a variadic list cannot be skipped/advanced with the current word-counting logic, which assumes fixed-size operands. This is an explicitly unimplemented feature, not a data corruption.

Solutions

  1. Upgrade to a Stride version that implements variadic string operand parsing
  2. Pre-process the module to strip or rewrite instructions with variadic string operands (e.g. remove OpSource/OpModuleProcessed via spirv-remap or spirv-val tooling)
  3. Patch OperandEnumerator to scan for null-terminated word sequences when Kind == LiteralString && Quantifier == ZeroOrMore
  4. Catch NotImplementedException and fall back to a raw-word parse for that instruction

Example fix

// before (library)
if (logOp.Kind == OperandKind.LiteralString)
    throw new NotImplementedException("params of strings is not yet implemented");
// after (library)
if (logOp.Kind == OperandKind.LiteralString)
{
    while (wid < Operands.Length && !Operands[wid].HasEndString()) wid += 1;
    wid += 1;
}
Defensive patterns

Strategy: try-catch

Validate before calling

if (logOp.Quantifier == OperandQuantifier.ZeroOrMore && logOp.Kind == OperandKind.LiteralString)
    throw new NotSupportedException("Variadic string operands unsupported");

Type guard

bool IsVariadicString(OperandInfo op) => op.Quantifier == OperandQuantifier.ZeroOrMore && op.Kind == OperandKind.LiteralString;

Try / catch

try { foreach (var op in operands) { } }
catch (NotImplementedException ex)
{
    logger.LogWarning(ex, "Variadic string operand hit; skipping instruction");
}

Prevention

When it happens

Trigger: Parsing any instruction whose grammar contains a ZeroOrMore LiteralString operand, e.g. OpSource with a file-name list, or extension-style variadic string operands.

Common situations: Modules compiled by glslang/dxc that emit OpSource or OpModuleProcessed with string payloads; SPIR-V from shaders using certain extensions that put multiple strings in one instruction.

Related errors


AI-assisted analysis of stride3d/stride@96fad776d2 (2026-09-14). Data as JSON: /api/errors/0cfbf704d42afadc. Report an issue: GitHub.

Appendix: source

Thrown at sources/shaders/Stride.Shaders.Spirv/Parsing/OperandEnumerator.cs:75

                }
                else if (
                    logOp.Kind == OperandKind.LiteralString
                    && wid < Operands.Length
                )
                {
                    while (!Operands[wid].HasEndString())
                        wid += 1;
                    wid += 1;
                }
                else if (wid < Operands.Length)
                    wid += 1;
                oid += 1;

            }
            else if (logOp.Quantifier == OperandQuantifier.ZeroOrMore)
            {
                if (logOp.Kind == OperandKind.LiteralString)
                    throw new NotImplementedException("params of strings is not yet implemented");
                else if (
                    Pairs.Contains(logOp.Kind ?? throw new Exception())
                    && wid < Operands.Length - 2
                )
                    wid += 2;
                else if (wid < Operands.Length - 1)
                    wid += 1;
                else
                    oid += 1;

            }
            return wid < Operands.Length;
        }

    }

    public SpvOperand ParseCurrent()
    {

View on GitHub (pinned to 96fad776d2)