{"record":{"id":"0963e9cbdf627c3e","repo":"dotnet/reactive","slug":"sixth","errorCode":null,"errorMessage":"sixth","messagePattern":"sixth","errorType":"exception","errorClass":"ArgumentNullException","httpStatus":null,"severity":"error","filePath":"Rx.NET/Source/src/System.Reactive/Linq/QbservableEx.Homoicon.cs","lineNumber":191,"sourceCode":"        /// <param name=\"fifth\">Fifth observable source.</param>\n        /// <param name=\"sixth\">Sixth observable source.</param>\n        /// <returns>An observable sequence containing the result of combining elements of the sources using tuple values.</returns>\n        /// <exception cref=\"ArgumentNullException\">\n        /// <paramref name=\"first\" /> or <paramref name=\"second\" /> or <paramref name=\"third\" /> or <paramref name=\"fourth\" /> or <paramref name=\"fifth\" /> or <paramref name=\"sixth\" /> is null.</exception>\n        public static IQbservable<(TFirst First, TSecond Second, TThird Third, TFourth Fourth, TFifth Fifth, TSixth Sixth)> CombineLatest<TFirst, TSecond, TThird, TFourth, TFifth, TSixth>(this IQbservable<TFirst> first, IObservable<TSecond> second, IObservable<TThird> third, IObservable<TFourth> fourth, IObservable<TFifth> fifth, IObservable<TSixth> sixth)\n        {\n            if (first == null)\n                throw new ArgumentNullException(nameof(first));\n            if (second == null)\n                throw new ArgumentNullException(nameof(second));\n            if (third == null)\n                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\n            return first.Provider.CreateQuery<(TFirst First, TSecond Second, TThird Third, TFourth Fourth, TFifth Fifth, TSixth Sixth)>(\n                Expression.Call(\n                    null,\n                    new Func<IQbservable<TFirst>, IObservable<TSecond>, IObservable<TThird>, IObservable<TFourth>, IObservable<TFifth>, IObservable<TSixth>, IQbservable<(TFirst First, TSecond Second, TThird Third, TFourth Fourth, TFifth Fifth, TSixth Sixth)>>(CombineLatest<TFirst, TSecond, TThird, TFourth, TFifth, TSixth>).Method,\n                    first.Expression,\n                    GetSourceExpression(second),\n                    GetSourceExpression(third),\n                    GetSourceExpression(fourth),\n                    GetSourceExpression(fifth),\n                    GetSourceExpression(sixth)\n                )\n            );\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>","sourceCodeStart":173,"sourceCodeEnd":209,"githubUrl":"https://github.com/dotnet/reactive/blob/94b5d5ab912789f5abe9a72138a25bbd716fe59c/Rx.NET/Source/src/System.Reactive/Linq/QbservableEx.Homoicon.cs#L173-L209","documentation":"System.Reactive throws ArgumentNullException with message \"sixth\" because the six-source CombineLatest overload in QbservableEx.Homoicon.cs requires all six source sequences to be non-null before it builds the MethodCallExpression via first.Provider.CreateQuery; the sixth (last) IObservable argument was null.","triggerScenarios":"Calling CombineLatest(first, second, third, fourth, fifth, sixth) with the sixth argument (IObservable<TSixth>) null.","commonSituations":"The last stream is optional and was passed conditionally (e.g. flag ? stream : null); a params-style helper assembled a list that ran short and a null slipped into the last slot; refactoring added the sixth argument without a corresponding producer.","solutions":["Provide a real IObservable<TSixth> — use Observable.Never<T>() or Observable.Empty<T>() when the sixth source is optional.","Fix the conditional expression to always yield a sequence, e.g. flag ? stream : Observable.Never<T>().","Verify the argument order after refactors so a non-null sequence occupies the sixth slot."],"exampleFix":"// before\nvar combined = first.CombineLatest(second, third, fourth, fifth, enableSixth ? sixthStream : null);\n// after\nvar sixth = enableSixth ? sixthStream : Observable.Never<TSixth>();\nvar combined = first.CombineLatest(second, third, fourth, fifth, sixth);","handlingStrategy":"validation","validationCode":"if (sixth == null) throw new InvalidOperationException(\"sixth source must be a valid IObservable<TSixth>\");\nvar combined = first.CombineLatest(second, third, fourth, fifth, sixth);","typeGuard":"bool IsValidSource<T>(IObservable<T> s) => s is not null;","tryCatchPattern":"try\n{\n    var combined = first.CombineLatest(second, third, fourth, fifth, sixth);\n}\ncatch (ArgumentNullException ex) when (ex.ParamName == \"sixth\")\n{\n    var combined = first.CombineLatest(second, third, fourth, fifth, Observable.Never<TSixth>());\n}","preventionTips":["Replace 'flag ? stream : null' with 'flag ? stream : Observable.Never<T>()'.","Ensure refactors that add arguments also add their producers.","Enable nullable reference types so null-flow into CombineLatest arguments is flagged at compile time."],"tags":["argument-null","rx","qbservable","combine-latest"],"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"}