{"record":{"id":"9e18a0817b01e3f1","repo":"remotion-dev/remotion","slug":"failed-to-create-webgl-buffer-9e18a0","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/blur/blur-runtime.ts","lineNumber":139,"sourceCode":"\tgl.pixelStorei(gl.UNPACK_PREMULTIPLY_ALPHA_WEBGL, true);\n\n\tconst programHorizontal = createProgram(gl, BLUR_VS, BLUR_FS_HORIZONTAL);\n\tconst programVertical = createProgram(gl, BLUR_VS, BLUR_FS_VERTICAL);\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\tconst textureIntermediate = createRgbaTexture(gl);\n\n\tconst framebuffer = gl.createFramebuffer();\n\tif (!framebuffer) {\n\t\tthrow new Error('Failed to create WebGL framebuffer');","sourceCodeStart":121,"sourceCodeEnd":157,"githubUrl":"https://github.com/remotion-dev/remotion/blob/78fe4bb3fdb5a2cd68724393d63cb223db333fa7/packages/effects/src/blur/blur-runtime.ts#L121-L157","documentation":"Thrown by `setupBlur` when `gl.createBuffer()` returns `null`. The VBO stores the 16-float fullscreen quad (position + UV) shared by the VAO. A null handle means the GL context could not allocate another buffer object.","triggerScenarios":"Fires at line 137-139, after the VAO is bound, when `gl.createBuffer()` returns null.","commonSituations":"Context loss mid-setup; buffer-object cap exhausted by many live effects; software renderer with a low buffer limit.","solutions":["Check `gl.isContextLost()` and reinitialize on restoration.","Call `cleanupBlur` on unused states to release VBOs.","Reduce concurrent WebGL effects.","Ensure hardware-accelerated WebGL2 and current drivers."],"exampleFix":"if (gl.isContextLost()) {\n  // reinitialize after webglcontextrestored\n} else {\n  const state = setupBlur(canvas);\n}","handlingStrategy":"try-catch","validationCode":"if (gl.isContextLost()) { /* skip setupBlur */ }","typeGuard":null,"tryCatchPattern":"try {\n  const state = setupBlur(canvas);\n} catch (err) {\n  if (/Failed to create WebGL buffer/.test(err.message)) {\n    // await restore or reduce effects, then retry\n  } else { throw err; }\n}","preventionTips":["Release VBOs via cleanupBlur on unused states.","Handle context-loss events.","Limit concurrent effects."],"tags":["webgl2","buffer","vbo","blur","gpu-memory","context-loss"],"backgroundTag":null,"analyzedSha":"78fe4bb3fdb5a2cd68724393d63cb223db333fa7","analyzedAt":"2026-08-12T17:18:50.444Z","schemaVersion":2},"datasetVersion":"2026-08-13T19:17:28.613Z"}