{"record":{"id":"211b8ddee28d06be","repo":"stride3d/stride","slug":"view","errorCode":null,"errorMessage":"view","messagePattern":"view","errorType":"exception","errorClass":"ArgumentNullException","httpStatus":null,"severity":"error","filePath":"sources/engine/Stride.Rendering/Rendering/Images/ImageEffect.cs","lineNumber":110,"sourceCode":"        public override void Reset()\n        {\n            base.Reset();\n\n            maxInputTextureIndex = -1;\n            Array.Clear(inputTextures, 0, inputTextures.Length);\n            outputDepthStencilView = null;\n            outputRenderTargetView = null;\n            outputRenderTargetViews = null;\n        }\n\n        /// <summary>\n        /// Sets the render target output.\n        /// </summary>\n        /// <param name=\"view\">The render target output view.</param>\n        /// <exception cref=\"System.ArgumentNullException\">view</exception>\n        public void SetOutput(Texture view)\n        {\n            if (view == null) throw new ArgumentNullException(\"view\");\n\n            SetOutputInternal(view);\n        }\n\n        /// <summary>\n        /// Sets the render target outputs.\n        /// </summary>\n        /// <param name=\"views\">The render target output views.</param>\n        public void SetOutput(params Texture[] views)\n        {\n            if (views == null) throw new ArgumentNullException(\"views\");\n\n            SetOutputInternal(views);\n        }\n\n        /// <summary>\n        /// Sets the render target output.\n        /// </summary>","sourceCodeStart":92,"sourceCodeEnd":128,"githubUrl":"https://github.com/stride3d/stride/blob/96fad776d210c221682aac1ccdf4c79dc046fc38/sources/engine/Stride.Rendering/Rendering/Images/ImageEffect.cs#L92-L128","documentation":"SetOutput sets the single render target output for this image effect. Stride throws ArgumentNullException(\"view\") when the caller passes a null texture, because the effect's internal output state would otherwise be silently cleared or corrupted. It is a fail-fast guard on a public API.","triggerScenarios":"Calling effect.SetOutput(null) directly, or forwarding a texture variable that was never assigned / failed to load (e.g. a render target allocation that returned null).","commonSituations":"Chaining image effects in a custom post-processing pipeline where an earlier effect was never drawn, so its output texture is still null; disposing render targets during resize and reusing the old reference.","solutions":["Ensure the Texture passed to SetOutput is created successfully (PushRenderTexture / RenderContext.Allocator) before the call","Check that the texture was not disposed earlier in the frame","Guard the call: if (view != null) effect.SetOutput(view)"],"exampleFix":"// before\neffect.SetOutput(renderTarget);\n// after\nif (renderTarget == null) throw new InvalidOperationException(\"render target not allocated\");\neffect.SetOutput(renderTarget);","handlingStrategy":"validation","validationCode":"if (texture == null) throw new InvalidOperationException(\"Output texture must be allocated before SetOutput\");","typeGuard":"bool IsValidOutput(Texture view) => view != null && view.IsValid;","tryCatchPattern":"try { effect.SetOutput(view); } catch (ArgumentNullException) { /* allocate/bind output and retry */ }","preventionTips":["Always allocate render targets via RenderContext allocator before binding","Check for null after any texture-producing call","Never dispose a texture still bound to a live effect"],"tags":["null-argument","rendering","csharp"],"backgroundTag":"null-argument","analyzedSha":"96fad776d210c221682aac1ccdf4c79dc046fc38","analyzedAt":"2026-09-14T02:59:31.279Z","contentChangedAt":"2026-09-14T02:59:31.279Z","schemaVersion":2},"datasetVersion":"2026-09-23T08:17:48.524Z"}