{"record":{"id":"dc7d5950197a65ea","repo":"dotnet/reactive","slug":"source13","errorCode":null,"errorMessage":"source13","messagePattern":"source13","errorType":"validation","errorClass":"ArgumentNullException","httpStatus":null,"severity":"error","filePath":"Rx.NET/Source/src/System.Reactive/Linq/Observable.Multiple.Zip.cs","lineNumber":913,"sourceCode":"\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)\n            {\n                throw new ArgumentNullException(nameof(resultSelector));\n            }\n\n            return s_impl.Zip(source1, source2, source3, source4, source5, source6, source7, source8, source9, source10, source11, source12, source13, source14, resultSelector);\n        }\n\n        /// <summary>\n        /// Merges the specified observable sequences into one observable sequence by using the selector function whenever all of the observable sequences have produced an element at a corresponding index.\n        /// </summary>","sourceCodeStart":895,"sourceCodeEnd":931,"githubUrl":"https://github.com/dotnet/reactive/blob/94b5d5ab912789f5abe9a72138a25bbd716fe59c/Rx.NET/Source/src/System.Reactive/Linq/Observable.Multiple.Zip.cs#L895-L931","documentation":"System.ArgumentNullException thrown by the 14-source public Zip overload in Observable.Multiple.Zip.cs when the thirteenth source sequence (source13) is null. The operator performs eager null validation on every source parameter in order, so a null source13 aborts the call before an observable pipeline is even constructed. This keeps failures deterministic and close to the offending call site.","triggerScenarios":"Calling Observable.Zip(s1, ..., s13, ..., s14, resultSelector) where the thirteenth argument is a null IObservable reference while other arguments are valid.","commonSituations":"One of many sensor/market-data streams failing to initialize (e.g. device offline, connection never established and the field left null); a test setup that stubbed all but one source; accidental argument reorder after adding a new source to the chain.","solutions":["Supply a valid observable for source13 before invoking Zip.","Fall back to Observable.Empty<T>() if the stream may legitimately be absent.","Validate all inputs up front (e.g. EnsureAllNonNull(sources)) so you fail with your own message.","Refactor to Observable.Zip(new[] {...}, resultSelector) to avoid positional null slots and make sources enumerable/checkable."],"exampleFix":"// before\nvar zipped = Observable.Zip(s1, s2, s3, s4, s5, s6, s7, s8, s9, s10, s11, s12, s13, s14, selector); // s13 == null\n// after\nvar zipped = Observable.Zip(s1, s2, s3, s4, s5, s6, s7, s8, s9, s10, s11, s12, s13 ?? Observable.Empty<double>(), s14, selector);","handlingStrategy":"validation","validationCode":"if (s13 is null) throw new ArgumentNullException(nameof(s13));","typeGuard":"static bool IsValidSource<T>(IObservable<T>? s) => s is not null;","tryCatchPattern":"try { var zipped = Observable.Zip(s1, ..., s13, ..., s14, selector); } catch (ArgumentNullException ex) when (ex.ParamName == \"source13\") { // substitute fallback stream and re-compose }","preventionTips":["Guard observable-producing factory calls: treat null returns as errors at the boundary.","When appending a new source to a Zip chain, re-verify every positional argument.","Centralize stream creation so nulls can't leak into composition code.","Use the array overload plus a single null-contains assertion."],"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"}