{"record":{"id":"545a10d59168bb3c","repo":"remotion-dev/remotion","slug":"failed-to-create-webgl-program-545a10","errorCode":null,"errorMessage":"Failed to create WebGL program","messagePattern":"Failed to create WebGL program","errorType":"exception","errorClass":"Error","httpStatus":null,"severity":"error","filePath":"packages/effects/src/linear-progressive-blur/linear-progressive-blur-runtime.ts","lineNumber":62,"sourceCode":"\tif (!gl.getShaderParameter(shader, gl.COMPILE_STATUS)) {\n\t\tconst log = gl.getShaderInfoLog(shader);\n\t\tgl.deleteShader(shader);\n\t\tthrow new Error(\n\t\t\t`Linear progressive blur shader compile failed: ${log ?? '(no log)'}`,\n\t\t);\n\t}\n\n\treturn shader;\n};\n\nconst linkProgram = (\n\tgl: WebGL2RenderingContext,\n\tvs: WebGLShader,\n\tfs: WebGLShader,\n): WebGLProgram => {\n\tconst program = gl.createProgram();\n\tif (!program) {\n\t\tthrow new Error('Failed to create WebGL program');\n\t}\n\n\tgl.attachShader(program, vs);\n\tgl.attachShader(program, fs);\n\tgl.linkProgram(program);\n\tif (!gl.getProgramParameter(program, gl.LINK_STATUS)) {\n\t\tconst log = gl.getProgramInfoLog(program);\n\t\tgl.deleteProgram(program);\n\t\tthrow new Error(\n\t\t\t`Linear progressive blur program link failed: ${log ?? '(no log)'}`,\n\t\t);\n\t}\n\n\treturn program;\n};\n\nconst createProgram = (\n\tgl: WebGL2RenderingContext,","sourceCodeStart":44,"sourceCodeEnd":80,"githubUrl":"https://github.com/remotion-dev/remotion/blob/78fe4bb3fdb5a2cd68724393d63cb223db333fa7/packages/effects/src/linear-progressive-blur/linear-progressive-blur-runtime.ts#L44-L80","documentation":"Thrown by linkProgram() in the linear-progressive-blur runtime when gl.createProgram() returns null after both shaders compiled. The runtime needs two programs (horizontal and vertical passes); a null program object aborts setup because linking cannot proceed.","triggerScenarios":"WebGL2 context in a failing state or at its internal object limit while still accepting shaders. Same root causes as the other GL null-allocations, compounded because this effect creates two programs.","commonSituations":"Memory pressure on the GPU; concurrent renders saturating driver object tables; a crashed GPU process leaving a half-dead context; long-running Studio sessions leaking programs.","solutions":["Restart Chrome / the render worker and retry once.","Reduce `--concurrency` / framesPerLambda to lower simultaneous GL object pressure.","Force software rendering (`--gl=angle --angle-backend=swiftshader`).","Ensure surrounding effects run their cleanup path so programs are released.","Update GPU drivers / Chrome for persistent failures."],"exampleFix":null,"handlingStrategy":"retry","validationCode":"function canAllocateProgram(canvas: HTMLCanvasElement): boolean {\n  const gl = canvas.getContext('webgl2');\n  if (!gl) return false;\n  const p = gl.createProgram();\n  const ok = p !== null;\n  if (p) gl.deleteProgram(p);\n  return ok;\n}","typeGuard":null,"tryCatchPattern":"try {\n  renderWithLinearProgressiveBlur();\n} catch (err) {\n  if (err instanceof Error && err.message === 'Failed to create WebGL program') {\n    await restartRendererWorker();\n    renderWithLinearProgressiveBlur();\n  } else throw err;\n}","preventionTips":["Reduce concurrency — this effect allocates two programs (horizontal + vertical).","Run effect cleanup to release programs between compositions.","Recycle workers after GPU-process crashes.","Force software rendering on unstable GPUs."],"tags":["webgl","gpu","rendering","resource-exhaustion"],"backgroundTag":null,"analyzedSha":"78fe4bb3fdb5a2cd68724393d63cb223db333fa7","analyzedAt":"2026-08-12T17:18:50.444Z","schemaVersion":2},"datasetVersion":"2026-08-12T18:17:37.767Z"}