{"record":{"id":"75789022dd510a0b","repo":"dotnet/reactive","slug":"seventh","errorCode":null,"errorMessage":"seventh","messagePattern":"seventh","errorType":"exception","errorClass":"ArgumentNullException","httpStatus":null,"severity":"error","filePath":"Rx.NET/Source/src/System.Reactive/Linq/QbservableEx.Homoicon.cs","lineNumber":242,"sourceCode":"        /// <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\" /> or <paramref name=\"seventh\" /> is null.</exception>\n        public static IQbservable<(TFirst First, TSecond Second, TThird Third, TFourth Fourth, TFifth Fifth, TSixth Sixth, TSeventh Seventh)> CombineLatest<TFirst, TSecond, TThird, TFourth, TFifth, TSixth, TSeventh>(this IQbservable<TFirst> first, IObservable<TSecond> second, IObservable<TThird> third, IObservable<TFourth> fourth, IObservable<TFifth> fifth, IObservable<TSixth> sixth, IObservable<TSeventh> seventh)\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            if (seventh == null)\n                throw new ArgumentNullException(nameof(seventh));\n\n            return first.Provider.CreateQuery<(TFirst First, TSecond Second, TThird Third, TFourth Fourth, TFifth Fifth, TSixth Sixth, TSeventh Seventh)>(\n                Expression.Call(\n                    null,\n                    new Func<IQbservable<TFirst>, IObservable<TSecond>, IObservable<TThird>, IObservable<TFourth>, IObservable<TFifth>, IObservable<TSixth>, IObservable<TSeventh>, IQbservable<(TFirst First, TSecond Second, TThird Third, TFourth Fourth, TFifth Fifth, TSixth Sixth, TSeventh Seventh)>>(CombineLatest<TFirst, TSecond, TThird, TFourth, TFifth, TSixth, TSeventh>).Method,\n                    first.Expression,\n                    GetSourceExpression(second),\n                    GetSourceExpression(third),\n                    GetSourceExpression(fourth),\n                    GetSourceExpression(fifth),\n                    GetSourceExpression(sixth),\n                    GetSourceExpression(seventh)\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.","sourceCodeStart":224,"sourceCodeEnd":260,"githubUrl":"https://github.com/dotnet/reactive/blob/94b5d5ab912789f5abe9a72138a25bbd716fe59c/Rx.NET/Source/src/System.Reactive/Linq/QbservableEx.Homoicon.cs#L224-L260","documentation":"The 7-source Qbservable.CombineLatest overload throws ArgumentNullException with ParamName \"seventh\" because the seventh source sequence is null. Rx performs eager argument validation on all seven sources before building the Expression.Call query, so this fails synchronously rather than on subscription.","triggerScenarios":"Calling the 7-source IQbservable CombineLatest tuple overload with a null seventh IObservable<TSeventh> argument, e.g. the last stream of a seven-way merge was never constructed or a factory returned null.","commonSituations":"Composing telemetry/UI/timer streams where the seventh stream comes from an optional service; refactors that grew the pipeline from six to seven sources and forgot to initialize the new one.","solutions":["Supply a valid seventh sequence; use Observable.Empty<TSeventh>() if there is genuinely no data","Fix the producer of the seventh source so it never returns null","Guard all arguments with null checks before invoking CombineLatest"],"exampleFix":"// before\nCombineLatest(q1, s2, s3, s4, s5, s6, seventh); // seventh == null\n// after\nvar seventh = source7 ?? Observable.Empty<SeventhType>();\nCombineLatest(q1, s2, s3, s4, s5, s6, seventh);","handlingStrategy":"validation","validationCode":"if (seventh == null) seventh = Observable.Empty<TSeventh>();","typeGuard":"static IObservable<T> OrEmpty<T>(IObservable<T>? s) => s ?? Observable.Empty<T>();","tryCatchPattern":"try { var q = Qbservable.CombineLatest(first, second, third, fourth, fifth, sixth, seventh); }\ncatch (ArgumentNullException ex) when (ex.ParamName == \"seventh\") { /* substitute an empty seventh source */ }","preventionTips":["Wrap every potentially-null source with an OrEmpty helper before composition","Avoid returning null from stream factories — throw or return empty","Review argument lists of wide CombineLatest calls during refactors"],"tags":["csharp","rx","null-argument","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-23T08:17:48.524Z"}