dotnet/reactive · error · ArgumentNullException

throw new ArgumentNullException(nameof(fifteenth))

Error message

throw new ArgumentNullException(nameof(fifteenth))

What it means

System.ArgumentNullException raised by the null-guard for the fifteenth source in a CombineLatest overload in QbservableEx.Homoicon.cs. This 16-source overload checks each argument in order and failed because the fifteenth source was null, so the remote query expression was never constructed.

Solutions

  1. Supply a non-null fifteenth IQbservable source.
  2. Default optional fifteenth stream to an empty sequence through the provider.
  3. Fix the registry/config lookup so it returns a valid stream.
  4. Split the composition into smaller grouped CombineLatest calls to reduce error-prone argument lists.

Example fix

// before
CombineLatest(s1,...,s14, fifteenth, sel); // fifteenth == null
// after
fifteenth ??= provider.CreateQuery<T15>(Expression.Constant(Observable.Empty<T15>()));
CombineLatest(s1,...,s14, fifteenth, sel);
Defensive patterns

Strategy: validation

Validate before calling

if (s15 == null) s15 = provider.CreateQuery<T15>(Expression.Constant(Observable.Empty<T15>()));

Type guard

static bool IsNonNullSource<T>(IQbservable<T> s) => s != null;

Try / catch

try { CombineLatest(..., s15, ...); } catch (ArgumentNullException ex) when (ex.ParamName == "fifteenth") { /* supply default and retry */ }

Prevention

When it happens

Trigger: Invoking the 15+ argument Qbservable.CombineLatest overload with fifteenth == null at line 924 of the guard chain.

Common situations: Fifteenth stream of an extreme-arity query is optional and unassigned; config-driven stream registry lacks an entry so the lookup returns null.

Related errors


AI-assisted analysis of dotnet/reactive@94b5d5ab91 (2026-09-15). Data as JSON: /api/errors/9deb30b742192c72. Report an issue: GitHub.

Appendix: source

Thrown at Rx.NET/Source/src/System.Reactive/Linq/QbservableEx.Homoicon.cs:924

                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),
                    GetSourceExpression(fourth),
                    GetSourceExpression(fifth),
                    GetSourceExpression(sixth),
                    GetSourceExpression(seventh),
                    GetSourceExpression(eighth),
                    GetSourceExpression(ninth),
                    GetSourceExpression(tenth),
                    GetSourceExpression(eleventh),

View on GitHub (pinned to 94b5d5ab91)