{"record":{"id":"8f441deabe821014","repo":"remotion-dev/remotion","slug":"failed-to-create-webgl-program-8f441d","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/checkerboard.ts","lineNumber":300,"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(`Checkerboard 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(`Checkerboard 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":282,"sourceCodeEnd":318,"githubUrl":"https://github.com/remotion-dev/remotion/blob/78fe4bb3fdb5a2cd68724393d63cb223db333fa7/packages/effects/src/checkerboard.ts#L282-L318","documentation":"Thrown by linkProgram() for the checkerboard effect when gl.createProgram() returns null. As with other GL object creators, a null program means the WebGL2 context is lost, destroyed, or out of program objects. Linking cannot proceed, so checkerboard setup aborts before any attribute/uniform work.","triggerScenarios":"createProgram() -> linkProgram() calls gl.createProgram() at checkerboard.ts:298 during setupCheckerboard(); it returns null and the guard at :299 throws.","commonSituations":"Lost/destroyed GL context, GPU process crash, too many concurrent programs across live compositions, or software rendering under load.","solutions":["Reduce concurrent checkerboard / WebGL effects.","Enable GPU acceleration; remove --disable-gpu.","Recreate the effect after 'webglcontextrestored'.","Update GPU drivers and verify WebGL2 program support.","Use a higher-memory/GPU render instance server-side."],"exampleFix":null,"handlingStrategy":"try-catch","validationCode":"function probeWebGL2(): boolean {\n  try {\n    const c = document.createElement('canvas');\n    const gl = c.getContext('webgl2');\n    return !!gl && !gl.isContextLost();\n  } catch {\n    return false;\n  }\n}\nif (!probeWebGL2()) skipOrFallback();","typeGuard":null,"tryCatchPattern":"try {\n  return <Checkerboard {...props} />;\n} catch (err) {\n  if (/Failed to create WebGL program/.test(String(err))) return <FallbackFrame />;\n  throw err;\n}","preventionTips":["Reduce concurrent checkerboard/WebGL effects to stay within program budgets.","Enable GPU acceleration; remove --disable-gpu.","Handle context loss/restore and recreate the effect.","Use a GPU/higher-memory render instance server-side."],"tags":["webgl","glsl","program","gpu","effects","checkerboard","rendering"],"backgroundTag":null,"analyzedSha":"78fe4bb3fdb5a2cd68724393d63cb223db333fa7","analyzedAt":"2026-08-12T17:18:50.444Z","schemaVersion":2},"datasetVersion":"2026-08-12T18:17:37.767Z"}