{"record":{"id":"0ca1315872d47cf2","repo":"remotion-dev/remotion","slug":"failed-to-create-webgl-buffer-0ca131","errorCode":null,"errorMessage":"Failed to create WebGL buffer","messagePattern":"Failed to create WebGL buffer","errorType":"exception","errorClass":"Error","httpStatus":null,"severity":"error","filePath":"packages/effects/src/venetian-blinds.ts","lineNumber":265,"sourceCode":"\tconst fs = compileShader(gl, gl.FRAGMENT_SHADER, VENETIAN_BLINDS_FS);\n\tconst program = linkProgram(gl, vs, fs);\n\tgl.deleteShader(vs);\n\tgl.deleteShader(fs);\n\n\tconst vao = gl.createVertexArray();\n\tif (!vao) {\n\t\tthrow new Error('Failed to create WebGL vertex array');\n\t}\n\n\tgl.bindVertexArray(vao);\n\n\tconst data = new Float32Array([\n\t\t-1, -1, 0, 0, 1, -1, 1, 0, -1, 1, 0, 1, 1, 1, 1, 1,\n\t]);\n\n\tconst vbo = gl.createBuffer();\n\tif (!vbo) {\n\t\tthrow new Error('Failed to create WebGL buffer');\n\t}\n\n\tgl.bindBuffer(gl.ARRAY_BUFFER, vbo);\n\tgl.bufferData(gl.ARRAY_BUFFER, data, gl.STATIC_DRAW);\n\n\tconst aPos = gl.getAttribLocation(program, 'aPos');\n\tconst aUv = gl.getAttribLocation(program, 'aUv');\n\tgl.enableVertexAttribArray(aPos);\n\tgl.vertexAttribPointer(aPos, 2, gl.FLOAT, false, 16, 0);\n\tgl.enableVertexAttribArray(aUv);\n\tgl.vertexAttribPointer(aUv, 2, gl.FLOAT, false, 16, 8);\n\n\tgl.bindVertexArray(null);\n\n\tconst texture = gl.createTexture();\n\tif (!texture) {\n\t\tthrow new Error('Failed to create WebGL texture');\n\t}","sourceCodeStart":247,"sourceCodeEnd":283,"githubUrl":"https://github.com/remotion-dev/remotion/blob/78fe4bb3fdb5a2cd68724393d63cb223db333fa7/packages/effects/src/venetian-blinds.ts#L247-L283","documentation":"Thrown by setupVenetianBlinds when gl.createBuffer() returns null. The buffer is needed to hold the fullscreen-quad vertex data (positions + UVs as a Float32Array). A null return indicates context loss or buffer object exhaustion.","triggerScenarios":"After the VAO is created and bound, gl.createBuffer() returns null. Occurs when the GL context is in a lost state or the driver cannot allocate another buffer object.","commonSituations":"Context loss during a render with many effects; driver resource exhaustion in high-concurrency rendering; GPU memory pressure from large textures consuming VRAM.","solutions":["Reduce concurrent render processes to free GL buffer allocations","Register webglcontextlost and re-run after webglcontextrestored","Update GPU drivers and verify VRAM availability","Reduce the resolution or number of source textures to free GPU memory"],"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 buffer') {\n    throw new Error('WebGL2 context lost or buffer limit reached for venetian-blinds. Retry render.');\n  }\n  throw err;\n}","preventionTips":["Lower render concurrency to reduce simultaneous GL buffer allocations","Monitor webglcontextlost to detect context loss proactively","Restart render browser instances periodically to avoid GL state degradation"],"tags":["webgl","gpu","venetian-blinds","context-loss","resource-exhaustion","buffer"],"backgroundTag":null,"analyzedSha":"78fe4bb3fdb5a2cd68724393d63cb223db333fa7","analyzedAt":"2026-08-12T17:18:50.444Z","schemaVersion":2},"datasetVersion":"2026-08-12T18:17:37.767Z"}