{"record":{"id":"26b2690a60b1fb4b","repo":"dotnet/reactive","slug":"source11","errorCode":null,"errorMessage":"source11","messagePattern":"source11","errorType":"validation","errorClass":"ArgumentNullException","httpStatus":null,"severity":"error","filePath":"Rx.NET/Source/src/System.Reactive/Linq/Observable.Multiple.Zip.cs","lineNumber":903,"sourceCode":"\n            if (source8 == null)\n            {\n                throw new ArgumentNullException(nameof(source8));\n            }\n\n            if (source9 == null)\n            {\n                throw new ArgumentNullException(nameof(source9));\n            }\n\n            if (source10 == null)\n            {\n                throw new ArgumentNullException(nameof(source10));\n            }\n\n            if (source11 == null)\n            {\n                throw new ArgumentNullException(nameof(source11));\n            }\n\n            if (source12 == null)\n            {\n                throw new ArgumentNullException(nameof(source12));\n            }\n\n            if (source13 == null)\n            {\n                throw new ArgumentNullException(nameof(source13));\n            }\n\n            if (source14 == null)\n            {\n                throw new ArgumentNullException(nameof(source14));\n            }\n\n            if (resultSelector == null)","sourceCodeStart":885,"sourceCodeEnd":921,"githubUrl":"https://github.com/dotnet/reactive/blob/94b5d5ab912789f5abe9a72138a25bbd716fe59c/Rx.NET/Source/src/System.Reactive/Linq/Observable.Multiple.Zip.cs#L885-L921","documentation":"System.ArgumentNullException thrown by the 14-source public Zip overload in Observable.Multiple.Zip.cs when the eleventh source sequence (source11) is null. Zip subscribes to every input sequence concurrently and emits only complete element groups, so any null input would break its internal zipper state machine. The library eagerly validates each argument and throws before creating the observable.","triggerScenarios":"Calling Observable.Zip(s1, ..., s11, ..., s14, resultSelector) where the eleventh argument is a null IObservable reference; all other sources and resultSelector are non-null.","commonSituations":"An event stream for slot 11 that is only created behind a feature flag or configuration toggle, leaving null when the feature is off; a factory method returning null instead of a cold observable; migrating code that previously used a different overload and misaligned positional arguments.","solutions":["Pass a real observable as the eleventh argument; initialize it before the Zip call.","Substitute Observable.Empty<T>() when that source is legitimately absent.","Null-check each source (e.g. ArgumentNullException.ThrowIfNull(s11)) before calling Zip.","Prefer the array/params overload Observable.Zip(sources, resultSelector) and validate the collection contains no nulls."],"exampleFix":"// before\nvar zipped = Observable.Zip(s1, s2, s3, s4, s5, s6, s7, s8, s9, s10, s11, s12, s13, s14, selector); // s11 == null\n// after\nvar zipped = Observable.Zip(s1, s2, s3, s4, s5, s6, s7, s8, s9, s10, s11 ?? Observable.Empty<decimal>(), s12, s13, s14, selector);","handlingStrategy":"validation","validationCode":"if (s11 is null) throw new ArgumentNullException(nameof(s11));","typeGuard":"static bool IsValidSource<T>(IObservable<T>? s) => s is not null;","tryCatchPattern":"try { var zipped = Observable.Zip(s1, ..., s11, ..., s14, selector); } catch (ArgumentNullException ex) when (ex.ParamName == \"source11\") { // log and fall back to a default stream }","preventionTips":["Initialize all merged streams eagerly in one place instead of conditionally.","Use nullable reference type annotations to catch uninitialized stream fields at compile time.","Assert no null entries when building the source list in tests.","Wrap large-arity Zips in a builder function that substitutes empty sequences for nulls."],"tags":["argumentnull","zip","observables","null-check","system-reactive"],"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"}