{"record":{"id":"9702810cf5cd8ce9","repo":"dotnet/reactive","slug":"value-cannot-be-null-parameter-fourteenth","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/Observable.Multiple.CombineLatest.cs","lineNumber":1754,"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 s_impl.CombineLatest(first, second, third, fourth, fifth, sixth, seventh, eighth, ninth, tenth, eleventh, twelfth, thirteenth, fourteenth);\n        }\n\n        /// <summary>\n        /// Merges the specified observable sequences into one observable sequence of tuple values whenever any of the observable sequences produces an element.\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>\n        /// <typeparam name=\"TEighth\">The type of the elements in the eighth source sequence.</typeparam>\n        /// <typeparam name=\"TNinth\">The type of the elements in the ninth source sequence.</typeparam>\n        /// <typeparam name=\"TTenth\">The type of the elements in the tenth source sequence.</typeparam>\n        /// <typeparam name=\"TEleventh\">The type of the elements in the eleventh source sequence.</typeparam>","sourceCodeStart":1736,"sourceCodeEnd":1772,"githubUrl":"https://github.com/dotnet/reactive/blob/94b5d5ab912789f5abe9a72138a25bbd716fe59c/Rx.NET/Source/src/System.Reactive/Linq/Observable.Multiple.CombineLatest.cs#L1736-L1772","documentation":"System.Reactive's CombineLatest overload for 14 observable sequences validates every source argument upfront and throws ArgumentNullException when any of them is null. Reactive operators cannot subscribe to a null sequence, so they fail fast at call time rather than producing a broken observable. This particular overload is the 14-source tuple-producing variant (all 14 sources are combined into a named tuple whenever any produces an element).","triggerScenarios":"Calling Observable.CombineLatest(first, ..., fourteenth) with a null fourteenth argument (the fourteenth IObservable<T> source), e.g. a factory method returning null or an uninitialized field passed as the last of 14 sources.","commonSituations":"Passing the result of a method that returns null instead of Observable.Empty or Observable.Throw; a dictionary lookup for the 14th stream that missed; nullable reference fields in legacy code that were never checked before composing queries.","solutions":["Ensure the fourteenth argument is a non-null IObservable; if data may be absent, use Observable.Empty<TResult>() or Observable.Return(default) instead of null.","Null-check all 14 sources before composing the query (assert or throw with a meaningful message of your own).","Enable nullable reference types (C# 8 <Nullable>enable</Nullable>) so the compiler flags passing possibly-null observables to this API."],"exampleFix":"// before\nvar combined = Observable.CombineLatest(s1, s2, s3, s4, s5, s6, s7, s8, s9, s10, s11, s12, s13, s14);\n// where s14 may be null\n// after\nIObservable<int> s14Safe = s14 ?? Observable.Empty<int>();\nvar combined = Observable.CombineLatest(s1, s2, s3, s4, s5, s6, s7, s8, s9, s10, s11, s12, s13, s14Safe);","handlingStrategy":"validation","validationCode":"if (s1 == null || s2 == null || s3 == null || s4 == null || s5 == null || s6 == null || s7 == null || s8 == null || s9 == null || s10 == null || s11 == null || s12 == null || s13 == null || s14 == null)\n    throw new InvalidOperationException(\"All 14 CombineLatest sources must be non-null\");","typeGuard":"static bool IsUsableSource<T>(IObservable<T> source) => source is IObservable<T>;","tryCatchPattern":"try\n{\n    var combined = Observable.CombineLatest(s1, s2, s3, s4, s5, s6, s7, s8, s9, s10, s11, s12, s13, s14);\n}\ncatch (ArgumentNullException ex) when (ex.ParamName == \"fourteenth\")\n{\n    logger.LogError(ex, \"14th source stream was null\");\n}","preventionTips":["Never return null from methods typed IObservable<T>; return Observable.Empty<T>() instead","Enable C# nullable reference types so null-passing is a compile-time warning","Guard all sources once in a helper before composing many-source queries"],"tags":["rx","null-argument","observable","argumentnull"],"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"}