{"record":{"id":"5819bda40d6d6709","repo":"dotnet/reactive","slug":"throw-new-argumentnullexception-nameof-eleventh","errorCode":null,"errorMessage":"throw new ArgumentNullException(nameof(eleventh))","messagePattern":"throw new ArgumentNullException\\(nameof\\(eleventh\\)\\)","errorType":"exception","errorClass":"ArgumentNullException","httpStatus":null,"severity":"error","filePath":"Rx.NET/Source/src/System.Reactive/Linq/QbservableEx.Homoicon.cs","lineNumber":916,"sourceCode":"                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)>(\n                Expression.Call(\n                    null,\n                    new Func<IQbservable<TFirst>, IObservable<TSecond>, IObservable<TThird>, IObservable<TFourth>, IObservable<TFifth>, IObservable<TSixth>, IObservable<TSeventh>, IObservable<TEighth>, IObservable<TNinth>, IObservable<TTenth>, IObservable<TEleventh>, IObservable<TTwelfth>, IObservable<TThirteenth>, IObservable<TFourteenth>, IObservable<TFifteenth>, IObservable<TSixteenth>, 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>).Method,\n                    first.Expression,\n                    GetSourceExpression(second),\n                    GetSourceExpression(third),","sourceCodeStart":898,"sourceCodeEnd":934,"githubUrl":"https://github.com/dotnet/reactive/blob/94b5d5ab912789f5abe9a72138a25bbd716fe59c/Rx.NET/Source/src/System.Reactive/Linq/QbservableEx.Homoicon.cs#L898-L934","documentation":"System.ArgumentNullException raised by the null-guard for the eleventh source in a CombineLatest overload in QbservableEx.Homoicon.cs. The overload validates all sources before calling Provider.CreateQuery so a null eleventh argument aborts composition.","triggerScenarios":"Invoking the 11+ argument Qbservable.CombineLatest overload with eleventh == null at line 916 of the guard chain.","commonSituations":"Optional feature stream not wired up; a dynamically generated source array containing a null at index 10.","solutions":["Pass a non-null eleventh IQbservable source.","Default missing optional streams to empty sequences.","Verify the DI registration or factory producing the eleventh stream.","Validate the whole source collection for nulls before composing."],"exampleFix":"// before\nCombineLatest(s1,...,s10, eleventh, sel); // eleventh == null\n// after\nvar eleventh = eleventhSource ?? provider.CreateQuery<T11>(Expression.Constant(Observable.Empty<T11>()));\nCombineLatest(s1,...,s10, eleventh, sel);","handlingStrategy":"validation","validationCode":"if (sources.Length < 11 || sources[10] == null) throw new ArgumentException(\"eleventh source missing\");","typeGuard":"static bool HasEleventh<T>(T[] sources) => sources.Length >= 11 && sources[10] != null;","tryCatchPattern":"try { CombineLatest(..., s11, ...); } catch (ArgumentNullException ex) when (ex.ParamName == \"eleventh\") { /* supply fallback and retry */ }","preventionTips":["Validate dynamically generated source arrays for nulls","Ensure optional feature streams always produce a default","Check DI/plugin initialization order","Add integration tests for full-arity compositions"],"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-23T08:17:48.524Z"}