{"record":{"id":"02e271a650a95331","repo":"dotnet/reactive","slug":"throw-new-argumentnullexception-nameof-eighth","errorCode":null,"errorMessage":"throw new ArgumentNullException(nameof(eighth))","messagePattern":"throw new ArgumentNullException\\(nameof\\(eighth\\)\\)","errorType":"exception","errorClass":"ArgumentNullException","httpStatus":null,"severity":"error","filePath":"Rx.NET/Source/src/System.Reactive/Linq/QbservableEx.Homoicon.cs","lineNumber":910,"sourceCode":"        /// <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\" /> or <paramref name=\"eighth\" /> or <paramref name=\"ninth\" /> or <paramref name=\"tenth\" /> or <paramref name=\"eleventh\" /> or <paramref name=\"twelfth\" /> or <paramref name=\"thirteenth\" /> or <paramref name=\"fourteenth\" /> or <paramref name=\"fifteenth\" /> or <paramref name=\"sixteenth\" /> is null.</exception>\n        public static IQbservable<(TFirst First, TSecond Second, TThird Third, TFourth Fourth, TFifth Fifth, TSixth Sixth, TSeventh Seventh, TEighth Eighth, TNinth Ninth, TTenth Tenth, TEleventh Eleventh, TTwelfth Twelfth, TThirteenth Thirteenth, TFourteenth Fourteenth, TFifteenth Fifteenth, TSixteenth Sixteenth)> CombineLatest<TFirst, TSecond, TThird, TFourth, TFifth, TSixth, TSeventh, TEighth, TNinth, TTenth, TEleventh, TTwelfth, TThirteenth, TFourteenth, TFifteenth, TSixteenth>(this IQbservable<TFirst> first, IObservable<TSecond> second, IObservable<TThird> third, IObservable<TFourth> fourth, IObservable<TFifth> fifth, IObservable<TSixth> sixth, IObservable<TSeventh> seventh, IObservable<TEighth> eighth, IObservable<TNinth> ninth, IObservable<TTenth> tenth, IObservable<TEleventh> eleventh, IObservable<TTwelfth> twelfth, IObservable<TThirteenth> thirteenth, IObservable<TFourteenth> fourteenth, IObservable<TFifteenth> fifteenth, IObservable<TSixteenth> sixteenth)\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            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            if (sixteenth == null)\n                throw new ArgumentNullException(nameof(sixteenth));\n\n            return first.Provider.CreateQuery<(TFirst First, TSecond Second, TThird Third, TFourth Fourth, TFifth Fifth, TSixth Sixth, TSeventh Seventh, TEighth Eighth, TNinth Ninth, TTenth Tenth, TEleventh Eleventh, TTwelfth Twelfth, TThirteenth Thirteenth, TFourteenth Fourteenth, TFifteenth Fifteenth, TSixteenth Sixteenth)>(","sourceCodeStart":892,"sourceCodeEnd":928,"githubUrl":"https://github.com/dotnet/reactive/blob/94b5d5ab912789f5abe9a72138a25bbd716fe59c/Rx.NET/Source/src/System.Reactive/Linq/QbservableEx.Homoicon.cs#L892-L928","documentation":"System.ArgumentNullException raised by the null-guard for the eighth source in a CombineLatest overload in QbservableEx.Homoicon.cs. The method eagerly checks every source argument so the query provider receives only valid IQbservable nodes when the expression tree is built.","triggerScenarios":"Invoking the 8+ argument Qbservable.CombineLatest overload with eighth == null at line 910 of the guard chain.","commonSituations":"Building long source lists programmatically with an array/spread where one element is null; an event-stream wrapper that is only initialized after CombineLatest is called.","solutions":["Initialize or obtain the eighth observable before composing the query.","Substitute a placeholder source (empty sequence) when the eighth stream is optional.","Check whether sources are assembled from a collection and ensure no element is null before invoking.","Reorder or consolidate sources using Scan/Zip chains to avoid 16-argument overloads where slots are easy to miss."],"exampleFix":"// before\nCombineLatest(a, b, c, d, e, f, g, sources[7], sel); // sources[7] == null\n// after\nif (sources.Any(s => s == null)) throw new InvalidOperationException(\"all sources must be set\");\nCombineLatest(a, b, c, d, e, f, g, sources[7], sel);","handlingStrategy":"validation","validationCode":"var args = new IQbservable<object>[] { a,b,c,d,e,f,g,h }; if (args.Any(s => s == null)) throw new ArgumentException(\"null source in CombineLatest arguments\");","typeGuard":"static bool AllSet(IQbservable<object>[] sources) => sources.All(s => s != null);","tryCatchPattern":"try { CombineLatest(...); } catch (ArgumentNullException ex) when (ex.ParamName == \"eighth\") { /* fix source assembly, retry */ }","preventionTips":["Assemble sources in collections and validate before spreading into the call","Never use null as a placeholder for an unused source slot","Initialize event-stream wrappers before query construction","Prefer grouped combine chains over 8+ arity overloads"],"tags":["argumentnull","qbservable","combinelatest"],"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"}