{"record":{"id":"947180988c83c3b5","repo":"remotion-dev/remotion","slug":"failed-to-create-webgl-buffer-947180","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/outline.ts","lineNumber":366,"sourceCode":"\t\talpha: true,\n\t\tpreserveDrawingBuffer: true,\n\t});\n\tif (!gl) {\n\t\tthrow createWebGL2ContextError('outline effect');\n\t}\n\n\tgl.pixelStorei(gl.UNPACK_PREMULTIPLY_ALPHA_WEBGL, true);\n\n\tconst program = createProgram(gl);\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\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(\n\t\tgl.ARRAY_BUFFER,\n\t\tnew Float32Array([-1, -1, 0, 0, 1, -1, 1, 0, -1, 1, 0, 1, 1, 1, 1, 1]),\n\t\tgl.STATIC_DRAW,\n\t);\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\tgl.bindVertexArray(null);\n\n\tconst textureSource = createTexture(gl);","sourceCodeStart":348,"sourceCodeEnd":384,"githubUrl":"https://github.com/remotion-dev/remotion/blob/10db9de07356446fb0edb3c3ae211369b693d18b/packages/effects/src/outline.ts#L348-L384","documentation":"In setupOutline(), gl.createBuffer() returned null while allocating the vertex buffer for the effect's fullscreen quad. As with the other WebGL creation failures, a null buffer object indicates a lost WebGL2 context or exhausted GPU resources, not a problem with the effect's parameters.","triggerScenarios":"Applying outline() when the WebGL2 context is lost or GPU buffer allocation fails - commonly during high-concurrency renders with many live contexts or after a driver reset.","commonSituations":"Server/headless renders with many parallel effect frames; machines with failing GPU drivers; renders that run long enough to trigger context garbage-collection edge cases.","solutions":["Retry the render (fresh context usually succeeds)","Reduce render concurrency so each Chrome profile holds fewer WebGL contexts","Update Chrome/GPU drivers on the render host","If reproducible on a single frame, minimize the composition and report it to Remotion"],"exampleFix":null,"handlingStrategy":"retry","validationCode":null,"typeGuard":null,"tryCatchPattern":"try {\n  await renderMediaOnLambda(/* ... */);\n} catch (err) {\n  if (err instanceof Error && err.message === 'Failed to create WebGL buffer') {\n    await renderMediaOnLambda(/* ..., concurrency: 2 */);\n  } else {\n    throw err;\n  }\n}","preventionTips":["Reduce concurrency for effect-heavy renders","Give render hosts headroom in RAM/VRAM for buffer allocation","Treat repeated 'Failed to create WebGL ...' errors as a signal to restart the browser"],"tags":["remotion","effects","webgl","context-lost","vbo","outline","gpu"],"backgroundTag":"webgl-context-lost","analyzedSha":"10db9de07356446fb0edb3c3ae211369b693d18b","analyzedAt":"2026-08-22T21:45:17.748Z","contentChangedAt":"2026-08-22T21:45:17.748Z","schemaVersion":2},"datasetVersion":"2026-09-14T05:17:10.506Z"}