{"record":{"id":"098108413909169e","repo":"stride3d/stride","slug":"no-effectname-specified","errorCode":null,"errorMessage":"No EffectName specified","messagePattern":"No EffectName specified","errorType":"exception","errorClass":"ArgumentNullException","httpStatus":null,"severity":"error","filePath":"sources/engine/Stride.Rendering/Rendering/Images/ImageEffectShader.cs","lineNumber":70,"sourceCode":"        {\n            EffectInstance = new DynamicEffectInstance(effectName, Parameters);\n            EnableSetRenderTargets = !delaySetRenderTargets;\n            this.delaySetRenderTargets = delaySetRenderTargets;\n            if (effectName != null)\n                Name = effectName;\n        }\n\n        /// <inheritdoc/>\n        protected override void InitializeCore()\n        {\n            base.InitializeCore();\n\n            pipelineState = new MutablePipelineState(Context.GraphicsDevice);\n            pipelineState.State.SetDefaults();\n            pipelineState.State.InputElements = PrimitiveQuad.VertexDeclaration.CreateInputElements();\n            pipelineState.State.PrimitiveType = PrimitiveQuad.PrimitiveType;\n\n            if (EffectName == null) throw new ArgumentNullException(\"No EffectName specified\");\n\n            // Setup the effect compiler\n            EffectInstance.Initialize(Context.Services);\n\n            // We give ImageEffectShader a higher priority, since they are usually executed serially and blocking\n            EffectInstance.EffectCompilerParameters.TaskPriority = -1;\n\n            SetDefaultParameters();\n        }\n\n        /// <summary>\n        /// The current effect instance.\n        /// </summary>\n        [DataMemberIgnore]\n        public DynamicEffectInstance EffectInstance { get; private set; }\n\n        /// <summary>\n        /// Effect name.","sourceCodeStart":52,"sourceCodeEnd":88,"githubUrl":"https://github.com/stride3d/stride/blob/96fad776d210c221682aac1ccdf4c79dc046fc38/sources/engine/Stride.Rendering/Rendering/Images/ImageEffectShader.cs#L52-L88","documentation":"ImageEffectShader.InitializeCore throws ArgumentNullException with the message \"No EffectName specified\" when the EffectName property is null at initialization time. A valid effect name is required to compile/locate the shader effect. (Note: the message resembles ArgumentException text but is thrown as ArgumentNullException.)","triggerScenarios":"Subclassing ImageEffectShader and forgetting to override EffectName; setting EffectName only after DrawCore runs (initialization happens earlier); deriving via a base class that leaves EffectName null.","commonSituations":"Copy-pasting a custom post effect skeleton without filling in EffectName; renaming a shader and accidentally removing the override; registering the effect with the render system before configuring it.","solutions":["Override the EffectName property in your subclass and return the shader asset name","Verify the shader effect asset with that name exists in the project","Ensure EffectName is set before the render system calls Initialize"],"exampleFix":"// before\npublic class MyEffect : ImageEffectShader { } // EffectName never overridden\n// after\npublic class MyEffect : ImageEffectShader\n{\n    public override string EffectName => \"MyEffectShader\";\n}","handlingStrategy":"validation","validationCode":"if (string.IsNullOrEmpty(EffectName)) throw new InvalidOperationException(\"Subclass must override EffectName\");","typeGuard":null,"tryCatchPattern":"try { renderEffect.Initialize(context); } catch (ArgumentNullException) { /* set EffectName and re-register */ }","preventionTips":["Always override EffectName in ImageEffectShader subclasses","Validate custom effects with a smoke test that triggers Initialize","Keep shader asset names in sync with EffectName"],"tags":["null-argument","shader","initialization"],"backgroundTag":"missing-required-argument","analyzedSha":"96fad776d210c221682aac1ccdf4c79dc046fc38","analyzedAt":"2026-09-14T02:59:31.279Z","contentChangedAt":"2026-09-14T02:59:31.279Z","schemaVersion":2},"datasetVersion":"2026-09-15T23:17:13.987Z"}