{"record":{"id":"c4e809b5b54b2977","repo":"remotion-dev/remotion","slug":"failed-to-create-webgl-program-c4e809","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/venetian-blinds.ts","lineNumber":214,"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`Venetian blinds 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`Venetian blinds program link failed: ${log ?? '(no log)'}`,\n\t\t);\n\t}\n\n\treturn program;\n};\n\nconst setupVenetianBlinds = (\n\ttarget: HTMLCanvasElement,","sourceCodeStart":196,"sourceCodeEnd":232,"githubUrl":"https://github.com/remotion-dev/remotion/blob/78fe4bb3fdb5a2cd68724393d63cb223db333fa7/packages/effects/src/venetian-blinds.ts#L196-L232","documentation":"Thrown by the venetian-blinds effect's linkProgram helper when gl.createProgram() returns null after both shaders compiled successfully. This indicates the GL context lost validity between shader compilation and program creation, or the driver refused another program object.","triggerScenarios":"Both vertex and fragment shaders compiled without error, but gl.createProgram() returns null. Occurs when the context transitions to lost state after compilation, or when the driver has exhausted its program object pool.","commonSituations":"Context loss mid-setup during a batch render; driver resource limits hit with many effects in a single composition; long-running render where GL state degrades.","solutions":["Reduce concurrent render parallelism to keep GL object counts within driver limits","Handle webglcontextlost and re-run the render after restoration","Update GPU drivers","If the issue is persistent, test with a different GPU to isolate whether it is a driver bug"],"exampleFix":null,"handlingStrategy":"try-catch","validationCode":null,"typeGuard":null,"tryCatchPattern":"try {\n  const state = setupVenetianBlinds(canvas);\n} catch (err) {\n  if (err instanceof Error && err.message === 'Failed to create WebGL program') {\n    // Context lost between shader compilation and program creation.\n    throw new Error('WebGL2 context lost during venetian-blinds program creation. Retry render.');\n  }\n  throw err;\n}","preventionTips":["Register webglcontextlost listeners to detect context degradation early","Reduce render concurrency to keep GL program-object counts within driver limits","Restart browser instances periodically in long-running render workers"],"tags":["webgl","gpu","venetian-blinds","context-loss","resource-exhaustion"],"backgroundTag":null,"analyzedSha":"78fe4bb3fdb5a2cd68724393d63cb223db333fa7","analyzedAt":"2026-08-12T17:18:50.444Z","schemaVersion":2},"datasetVersion":"2026-08-12T18:17:37.767Z"}