dotnet/reactive · error · ArgumentNullException
throw new ArgumentNullException(nameof(eleventh))
Error message
throw new ArgumentNullException(nameof(eleventh))
What it means
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.
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.
Example fix
// before CombineLatest(s1,...,s10, eleventh, sel); // eleventh == null // after var eleventh = eleventhSource ?? provider.CreateQuery<T11>(Expression.Constant(Observable.Empty<T11>())); CombineLatest(s1,...,s10, eleventh, sel);
Defensive patterns
Strategy: validation
Validate before calling
if (sources.Length < 11 || sources[10] == null) throw new ArgumentException("eleventh source missing"); Type guard
static bool HasEleventh<T>(T[] sources) => sources.Length >= 11 && sources[10] != null;
Try / catch
try { CombineLatest(..., s11, ...); } catch (ArgumentNullException ex) when (ex.ParamName == "eleventh") { /* supply fallback and retry */ } Prevention
- 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
When it happens
Trigger: Invoking the 11+ argument Qbservable.CombineLatest overload with eleventh == null at line 916 of the guard chain.
Common situations: Optional feature stream not wired up; a dynamically generated source array containing a null at index 10.
Related errors
- fifth
- fourth
- third
- throw new ArgumentNullException(nameof(eighth))
- throw new ArgumentNullException(nameof(fifteenth))
AI-assisted analysis of dotnet/reactive@94b5d5ab91 (2026-09-15).
Data as JSON: /api/errors/5819bda40d6d6709.
Report an issue: GitHub.
Appendix: source
Thrown at Rx.NET/Source/src/System.Reactive/Linq/QbservableEx.Homoicon.cs:916
throw new ArgumentNullException(nameof(second));
if (third == null)
throw new ArgumentNullException(nameof(third));
if (fourth == null)
throw new ArgumentNullException(nameof(fourth));
if (fifth == null)
throw new ArgumentNullException(nameof(fifth));
if (sixth == null)
throw new ArgumentNullException(nameof(sixth));
if (seventh == null)
throw new ArgumentNullException(nameof(seventh));
if (eighth == null)
throw new ArgumentNullException(nameof(eighth));
if (ninth == null)
throw new ArgumentNullException(nameof(ninth));
if (tenth == null)
throw new ArgumentNullException(nameof(tenth));
if (eleventh == null)
throw new ArgumentNullException(nameof(eleventh));
if (twelfth == null)
throw new ArgumentNullException(nameof(twelfth));
if (thirteenth == null)
throw new ArgumentNullException(nameof(thirteenth));
if (fourteenth == null)
throw new ArgumentNullException(nameof(fourteenth));
if (fifteenth == null)
throw new ArgumentNullException(nameof(fifteenth));
if (sixteenth == null)
throw new ArgumentNullException(nameof(sixteenth));
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)>(
Expression.Call(
null,
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,
first.Expression,
GetSourceExpression(second),
GetSourceExpression(third),View on GitHub (pinned to 94b5d5ab91)