dotnet/reactive · error · ArgumentNullException
sixteenth
Error message
sixteenth
What it means
The 16-argument QbservableEx.Zip throws ArgumentNullException because the parameter 'sixteenth' (the sixteenth source observable sequence) was null. Argument validation runs eagerly on the client so malformed queries never reach the provider.
Solutions
- Provide a valid (or Observable.Empty) sixteenth source before calling Zip
- Validate all 16 arguments for null before the call
- Fix the upstream code that returned a null sequence
Example fix
// before var q = first.Zip(s2, s3, s4, s5, s6, s7, s8, s9, s10, s11, s12, s13, s14, s15, s16); // s16 null // after var s16 = GetSixteenth() ?? Observable.Empty<TSixteenth>(); var q = first.Zip(s2, s3, s4, s5, s6, s7, s8, s9, s10, s11, s12, s13, s14, s15, s16);
Defensive patterns
Strategy: validation
Validate before calling
if (sixteenth == null) throw new ArgumentException(nameof(sixteenth));
Type guard
static bool IsSource<T>(IObservable<T> s) => s != null;
Try / catch
try { var q = first.Zip(...); } catch (ArgumentNullException ex) { Console.Error.WriteLine($"Missing Zip source: {ex.ParamName}"); } Prevention
- Initialize all stream variables at declaration
- Use ?? Observable.Empty<TSixteenth>() fallbacks
- Fix DI/factory registrations so no source resolves to null
When it happens
Trigger: Calling the 16-way Zip overload with the sixteenth argument (an IObservable<TSixteenth>) set to null.
Common situations: The last stream in a long argument list is commonly the one forgotten during refactors; a stream that was conditionally created ended up null; DI container returned null for one dependency.
Related errors
- fifteenth
- fourteenth
- Value cannot be null. (Parameter 'fourteenth')
- source15
- throw new ArgumentNullException(nameof(first))
AI-assisted analysis of dotnet/reactive@94b5d5ab91 (2026-09-15).
Data as JSON: /api/errors/2be37fd4fc95de77.
Report an issue: GitHub.
Appendix: source
Thrown at Rx.NET/Source/src/System.Reactive/Linq/QbservableEx.Homoicon.cs:2202
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)>>(Zip<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),
GetSourceExpression(twelfth),
GetSourceExpression(thirteenth),View on GitHub (pinned to 94b5d5ab91)