dotnet/reactive · error · ArgumentNullException
source7
Error message
source7
What it means
The 14-source Zip overload validates source7 at line 883; a null seventh sequence throws ArgumentNullException with parameter 'source7'. The public method checks inputs sequentially so the exception names exactly the offending parameter.
Solutions
- Provide a valid observable for position 7; use Observable.Empty<TSource7>() when intentionally absent.
- Fix the upstream producer that returned null for source7.
- Add a guard loop or explicit checks over the source array before calling Zip.
- Verify the 14-source call's argument order.
Example fix
// before var zipped = Observable.Zip(s1, ..., s6, null, s8, ..., s14, selector); // after var zipped = Observable.Zip(s1, ..., s6, s7 ?? Observable.Empty<TSource7>(), s8, ..., s14, selector);
Defensive patterns
Strategy: validation
Validate before calling
if (source7 == null) throw new ArgumentNullException(nameof(source7));
Type guard
static IObservable<T> NonNull<T>(IObservable<T> s) => s ?? Observable.Empty<T>();
Try / catch
try { var zipped = Observable.Zip(source1, ..., source7, ...); } catch (ArgumentNullException ex) when (ex.ParamName == "source7") { /* substitute default source or abort */ } Prevention
- Use Observable.Empty<T>() as a placeholder for absent middle streams.
- Guard conditional stream construction so every branch returns an observable.
- Validate the full source array for nulls before zipping.
When it happens
Trigger: Calling the 14-argument Observable.Zip with null as the seventh IObservable<TSource7> argument.
Common situations: A missing middle feed in a batch of streams (e.g. one sensor/service stream failed to initialize), or a null returned from a conditional stream-construction branch.
Related errors
AI-assisted analysis of dotnet/reactive@94b5d5ab91 (2026-09-15).
Data as JSON: /api/errors/83754d58f911b360.
Report an issue: GitHub.
Appendix: source
Thrown at Rx.NET/Source/src/System.Reactive/Linq/Observable.Multiple.Zip.cs:883
if (source4 == null)
{
throw new ArgumentNullException(nameof(source4));
}
if (source5 == null)
{
throw new ArgumentNullException(nameof(source5));
}
if (source6 == null)
{
throw new ArgumentNullException(nameof(source6));
}
if (source7 == null)
{
throw new ArgumentNullException(nameof(source7));
}
if (source8 == null)
{
throw new ArgumentNullException(nameof(source8));
}
if (source9 == null)
{
throw new ArgumentNullException(nameof(source9));
}
if (source10 == null)
{
throw new ArgumentNullException(nameof(source10));
}
if (source11 == null)View on GitHub (pinned to 94b5d5ab91)