{"record":{"id":"f06140c01554d979","repo":"remotion-dev/remotion","slug":"failed-to-create-webgl-buffer-f06140","errorCode":null,"errorMessage":"Failed to create WebGL buffer","messagePattern":"Failed to create WebGL buffer","errorType":"exception","errorClass":"Error","httpStatus":null,"severity":"critical","filePath":"packages/effects/src/mirror/mirror-runtime.ts","lineNumber":120,"sourceCode":"\n\tgl.pixelStorei(gl.UNPACK_PREMULTIPLY_ALPHA_WEBGL, true);\n\n\tconst program = createProgram(gl, MIRROR_VS, MIRROR_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\tgl.enableVertexAttribArray(0);\n\tgl.vertexAttribPointer(0, 2, gl.FLOAT, false, 16, 0);\n\tgl.enableVertexAttribArray(1);\n\tgl.vertexAttribPointer(1, 2, gl.FLOAT, false, 16, 8);\n\n\tgl.bindVertexArray(null);\n\n\tconst textureSource = createRgbaTexture(gl);\n\n\treturn {\n\t\tgl,\n\t\tprogram,\n\t\tvao,","sourceCodeStart":102,"sourceCodeEnd":138,"githubUrl":"https://github.com/remotion-dev/remotion/blob/78fe4bb3fdb5a2cd68724393d63cb223db333fa7/packages/effects/src/mirror/mirror-runtime.ts#L102-L138","documentation":"While creating the vertex buffer for the mirror effect's fullscreen quad, gl.createBuffer() returned null. The VAO and program were already created successfully, but buffer allocation failed — indicating context loss, resource exhaustion, or driver issues at the buffer level.","triggerScenarios":"During setupMirror, after the VAO is created and bound, gl.createBuffer() returns null. The VBO holds the 16-float interleaved position+UV data for the fullscreen quad.","commonSituations":"Context loss during setup; GPU buffer memory exhaustion; headless environments with limited WebGL2 buffer allocation; driver bugs under load.","solutions":["Handle WebGL context loss and retry rendering.","Reduce concurrent WebGL effects to lower buffer allocation pressure.","Update GPU drivers or use a software renderer.","Verify headless Chrome GPU flags enable WebGL2 buffer operations."],"exampleFix":null,"handlingStrategy":"try-catch","validationCode":null,"typeGuard":null,"tryCatchPattern":"try {\n  // apply mirror effect\n} catch (e) {\n  if (e instanceof Error && e.message.includes('WebGL buffer')) {\n    console.warn('WebGL buffer creation failed, skipping mirror effect');\n    // fallback path\n  } else {\n    throw e;\n  }\n}","preventionTips":["Handle WebGL context loss and retry rendering.","Reduce concurrent WebGL effects to lower buffer allocation pressure.","Verify headless Chrome GPU configuration supports WebGL2 buffer operations."],"tags":["webgl","gpu","environment","mirror-effect","resource-exhaustion"],"backgroundTag":null,"analyzedSha":"78fe4bb3fdb5a2cd68724393d63cb223db333fa7","analyzedAt":"2026-08-12T17:18:50.444Z","schemaVersion":2},"datasetVersion":"2026-08-12T23:17:12.415Z"}