{"record":{"id":"37640ce0f5293dee","repo":"remotion-dev/remotion","slug":"failed-to-create-webgl-program-37640c","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/zoom-blur/zoom-blur-runtime.ts","lineNumber":49,"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(`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(`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":31,"sourceCodeEnd":67,"githubUrl":"https://github.com/remotion-dev/remotion/blob/78fe4bb3fdb5a2cd68724393d63cb223db333fa7/packages/effects/src/zoom-blur/zoom-blur-runtime.ts#L31-L67","documentation":"During zoomBlur setup, `gl.createProgram()` returned `null`, meaning the WebGL2 context could not allocate a program object. Like the shader creation failure, this indicates context loss or severe GPU resource exhaustion rather than a user-facing parameter problem.","triggerScenarios":"WebGL2 context lost or destroyed before the effect setup completes, GPU memory exhausted by other contexts or effects, or a driver in a degraded state.","commonSituations":"Many concurrent WebGL compositions in one render, context loss after GPU reset, rendering in an environment with limited GPU memory, or a browser tab that was backgrounded and had its context reclaimed.","solutions":["Reduce the number of concurrent WebGL effects.","Ensure the canvas and context are not destroyed or lost before effect setup.","Handle `webglcontextlost` and recreate the context and effect state.","Update GPU drivers or use a more capable GPU."],"exampleFix":null,"handlingStrategy":"try-catch","validationCode":"const testGl = document.createElement('canvas').getContext('webgl2');\nif (!testGl) {\n  // WebGL2 not available; avoid zoomBlur\n}","typeGuard":null,"tryCatchPattern":"try {\n  zoomBlur({ amount: 40 });\n} catch (err) {\n  if (err instanceof Error && err.message.includes('WebGL program')) {\n    console.error('WebGL program creation failed:', err.message);\n  } else {\n    throw err;\n  }\n}","preventionTips":["Reduce concurrent WebGL effect instances.","Handle context loss and recreate effects.","Verify WebGL2 availability before applying GPU effects."],"tags":["webgl","effects","zoom-blur","gpu","runtime"],"backgroundTag":null,"analyzedSha":"78fe4bb3fdb5a2cd68724393d63cb223db333fa7","analyzedAt":"2026-08-12T17:18:50.444Z","schemaVersion":2},"datasetVersion":"2026-08-12T23:17:12.415Z"}