{"record":{"id":"0e8b9ce35d4606cf","repo":"dotnet/reactive","slug":"value-cannot-be-null-parameter-twelfth-observable-multiple","errorCode":null,"errorMessage":"Value cannot be null. (Parameter 'twelfth')","messagePattern":"Value cannot be null\\. \\(Parameter 'twelfth'\\)","errorType":"exception","errorClass":"ArgumentNullException","httpStatus":null,"severity":"error","filePath":"Rx.NET/Source/src/System.Reactive/Linq/Observable.Multiple.Zip.cs","lineNumber":1805,"sourceCode":"                throw new ArgumentNullException(nameof(third));\n            if (fourth == null)\n                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>","sourceCodeStart":1787,"sourceCodeEnd":1823,"githubUrl":"https://github.com/dotnet/reactive/blob/94b5d5ab912789f5abe9a72138a25bbd716fe59c/Rx.NET/Source/src/System.Reactive/Linq/Observable.Multiple.Zip.cs#L1787-L1823","documentation":"System.Reactive's Zip implementation guards each of its many observable source parameters with ArgumentNullException. A null twelfth sequence hits the check at Observable.Multiple.Zip.cs:1805, throwing with Parameter 'twelfth'. The library throws eagerly so the invalid query fails at construction rather than at subscription time.","triggerScenarios":"Calling the public static Observable.Zip overload accepting up to fifteen IObservable<T> sources with null in the twelfth argument position, e.g. Observable.Zip(s1, ..., s11, null, s13, s14, s15).","commonSituations":"Optional streams in a feature-flagged pipeline left null when a feature is off; arrays of feeds iterated positionally with a missing element; migration from a different reactive library that tolerated null sources.","solutions":["Provide a non-null IObservable<T> for the twelfth source; use Observable.Empty<TTwelfth>() when the source is intentionally absent.","Validate or coalesce all source arguments before calling Zip.","Fix the initialization/configuration that produced the null twelfth stream.","Use the IEnumerable-based Zip overload when the source count varies.","Catch ArgumentNullException at the composition site and log which positional source was missing."],"exampleFix":"// before\nvar merged = Zip15(s1, ..., s12, s13, s14, s15); // s12 == null\n// after\nvar merged = Zip15(s1, ..., s12 ?? Observable.Empty<T12>(), s13, s14, s15);","handlingStrategy":"validation","validationCode":"if (s12 is null) throw new InvalidOperationException(\"twelfth source not initialized\");","typeGuard":"static bool IsReady(IObservable<T>? s) => s is not null;","tryCatchPattern":"try { merged = Zip15(s1, ..., s15); }\ncatch (ArgumentNullException ex) when (ex.ParamName == \"twelfth\") { merged = Observable.Empty<(T1,...,T15)>(); }","preventionTips":["Gate feature-flagged pipelines so disabled features contribute Observable.Empty.","Initialize all stream variables before composing the query.","Use a builder that validates sources instead of raw positional calls.","Add Debug.Assert(source != null) checks in composition helpers."],"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"}