{"record":{"id":"1f0e2d19504591f4","repo":"dotnet/reactive","slug":"throw-new-argumentnullexception-nameof-thirteenth","errorCode":null,"errorMessage":"throw new ArgumentNullException(nameof(thirteenth))","messagePattern":"throw new ArgumentNullException\\(nameof\\(thirteenth\\)\\)","errorType":"exception","errorClass":"ArgumentNullException","httpStatus":null,"severity":"error","filePath":"Rx.NET/Source/src/System.Reactive/Linq/QbservableEx.Homoicon.cs","lineNumber":920,"sourceCode":"                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),\n                    GetSourceExpression(fourth),\n                    GetSourceExpression(fifth),\n                    GetSourceExpression(sixth),\n                    GetSourceExpression(seventh),","sourceCodeStart":902,"sourceCodeEnd":938,"githubUrl":"https://github.com/dotnet/reactive/blob/94b5d5ab912789f5abe9a72138a25bbd716fe59c/Rx.NET/Source/src/System.Reactive/Linq/QbservableEx.Homoicon.cs#L902-L938","documentation":"System.ArgumentNullException raised by the null-guard for the thirteenth source in a CombineLatest overload in QbservableEx.Homoicon.cs. The guard chain runs in argument order and failed at thirteenth == null before any query expression was created.","triggerScenarios":"Invoking the 13+ argument Qbservable.CombineLatest overload with thirteenth == null at line 920 of the guard chain.","commonSituations":"A stream added during refactoring was declared but never assigned; a remote provider source failed to resolve.","solutions":["Assign or resolve a real thirteenth IQbservable source before the call.","Use an empty placeholder stream for optional sources.","Trace the thirteenth argument's producer and fix the null return.","Add a pre-call null assertion covering every source."],"exampleFix":"// before\nCombineLatest(s1,...,s12, thirteenth, sel); // thirteenth == null\n// after\nthirteenth ??= provider.CreateQuery<T13>(Expression.Constant(Observable.Empty<T13>()));\nCombineLatest(s1,...,s12, thirteenth, sel);","handlingStrategy":"validation","validationCode":"if (s13 == null) throw new ArgumentException(\"thirteenth source must be provided\", nameof(s13));","typeGuard":"static bool IsNonNullSource<T>(IQbservable<T> s) => s != null;","tryCatchPattern":"try { CombineLatest(..., s13, ...); } catch (ArgumentNullException ex) when (ex.ParamName == \"thirteenth\") { /* log missing stream, retry with default */ }","preventionTips":["Assign every declared stream before composing","Fix providers that resolve null for remote sources","Use staged combining to keep arities small","Assert full source list before the call"],"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"}