{"record":{"id":"80605ef74a56c3f0","repo":"remotion-dev/remotion","slug":"region-blur-framebuffer-is-incomplete","errorCode":null,"errorMessage":"Region blur framebuffer is incomplete","messagePattern":"Region blur framebuffer is incomplete","errorType":"exception","errorClass":"Error","httpStatus":null,"severity":"error","filePath":"packages/effects/src/region-blur/region-blur-runtime.ts","lineNumber":271,"sourceCode":"\treadonly program: WebGLProgram;\n\treadonly uniforms: BlurUniforms;\n\treadonly input: WebGLTexture;\n\treadonly output: WebGLTexture;\n\treadonly width: number;\n\treadonly height: number;\n\treadonly radius: number;\n}): void => {\n\tconst {gl} = state;\n\tgl.bindFramebuffer(gl.FRAMEBUFFER, state.framebuffer);\n\tgl.framebufferTexture2D(\n\t\tgl.FRAMEBUFFER,\n\t\tgl.COLOR_ATTACHMENT0,\n\t\tgl.TEXTURE_2D,\n\t\toutput,\n\t\t0,\n\t);\n\tif (gl.checkFramebufferStatus(gl.FRAMEBUFFER) !== gl.FRAMEBUFFER_COMPLETE) {\n\t\tthrow new Error('Region blur framebuffer is incomplete');\n\t}\n\n\tgl.clear(gl.COLOR_BUFFER_BIT);\n\tgl.activeTexture(gl.TEXTURE0);\n\tgl.bindTexture(gl.TEXTURE_2D, input);\n\tgl.useProgram(program);\n\tif (uniforms.source) gl.uniform1i(uniforms.source, 0);\n\tif (uniforms.radius) gl.uniform1f(uniforms.radius, radius);\n\tif (uniforms.texelSize) {\n\t\tgl.uniform2f(uniforms.texelSize, 1 / width, 1 / height);\n\t}\n\n\tdraw(state);\n};\n\nexport const applyRegionBlur = ({\n\tstate,\n\tsource,","sourceCodeStart":253,"sourceCodeEnd":289,"githubUrl":"https://github.com/remotion-dev/remotion/blob/78fe4bb3fdb5a2cd68724393d63cb223db333fa7/packages/effects/src/region-blur/region-blur-runtime.ts#L253-L289","documentation":"During each render pass, the region-blur runtime binds a texture to the framebuffer and checks gl.checkFramebufferStatus. If the framebuffer is not FRAMEBUFFER_COMPLETE at render time (not just setup time), the effect throws. This differs from setup-time checks because it fires per-frame, catching transient issues like texture deletion or dimension changes.","triggerScenarios":"The output texture was deleted or resized between setup and render; the framebuffer's attached texture was invalidated by the driver mid-render; VRAM pressure caused the texture attachment to become stale; a context-loss event occurred after setup but before the render pass.","commonSituations":"Resizing the composition between frames without re-initializing the effect; partial context loss mid-render; driver bugs that detach textures under memory pressure; effects whose output texture is shared and deleted by another consumer.","solutions":["Re-create the effect's WebGL resources when the composition dimensions change","Handle context loss and re-run setup before the next render pass","Ensure the output texture is not shared with or deleted by other code","Reduce VRAM pressure by lowering resolution or concurrent effect count"],"exampleFix":null,"handlingStrategy":"try-catch","validationCode":"// Before each render pass, verify the composition dimensions are stable\nif (canvas.width < 1 || canvas.height < 1) {\n  throw new Error('Canvas dimensions too small for regionBlur render pass');\n}","typeGuard":null,"tryCatchPattern":"try {\n  // render pass\n} catch (err) {\n  if (err instanceof Error && err.message.includes('framebuffer is incomplete')) {\n    // re-initialize the effect's GL resources and retry\n    setupRegionBlur(gl, canvas);\n  }\n  throw err;\n}","preventionTips":["Re-create effect resources when composition dimensions change","Handle context loss before the next render pass","Do not share or externally delete the effect's output texture"],"tags":["webgl","gpu","framebuffer","region-blur","render-time"],"backgroundTag":null,"analyzedSha":"78fe4bb3fdb5a2cd68724393d63cb223db333fa7","analyzedAt":"2026-08-12T17:18:50.444Z","schemaVersion":2},"datasetVersion":"2026-08-12T18:17:37.767Z"}