{"record":{"id":"e7af9525a8110dfb","repo":"dotnet/reactive","slug":"value-cannot-be-null-parameter-fourteenth-qbservableex","errorCode":null,"errorMessage":"Value cannot be null. (Parameter 'fourteenth')","messagePattern":"Value cannot be null\\. \\(Parameter 'fourteenth'\\)","errorType":"exception","errorClass":"ArgumentNullException","httpStatus":null,"severity":"error","filePath":"Rx.NET/Source/src/System.Reactive/Linq/QbservableEx.Homoicon.cs","lineNumber":2015,"sourceCode":"                throw new ArgumentNullException(nameof(fifth));\n            if (sixth == null)\n                throw new ArgumentNullException(nameof(sixth));\n            if (seventh == null)\n                throw new ArgumentNullException(nameof(seventh));\n            if (eighth == null)\n                throw new ArgumentNullException(nameof(eighth));\n            if (ninth == null)\n                throw new ArgumentNullException(nameof(ninth));\n            if (tenth == null)\n                throw new ArgumentNullException(nameof(tenth));\n            if (eleventh == null)\n                throw new ArgumentNullException(nameof(eleventh));\n            if (twelfth == null)\n                throw new ArgumentNullException(nameof(twelfth));\n            if (thirteenth == null)\n                throw new ArgumentNullException(nameof(thirteenth));\n            if (fourteenth == null)\n                throw new ArgumentNullException(nameof(fourteenth));\n\n            return first.Provider.CreateQuery<(TFirst First, TSecond Second, TThird Third, TFourth Fourth, TFifth Fifth, TSixth Sixth, TSeventh Seventh, TEighth Eighth, TNinth Ninth, TTenth Tenth, TEleventh Eleventh, TTwelfth Twelfth, TThirteenth Thirteenth, TFourteenth Fourteenth)>(\n                Expression.Call(\n                    null,\n                    new Func<IQbservable<TFirst>, IObservable<TSecond>, IObservable<TThird>, IObservable<TFourth>, IObservable<TFifth>, IObservable<TSixth>, IObservable<TSeventh>, IObservable<TEighth>, IObservable<TNinth>, IObservable<TTenth>, IObservable<TEleventh>, IObservable<TTwelfth>, IObservable<TThirteenth>, IObservable<TFourteenth>, IQbservable<(TFirst First, TSecond Second, TThird Third, TFourth Fourth, TFifth Fifth, TSixth Sixth, TSeventh Seventh, TEighth Eighth, TNinth Ninth, TTenth Tenth, TEleventh Eleventh, TTwelfth Twelfth, TThirteenth Thirteenth, TFourteenth Fourteenth)>>(Zip<TFirst, TSecond, TThird, TFourth, TFifth, TSixth, TSeventh, TEighth, TNinth, TTenth, TEleventh, TTwelfth, TThirteenth, TFourteenth>).Method,\n                    first.Expression,\n                    GetSourceExpression(second),\n                    GetSourceExpression(third),\n                    GetSourceExpression(fourth),\n                    GetSourceExpression(fifth),\n                    GetSourceExpression(sixth),\n                    GetSourceExpression(seventh),\n                    GetSourceExpression(eighth),\n                    GetSourceExpression(ninth),\n                    GetSourceExpression(tenth),\n                    GetSourceExpression(eleventh),\n                    GetSourceExpression(twelfth),\n                    GetSourceExpression(thirteenth),","sourceCodeStart":1997,"sourceCodeEnd":2033,"githubUrl":"https://github.com/dotnet/reactive/blob/94b5d5ab912789f5abe9a72138a25bbd716fe59c/Rx.NET/Source/src/System.Reactive/Linq/QbservableEx.Homoicon.cs#L1997-L2033","documentation":"The 14-source QbservableEx.Zip overload checks all sequence arguments and throws ArgumentNullException with parameter name 'fourteenth' when the last source is null. This eager validation happens before Provider.CreateQuery builds the expression tree, so the query is never constructed.","triggerScenarios":"Calling the 14-argument Zip overload with a null 14th (fourteenth) IQbservable<TFourteenth> argument — typically the result of a method returning null or an unassigned last parameter.","commonSituations":"Long argument lists make it easy to pass the wrong (null) variable in the final position; dynamic assembly of streams where the last source failed to resolve; calling Zip from generated or templated code with a missing sequence.","solutions":["Trace the expression supplying the fourteenth argument and eliminate the null source.","Substitute Observable.Empty<TFourteenth>() when an absent stream should simply end the zip immediately.","Validate all arguments before the call and branch to an alternative composition if any are null."],"exampleFix":"// before\nvar fourteenth = config.LastStream; // may be null\nvar zipped = first.Zip(..., fourteenth);\n// after\nvar fourteenth = config.LastStream ?? Observable.Empty<TFourteenth>();\nvar zipped = first.Zip(..., fourteenth);","handlingStrategy":"validation","validationCode":"if (fourteenth == null) throw new InvalidOperationException(\"fourteenth source must be set before Zip\");\nvar zipped = first.Zip(second, ..., thirteenth, fourteenth);","typeGuard":"static bool IsUsableSource<T>(IObservable<T> s) => s is not null;","tryCatchPattern":"try\n{\n    return first.Zip(..., fourteenth);\n}\ncatch (ArgumentNullException ex) when (ex.ParamName == \"fourteenth\")\n{\n    logger.LogWarning(\"fourteenth source was null\");\n    return first.Zip(..., thirteenth, Observable.Empty<TFourteenth>());\n}","preventionTips":["Coalesce optional sources with ?? Observable.Empty<T>() at construction time.","Check argument positions carefully in wide overloads; prefer combining fewer sources.","Treat null streams as bugs: fail fast at the producer, not at Zip."],"tags":["rx","csharp","null-argument","qbservable","zip"],"backgroundTag":"null-argument","analyzedSha":"94b5d5ab912789f5abe9a72138a25bbd716fe59c","analyzedAt":"2026-09-15T02:26:24.759Z","contentChangedAt":"2026-09-15T02:26:24.759Z","schemaVersion":2},"datasetVersion":"2026-09-23T08:17:48.524Z"}