{"record":{"id":"bc60f4cf901ec976","repo":"dotnet/reactive","slug":"value-cannot-be-null-parameter-eleventh-qbservableex","errorCode":null,"errorMessage":"Value cannot be null. (Parameter 'eleventh')","messagePattern":"Value cannot be null\\. \\(Parameter 'eleventh'\\)","errorType":"validation","errorClass":"ArgumentNullException","httpStatus":null,"severity":"error","filePath":"Rx.NET/Source/src/System.Reactive/Linq/QbservableEx.Homoicon.cs","lineNumber":496,"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\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)>(\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>, IQbservable<(TFirst First, TSecond Second, TThird Third, TFourth Fourth, TFifth Fifth, TSixth Sixth, TSeventh Seventh, TEighth Eighth, TNinth Ninth, TTenth Tenth, TEleventh Eleventh)>>(CombineLatest<TFirst, TSecond, TThird, TFourth, TFifth, TSixth, TSeventh, TEighth, TNinth, TTenth, TEleventh>).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                    GetSourceExpression(tenth),\n                    GetSourceExpression(eleventh)\n                )\n            );","sourceCodeStart":478,"sourceCodeEnd":514,"githubUrl":"https://github.com/dotnet/reactive/blob/94b5d5ab912789f5abe9a72138a25bbd716fe59c/Rx.NET/Source/src/System.Reactive/Linq/QbservableEx.Homoicon.cs#L478-L514","documentation":"The 11-source CombineLatest overload for IQbservable sequences (System.Reactive/Linq/QbservableEx.Homoicon.cs:496) validates every source argument up front and throws ArgumentNullException when the eleventh IObservable<TEleventh> is null. Qbservable expression trees must be built from non-null source expressions because the provider serializes the whole call into an Expression.Call, so null sources are rejected eagerly rather than failing later during subscription.","triggerScenarios":"Calling the public static CombineLatest<TFirst..TEleventh>(this IQbservable<TFirst> first, IObservable<TSecond> second, ..., IObservable<TEleventh> eleventh) extension with a null eleventh argument, e.g. when the last sequence is the result of a lookup or a conditional expression that evaluated to null.","commonSituations":"A helper method returns null instead of Observable.Empty or a Qbservable provider's default; a dictionary/config-driven source lookup misses a key; chaining results where an earlier query returned null instead of throwing.","solutions":["Check which argument position is null at the call site (Parameter 'eleventh' = the 11th argument) and fix the expression producing it.","Replace the null with a non-null sequence such as Observable.Empty<TEleventh>() or a default source from your IQbservableProvider.","Wrap the source-producing logic so it throws early with a meaningful message instead of returning null.","Add a Debug.Assert / guard in your own helper that builds the CombineLatest call."],"exampleFix":"// before\nvar result = q1.CombineLatest(q2, ..., q10, GetSource()); // GetSource() returned null\n// after\nvar src = GetSource() ?? QueryableEx.Empty<TEleventh>(provider);\nvar result = q1.CombineLatest(q2, ..., q10, src);","handlingStrategy":"validation","validationCode":"if (eleventh == null) throw new InvalidOperationException(\"eleventh source must be a non-null IObservable<TEleventh>\");\nvar result = q1.CombineLatest(q2, q3, q4, q5, q6, q7, q8, q9, q10, q11, eleventh);","typeGuard":"static bool IsNonNullSource<T>(IObservable<T> s) => s is not null;","tryCatchPattern":"try { var merged = first.CombineLatest(..., eleventh); }\ncatch (ArgumentNullException ex) when (ex.ParamName == \"eleventh\") { log.Error(\"11th CombineLatest source is null\"); throw; }","preventionTips":["Never return null from methods that produce observables - return Observable.Empty instead.","Validate all source arguments in your own composition helpers before delegating to Rx operators.","Keep CombineLatest argument counts small; prefer combining collections or nested calls.","Enable nullable reference types (<Nullable>enable</Nullable>) so null sources are caught at compile time."],"tags":["rx","null-reference","argument-validation","qbservable"],"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"}