{"record":{"id":"c750170de62c57cf","repo":"remotion-dev/remotion","slug":"failed-to-create-webgl-program-c75017","errorCode":null,"errorMessage":"Failed to create WebGL program","messagePattern":"Failed to create WebGL program","errorType":"exception","errorClass":"Error","httpStatus":null,"severity":"critical","filePath":"packages/effects/src/glow/glow-runtime.ts","lineNumber":78,"sourceCode":"\tgl.shaderSource(shader, source);\n\tgl.compileShader(shader);\n\tif (!gl.getShaderParameter(shader, gl.COMPILE_STATUS)) {\n\t\tconst log = gl.getShaderInfoLog(shader);\n\t\tgl.deleteShader(shader);\n\t\tthrow new Error(`Glow shader compile failed: ${log ?? '(no log)'}`);\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(`Glow program link failed: ${log ?? '(no log)'}`);\n\t}\n\n\treturn program;\n};\n\nconst createProgram = (\n\tgl: WebGL2RenderingContext,\n\tvertexSource: string,\n\tfragmentSource: string,","sourceCodeStart":60,"sourceCodeEnd":96,"githubUrl":"https://github.com/remotion-dev/remotion/blob/78fe4bb3fdb5a2cd68724393d63cb223db333fa7/packages/effects/src/glow/glow-runtime.ts#L60-L96","documentation":"Thrown by linkProgram in the glow runtime when gl.createProgram() returns null after both shaders compiled. Same allocation-failure class as the flannel program: context loss or VRAM/object exhaustion, not a link error (link failures surface as 614).","triggerScenarios":"Lost context between shader compile and program creation; many simultaneous glow programs (extract, horizontal blur, vertical blur, composite) exhausting program pools.","commonSituations":"Multiple glow layers each creating four programs; headless render close to GPU object limits.","solutions":["Lower the concurrent glow effect count.","Retry on a fresh Chrome process.","Use a host with more GPU resources."],"exampleFix":null,"handlingStrategy":"retry","validationCode":null,"typeGuard":null,"tryCatchPattern":"let effect;\nfor (let attempt = 0; attempt < 3; attempt++) {\n  try {\n    effect = glow(params);\n    break;\n  } catch (err) {\n    if (attempt === 2 || !/WebGL|program/i.test(String(err))) throw err;\n    await new Promise((r) => setTimeout(r, 200 * (attempt + 1)));\n  }\n}","preventionTips":["Glow creates four GL programs per effect; keep concurrent glow layer count modest.","Render on a host with adequate GPU memory.","Retry transient context loss on a fresh Chrome process."],"tags":["webgl","glow","gpu","program","runtime"],"backgroundTag":null,"analyzedSha":"78fe4bb3fdb5a2cd68724393d63cb223db333fa7","analyzedAt":"2026-08-12T17:18:50.444Z","schemaVersion":2},"datasetVersion":"2026-08-12T18:17:37.767Z"}