{"record":{"id":"5b6f75baf31f6b0a","repo":"dotnet/reactive","slug":"value-cannot-be-null-parameter-source15-5b6f75","errorCode":null,"errorMessage":"Value cannot be null. (Parameter 'source15')","messagePattern":"Value cannot be null\\. \\(Parameter 'source15'\\)","errorType":"validation","errorClass":"ArgumentNullException","httpStatus":null,"severity":"error","filePath":"Rx.NET/Source/src/System.Reactive/Linq/Observable.Multiple.Zip.cs","lineNumber":1164,"sourceCode":"\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 (source15 == null)\n            {\n                throw new ArgumentNullException(nameof(source15));\n            }\n\n            if (source16 == null)\n            {\n                throw new ArgumentNullException(nameof(source16));\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, source15, source16, resultSelector);\n        }\n\n    }\n\n#pragma warning disable CA1711 // (Don't use Ex suffix.) This has been a public type for many years, so we can't rename it now.","sourceCodeStart":1146,"sourceCodeEnd":1182,"githubUrl":"https://github.com/dotnet/reactive/blob/94b5d5ab912789f5abe9a72138a25bbd716fe59c/Rx.NET/Source/src/System.Reactive/Linq/Observable.Multiple.Zip.cs#L1146-L1182","documentation":"ArgumentNullException (Parameter 'source15'): the 15th source in the 16-ary Observable.Zip overload is null. Rx rejects null sources eagerly so the bug surfaces at the composition call site rather than as an obscure error inside the zip machinery after subscription.","triggerScenarios":"Observable.Zip(source1..source16, resultSelector) with source15 == null — e.g. an async initializer that had not completed, a service locator returning null, or a refactoring that dropped one argument assignment.","commonSituations":"Startup ordering bugs where a stream is created after zip composition, mocked dependencies that default to null in tests, or partial application of a stream-builder result.","solutions":["Guarantee source15 is initialized before composing the zip (fix initialization order).","Use Observable.Empty<T>() or Observable.Never<T>() for intentionally missing streams.","Wrap composition in a helper that validates all 16 arguments and reports null indices.","Prefer collection-based Zip to eliminate fixed-arity null gaps."],"exampleFix":"// before\nZip(..., s14, s15 /* null */, s16, ..., sel);\n// after\nZip(..., s14, s15 ?? Observable.Empty<byte[]>(), s16, ..., sel);","handlingStrategy":"validation","validationCode":"if (source15 == null) throw new ArgumentNullException(nameof(source15));\n// or:\nvar s15 = source15 ?? Observable.Empty<T15>();","typeGuard":"static bool Present<T>([NotNullWhen(true)] IObservable<T>? o) => o is not null;\nvar s15 = Present(source15) ? source15 : Observable.Empty<T15>();","tryCatchPattern":"try\n{\n    var zipped = Observable.Zip(source1, /* ... */ source15, /* ... */ source16, selector);\n}\ncatch (ArgumentNullException ex) when (ex.ParamName == nameof(source15))\n{\n    logger.LogError(ex, \"source15 was null when composing Zip\");\n}","preventionTips":["Complete async initialization before composing dependent pipelines.","Fail fast in constructors/factories when a required stream cannot be created.","Keep stream construction close to composition to avoid stale null references.","Enable nullable reference types and annotate producers as [NotNullWhen(true)]."],"tags":["null-argument","rxjs","zip","argument-validation"],"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"}