{"record":{"id":"8c3a24535454c3f5","repo":"remotion-dev/remotion","slug":"failed-to-create-webgl-vertex-array-8c3a24","errorCode":null,"errorMessage":"Failed to create WebGL vertex array","messagePattern":"Failed to create WebGL vertex array","errorType":"exception","errorClass":"Error","httpStatus":null,"severity":"error","filePath":"packages/effects/src/venetian-blinds.ts","lineNumber":254,"sourceCode":"\t\talpha: true,\n\t\tpreserveDrawingBuffer: true,\n\t});\n\n\tif (!gl) {\n\t\tthrow createWebGL2ContextError('venetian blinds effect');\n\t}\n\n\tgl.pixelStorei(gl.UNPACK_PREMULTIPLY_ALPHA_WEBGL, true);\n\n\tconst vs = compileShader(gl, gl.VERTEX_SHADER, VENETIAN_BLINDS_VS);\n\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');","sourceCodeStart":236,"sourceCodeEnd":272,"githubUrl":"https://github.com/remotion-dev/remotion/blob/78fe4bb3fdb5a2cd68724393d63cb223db333fa7/packages/effects/src/venetian-blinds.ts#L236-L272","documentation":"Thrown by setupVenetianBlinds when gl.createVertexArray() returns null after the shader program was successfully built and linked. A null VAO means the GL context is lost or cannot allocate another vertex array object. The library fails immediately since rendering requires a valid VAO to bind vertex attributes.","triggerScenarios":"After compileShader and linkProgram succeed, gl.createVertexArray() returns null. Occurs under context loss or when the driver's VAO allocation limit is reached.","commonSituations":"Too many concurrent effects/contexts exhausting the driver's VAO pool; context loss after a GPU reset; software rendering with limited object support.","solutions":["Reduce render concurrency to lower simultaneous GL context count","Handle webglcontextlost and retry the render after restoration","Update GPU drivers","Use a GPU with higher resource limits for server-side rendering"],"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 vertex array') {\n    throw new Error('WebGL2 context lost or VAO limit reached for venetian-blinds. Retry render.');\n  }\n  throw err;\n}","preventionTips":["Reduce concurrent render processes to stay within the GPU's VAO allocation budget","Handle webglcontextlost and retry renders after restoration","Restart long-running render browser instances to reclaim leaked GL objects"],"tags":["webgl","gpu","venetian-blinds","context-loss","resource-exhaustion","vao"],"backgroundTag":null,"analyzedSha":"78fe4bb3fdb5a2cd68724393d63cb223db333fa7","analyzedAt":"2026-08-12T17:18:50.444Z","schemaVersion":2},"datasetVersion":"2026-08-12T23:17:12.415Z"}