{"record":{"id":"f492340069cb9513","repo":"dotnet/reactive","slug":"value-cannot-be-null-parameter-thirteenth-observable","errorCode":null,"errorMessage":"Value cannot be null. (Parameter 'thirteenth')","messagePattern":"Value cannot be null\\. \\(Parameter 'thirteenth'\\)","errorType":"exception","errorClass":"ArgumentNullException","httpStatus":null,"severity":"error","filePath":"Rx.NET/Source/src/System.Reactive/Linq/Observable.Multiple.Zip.cs","lineNumber":1807,"sourceCode":"                throw new ArgumentNullException(nameof(fourth));\n            if (fifth == null)\n                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            if (fifteenth == null)\n                throw new ArgumentNullException(nameof(fifteenth));\n\n            return s_impl.Zip(first, second, third, fourth, fifth, sixth, seventh, eighth, ninth, tenth, eleventh, twelfth, thirteenth, fourteenth, fifteenth);\n        }\n\n        /// <summary>\n        /// Merges the specified observable sequences into one observable sequence of tuple values whenever all of the observable sequences have produced an element at a corresponding index.\n        /// </summary>\n        /// <typeparam name=\"TFirst\">The type of the elements in the first source sequence.</typeparam>\n        /// <typeparam name=\"TSecond\">The type of the elements in the second source sequence.</typeparam>\n        /// <typeparam name=\"TThird\">The type of the elements in the third source sequence.</typeparam>\n        /// <typeparam name=\"TFourth\">The type of the elements in the fourth source sequence.</typeparam>\n        /// <typeparam name=\"TFifth\">The type of the elements in the fifth source sequence.</typeparam>\n        /// <typeparam name=\"TSixth\">The type of the elements in the sixth source sequence.</typeparam>\n        /// <typeparam name=\"TSeventh\">The type of the elements in the seventh source sequence.</typeparam>","sourceCodeStart":1789,"sourceCodeEnd":1825,"githubUrl":"https://github.com/dotnet/reactive/blob/94b5d5ab912789f5abe9a72138a25bbd716fe59c/Rx.NET/Source/src/System.Reactive/Linq/Observable.Multiple.Zip.cs#L1789-L1825","documentation":"The high-arity Zip overload null-checks every observable source before delegating to the internal implementation (s_impl.Zip). A null thirteenth sequence triggers the guard at Observable.Multiple.Zip.cs:1807, throwing ArgumentNullException with Parameter 'thirteenth'. This is deliberate fail-fast validation in System.Reactive.","triggerScenarios":"Calling the public static Observable.Zip overload that combines up to fifteen IObservable<T> sources with null in the thirteenth argument position, right before the call returns s_impl.Zip(first, ..., fifteenth).","commonSituations":"A data feed whose producer failed at startup leaving the slot null; template-generated code with an unfilled argument; dynamic stream lists indexed positionally beyond their length.","solutions":["Pass a valid IObservable<T> as the thirteenth argument, or substitute Observable.Empty<TThirteenth>().","Null-check/coalesce all sources before composing the Zip call.","Repair the factory/config path that yields null for this feed.","For variable source counts, switch to Observable.Zip(IEnumerable<IObservable<T>>, Func<IList<T>, TResult>).","Wrap the composition in try/catch (ArgumentNullException) with a contextual message."],"exampleFix":"// before\nreturn Observable.Zip(a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12, a13, a14, a15); // a13 == null\n// after\na13 ??= Observable.Empty<T13>();\nreturn Observable.Zip(a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12, a13, a14, a15);","handlingStrategy":"validation","validationCode":"a13 ??= Observable.Empty<T13>();","typeGuard":"static IObservable<T> EnsureSource<T>(IObservable<T>? s) => s ?? Observable.Empty<T>();","tryCatchPattern":"try { return Observable.Zip(a1, ..., a15); }\ncatch (ArgumentNullException ex) when (ex.ParamName == \"thirteenth\") { return Observable.Empty<(T1,...,T15)>(); }","preventionTips":["Normalize feed producers to return Observable.Empty instead of null.","Validate generated code templates so no argument slots are left unfilled.","Check array bounds when mapping a list of streams to positional arguments.","Test every composition with all sources present."],"tags":["csharp","rx","null-argument","zip","argument-validation"],"backgroundTag":"null-argument","analyzedSha":"94b5d5ab912789f5abe9a72138a25bbd716fe59c","analyzedAt":"2026-09-15T02:26:24.759Z","contentChangedAt":"2026-09-15T02:26:24.759Z","schemaVersion":2},"datasetVersion":"2026-09-15T23:17:13.987Z"}