{"record":{"id":"f628639d396dabee","repo":"remotion-dev/remotion","slug":"failed-to-create-webgl-buffer-f62863","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/starburst.ts","lineNumber":314,"sourceCode":"\t\tconst fs = compileShader(gl, gl.FRAGMENT_SHADER, STARBURST_FS);\n\t\tconst program = linkProgram(gl, vs, fs);\n\t\tgl.deleteShader(vs);\n\t\tgl.deleteShader(fs);\n\n\t\tconst vao = gl.createVertexArray();\n\t\tif (!vao) {\n\t\t\tthrow new Error('Failed to create WebGL vertex array');\n\t\t}\n\n\t\tgl.bindVertexArray(vao);\n\n\t\tconst data = new Float32Array([\n\t\t\t-1, -1, 0, 0, 1, -1, 1, 0, -1, 1, 0, 1, 1, 1, 1, 1,\n\t\t]);\n\n\t\tconst vbo = gl.createBuffer();\n\t\tif (!vbo) {\n\t\t\tthrow new Error('Failed to create WebGL buffer');\n\t\t}\n\n\t\tgl.bindBuffer(gl.ARRAY_BUFFER, vbo);\n\t\tgl.bufferData(gl.ARRAY_BUFFER, data, gl.STATIC_DRAW);\n\n\t\tconst aPos = gl.getAttribLocation(program, 'aPos');\n\t\tconst aUv = gl.getAttribLocation(program, 'aUv');\n\t\tgl.enableVertexAttribArray(aPos);\n\t\tgl.vertexAttribPointer(aPos, 2, gl.FLOAT, false, 16, 0);\n\t\tgl.enableVertexAttribArray(aUv);\n\t\tgl.vertexAttribPointer(aUv, 2, gl.FLOAT, false, 16, 8);\n\n\t\tgl.bindVertexArray(null);\n\n\t\tconst paletteTexture = gl.createTexture();\n\t\tif (!paletteTexture) {\n\t\t\tthrow new Error('Failed to create WebGL palette texture');\n\t\t}","sourceCodeStart":296,"sourceCodeEnd":332,"githubUrl":"https://github.com/remotion-dev/remotion/blob/78fe4bb3fdb5a2cd68724393d63cb223db333fa7/packages/effects/src/starburst.ts#L296-L332","documentation":"During starburst effect `setup`, `gl.createBuffer()` returned `null` while allocating the vertex buffer for the fullscreen quad. This indicates the GL context cannot allocate a buffer object, usually due to context loss or resource exhaustion. The VAO has already been created and bound when this fires.","triggerScenarios":"Context lost after VAO creation; GPU memory for buffer objects exhausted; degraded/destroyed GL context.","commonSituations":"Many concurrent webgl2 effects; memory-constrained mobile devices; long-running sessions; headless CI with limited GL memory.","solutions":["Reduce concurrent webgl2 effect instances.","Restart the session to obtain a fresh context.","Ensure adequate GPU memory is available (close other GPU-heavy apps).","Handle `webglcontextlost` events and reinitialize effect state."],"exampleFix":null,"handlingStrategy":"fallback","validationCode":null,"typeGuard":null,"tryCatchPattern":"try {\n  starburst({...params});\n} catch (e) {\n  if (/Failed to create WebGL buffer/.test((e as Error).message)) {\n    renderFallbackFrame();\n  } else throw e;\n}","preventionTips":["Limit concurrent webgl2 effects to bound GL buffer allocation.","Handle context-loss events and recreate buffer state.","Ensure `cleanup` deletes buffers so they are not leaked across frames."],"tags":["starburst","webgl2","gpu","resource-exhaustion","context-lost","buffer","setup"],"backgroundTag":null,"analyzedSha":"78fe4bb3fdb5a2cd68724393d63cb223db333fa7","analyzedAt":"2026-08-12T17:18:50.444Z","schemaVersion":2},"datasetVersion":"2026-08-12T18:17:37.767Z"}