{"record":{"id":"cc6d6d1387c7b7a7","repo":"stride3d/stride","slug":"params-of-strings-is-not-yet-implemented","errorCode":null,"errorMessage":"params of strings is not yet implemented","messagePattern":"params of strings is not yet implemented","errorType":"exception","errorClass":"NotImplementedException","httpStatus":null,"severity":"error","filePath":"sources/shaders/Stride.Shaders.Spirv/Parsing/OpDataEnumerator.cs","lineNumber":160,"sourceCode":"                { Name: string n, Kind: OperandKind k } when k.ToString().StartsWith(\"Pair\") => new(n, k, logOp.Quantifier ?? OperandQuantifier.One, Operands.Slice(wid, 2), wid),\n                { Name: string n, Kind: OperandKind.LiteralString } => new(n, OperandKind.LiteralString, logOp.Quantifier ?? OperandQuantifier.One, Operands.Slice(wid, Operands[wid..].LengthOfString()), wid),\n                { Name: string n, Kind: OperandKind k } => new(n, k, logOp.Quantifier ?? OperandQuantifier.One, Operands.Slice(wid, 1), wid),\n                _ => throw new NotImplementedException($\"Couldn't handle operand kind {logOp.Kind}\")\n            },\n            { Quantifier: OperandQuantifier.One, Kind: OperandKind.PairIdRefIdRef or OperandKind.PairIdRefLiteralInteger or OperandKind.PairLiteralIntegerIdRef } l\n                => new(logOp.Name, logOp.Kind ?? OperandKind.None, logOp.Quantifier ?? OperandQuantifier.One, Operands.Slice(wid, 2), wid),\n            { Quantifier: OperandQuantifier.One, Kind: OperandKind.LiteralString } => new(logOp.Name, OperandKind.LiteralString, logOp.Quantifier ?? OperandQuantifier.One, Operands.Slice(wid, Operands[wid..].LengthOfString()), wid),\n            { Quantifier: OperandQuantifier.One, Kind: _ } => new(logOp.Name, logOp.Kind ?? OperandKind.None, logOp.Quantifier ?? OperandQuantifier.One, Operands.Slice(wid, 1), wid),\n            { Quantifier: OperandQuantifier.ZeroOrOne, Kind: OperandKind.PairIdRefIdRef or OperandKind.PairIdRefLiteralInteger or OperandKind.PairLiteralIntegerIdRef }\n                => new(logOp.Name, logOp.Kind ?? OperandKind.None, logOp.Quantifier ?? OperandQuantifier.One, Operands.Slice(wid, 2), wid),\n            { Quantifier: OperandQuantifier.ZeroOrOne, Kind: OperandKind.LiteralString }\n                => new(logOp.Name, OperandKind.LiteralString, logOp.Quantifier ?? OperandQuantifier.One, Operands.Slice(wid, Operands[wid..].LengthOfString()), wid),\n            { Quantifier: OperandQuantifier.ZeroOrOne, Kind: _ }\n                => new(logOp.Name, logOp.Kind ?? OperandKind.None, logOp.Quantifier ?? OperandQuantifier.One, wid < Operands.Length ? Operands.Slice(wid, 1) : []),\n            { Quantifier: OperandQuantifier.ZeroOrMore, Kind: OperandKind.PairIdRefIdRef or OperandKind.PairIdRefLiteralInteger or OperandKind.PairLiteralIntegerIdRef }\n                => new(logOp.Name, logOp.Kind ?? OperandKind.None, logOp.Quantifier ?? OperandQuantifier.One, wid < Operands.Length ? Operands[wid..] : [], wid),\n            { Quantifier: OperandQuantifier.ZeroOrMore, Kind: OperandKind.LiteralString }\n                => throw new Exception(\"params of strings is not yet implemented\"),\n            { Quantifier: OperandQuantifier.ZeroOrMore, Kind: _ }\n                => new(logOp.Name, logOp.Kind ?? OperandKind.None, logOp.Quantifier ?? OperandQuantifier.One, wid < Operands.Length ? Operands[wid..] : [], wid),\n            _ => throw new NotImplementedException()\n\n        };\n    }\n\n}\n","sourceCodeStart":142,"sourceCodeEnd":169,"githubUrl":"https://github.com/stride3d/stride/blob/96fad776d210c221682aac1ccdf4c79dc046fc38/sources/shaders/Stride.Shaders.Spirv/Parsing/OpDataEnumerator.cs#L142-L169","documentation":"OpDataEnumerator.ParseCurrent handles ZeroOrMore variadic operands generically (consume remaining words) and Pair* variadics (2 words each), but a ZeroOrMore LiteralString operand requires variable-length string decoding per repetition, which is not implemented — so it throws plain Exception. An instruction whose grammar has a trailing variadic list of strings (or an optional string that may repeat) hits this.","triggerScenarios":"Parsing an instruction whose operand descriptor is { Quantifier: ZeroOrMore, Kind: LiteralString } while iterating with OpDataEnumerator/Current — e.g. opcodes whose grammar defines a variadic sequence of literal strings.","commonSituations":"Extended instruction-set or debug opcodes with repeating string operands; custom/extension SPIR-V instructions; modules generated by tools emitting unusual operand layouts.","solutions":["Identify the opcode (logOp.Name) hitting this path and parse its string list manually outside OpDataEnumerator.","Add an arm consuming words until the string length encoding ends for each repetition, mirroring the LiteralString single-value logic.","Update the grammar tables to avoid exposing ZeroOrMore LiteralString, or contribute the missing implementation upstream to Stride.","Check the module producer: if this opcode is optional, strip/avoid it so the enumerator never encounters it."],"exampleFix":"// before\n{ Quantifier: OperandQuantifier.ZeroOrMore, Kind: OperandKind.LiteralString }\n    => throw new Exception(\"params of strings is not yet implemented\"),\n// after\n{ Quantifier: OperandQuantifier.ZeroOrMore, Kind: OperandKind.LiteralString }\n    => new(logOp.Name, OperandKind.LiteralString, OperandQuantifier.ZeroOrMore, Operands.Slice(wid, Operands[wid..].LengthOfString()), wid),","handlingStrategy":"fallback","validationCode":"// detect the unsupported shape before iterating:\nif (logOp.Quantifier == OperandQuantifier.ZeroOrMore && logOp.Kind == OperandKind.LiteralString)\n    ParseStringsManually(operands);","typeGuard":"static bool IsVariadicStrings(OperandDescriptor op) =>\n    op.Quantifier == OperandQuantifier.ZeroOrMore && op.Kind == OperandKind.LiteralString;","tryCatchPattern":"try { var operand = enumerator.Current; }\ncatch (Exception ex) when (ex.Message.Contains(\"params of strings is not yet implemented\")) { /* manual: consume words until length-prefixed string ends, repeat until words exhausted */ }","preventionTips":["Detect ZeroOrMore LiteralString descriptors up front and route those opcodes to a custom parser.","Contribute/implement string-list consumption upstream instead of relying on the enumerator.","Prefer toolchains that avoid opcodes with variadic string operand lists when possible."],"tags":["spirv","parsing","literal-string","variadic"],"backgroundTag":"method-not-implemented","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"}