{"record":{"id":"87f338492bced917","repo":"dotnet/reactive","slug":"value-cannot-be-null-parameter-source15-observable-multiple","errorCode":null,"errorMessage":"Value cannot be null. (Parameter 'source15')","messagePattern":"Value cannot be null\\. \\(Parameter 'source15'\\)","errorType":"validation","errorClass":"ArgumentNullException","httpStatus":null,"severity":"error","filePath":"Rx.NET/Source/src/System.Reactive/Linq/Observable.Multiple.CombineLatest.cs","lineNumber":1053,"sourceCode":"\n            if (source12 == null)\n            {\n                throw new ArgumentNullException(nameof(source12));\n            }\n\n            if (source13 == null)\n            {\n                throw new ArgumentNullException(nameof(source13));\n            }\n\n            if (source14 == null)\n            {\n                throw new ArgumentNullException(nameof(source14));\n            }\n\n            if (source15 == null)\n            {\n                throw new ArgumentNullException(nameof(source15));\n            }\n\n            if (resultSelector == null)\n            {\n                throw new ArgumentNullException(nameof(resultSelector));\n            }\n\n            return s_impl.CombineLatest(source1, source2, source3, source4, source5, source6, source7, source8, source9, source10, source11, source12, source13, source14, source15, resultSelector);\n        }\n\n        /// <summary>\n        /// Merges the specified observable sequences into one observable sequence by using the selector function whenever any of the observable sequences produces an element.\n        /// </summary>\n        /// <typeparam name=\"TSource1\">The type of the elements in the first source sequence.</typeparam>\n        /// <typeparam name=\"TSource2\">The type of the elements in the second source sequence.</typeparam>\n        /// <typeparam name=\"TSource3\">The type of the elements in the third source sequence.</typeparam>\n        /// <typeparam name=\"TSource4\">The type of the elements in the fourth source sequence.</typeparam>\n        /// <typeparam name=\"TSource5\">The type of the elements in the fifth source sequence.</typeparam>","sourceCodeStart":1035,"sourceCodeEnd":1071,"githubUrl":"https://github.com/dotnet/reactive/blob/94b5d5ab912789f5abe9a72138a25bbd716fe59c/Rx.NET/Source/src/System.Reactive/Linq/Observable.Multiple.CombineLatest.cs#L1035-L1071","documentation":"The 15-way CombineLatest overload validates every source; this message indicates source15 (the fifteenth input) was null at operator assembly. Fix: check all fifteen arguments; the null one is the fifteenth observable.","triggerScenarios":"Calling public Observable.CombineLatest(source1..source15, resultSelector) with null as the source15 argument.","commonSituations":"Trailing argument left null in a manually extended call; a completion/teardown stream that's null before shutdown logic runs; last argument mistakenly left off and a null shifted into position 15.","solutions":["Pass a non-null observable for source15 or default to Observable.Empty<T15>()/Never<T15>().","Fix the code path that should produce the 15th stream.","Recount arguments: with 15 positional sources it is easy to misalign by one, pushing null into the last slot.","Consider restructuring into fewer combined observables for maintainability."],"exampleFix":"// before\nCombineLatest(s1..s14, doneStream, sel) // doneStream null\n// after\nvar s15 = doneStream ?? Observable.Never<T15>();\nCombineLatest(s1..s14, s15, sel);","handlingStrategy":"validation","validationCode":"if (source15 == null) source15 = Observable.Empty<T15>();\nSystem.Diagnostics.Debug.Assert(source15 != null, \"source15 must be provided\");","typeGuard":"bool IsPresent<T>(IObservable<T> o) => o is not null;","tryCatchPattern":"try { return Observable.CombineLatest(s1, s2, s3, s4, s5, s6, s7, s8, s9, s10, s11, s12, s13, s14, s15, selector); }\ncatch (ArgumentNullException ex) when (ex.ParamName == \"source15\") { log.Error(\"source15 observable was null\"); throw; }","preventionTips":["When extending to 15 sources, recount arguments rather than assuming alignment","Trailing lifecycle streams should default to Observable.Never when unused","Consider replacing very wide CombineLatest with staged composition for readability"],"tags":["reactive-extensions","null-argument","combinelatest","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"}