{"record":{"id":"ae3f7915d328985d","repo":"dotnet/reactive","slug":"ninth","errorCode":null,"errorMessage":"ninth","messagePattern":"ninth","errorType":"exception","errorClass":"ArgumentNullException","httpStatus":null,"severity":"error","filePath":"Rx.NET/Source/src/System.Reactive/Linq/QbservableEx.Homoicon.cs","lineNumber":359,"sourceCode":"        {\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\n            return first.Provider.CreateQuery<(TFirst First, TSecond Second, TThird Third, TFourth Fourth, TFifth Fifth, TSixth Sixth, TSeventh Seventh, TEighth Eighth, TNinth Ninth)>(\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>, IQbservable<(TFirst First, TSecond Second, TThird Third, TFourth Fourth, TFifth Fifth, TSixth Sixth, TSeventh Seventh, TEighth Eighth, TNinth Ninth)>>(CombineLatest<TFirst, TSecond, TThird, TFourth, TFifth, TSixth, TSeventh, TEighth, TNinth>).Method,\n                    first.Expression,\n                    GetSourceExpression(second),\n                    GetSourceExpression(third),\n                    GetSourceExpression(fourth),\n                    GetSourceExpression(fifth),\n                    GetSourceExpression(sixth),\n                    GetSourceExpression(seventh),\n                    GetSourceExpression(eighth),\n                    GetSourceExpression(ninth)\n                )\n            );\n        }\n","sourceCodeStart":341,"sourceCodeEnd":377,"githubUrl":"https://github.com/dotnet/reactive/blob/94b5d5ab912789f5abe9a72138a25bbd716fe59c/Rx.NET/Source/src/System.Reactive/Linq/QbservableEx.Homoicon.cs#L341-L377","documentation":"This ArgumentNullException is thrown by the Qbservable.CombineLatest 9-source overload when the ninth source sequence (ninth) is null. It is the last guard in the method; the throw fires synchronously at composition time, before any subscription occurs.","triggerScenarios":"Calling CombineLatest(first, second, third, fourth, fifth, sixth, seventh, eighth, ninth) with ninth == null, commonly when the ninth stream comes from a late-bound service, config-driven factory, or conditional expression returning null.","commonSituations":"Typical when a newly added source (e.g. an analytics or audit stream) is disabled by configuration and the code still passes the (null) stream reference into the composition.","solutions":["Pass a non-null IObservable<TNinth> as the ninth argument","Substitute Observable.Empty<TNinth>() or Observable.Never<TNinth>() when the source is optional","Ensure the factory/config path that supplies the ninth stream returns a valid sequence","Catch ArgumentNullException and inspect ParamName to identify which source was null"],"exampleFix":"// before\nvar q = q1.CombineLatest(o2, o3, o4, o5, o6, o7, o8, GetNinth()); // GetNinth() == null\n// after\nvar ninth = GetNinth() ?? Observable.Empty<TNinth>();\nvar q = q1.CombineLatest(o2, o3, o4, o5, o6, o7, o8, ninth);","handlingStrategy":"validation","validationCode":"if (ninth is null)\n    throw new ArgumentException(\"ninth source must be non-null\");","typeGuard":"static bool IsLive<T>(IObservable<T>? s) => s is not null;","tryCatchPattern":"try\n{\n    var q = q1.CombineLatest(o2, o3, o4, o5, o6, o7, o8, ninth);\n}\ncatch (ArgumentNullException ex) when (ex.ParamName == \"ninth\")\n{\n    logger.LogError(ex, \"ninth source of CombineLatest is null\");\n}","preventionTips":["Gate config-disabled sources behind Observable.Empty<TNinth>() rather than null references","Validate all nine sources in a single guard helper before composition","Write unit tests exercising every combination of enabled/disabled sources","Treat null streams as bugs: enforce non-null stream contracts with nullable reference types"],"tags":["csharp","rx","argument-null","reactive-extensions"],"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"}