{"record":{"id":"aed84b927e095812","repo":"remotion-dev/remotion","slug":"failed-to-create-webgl-vertex-array-aed84b","errorCode":null,"errorMessage":"Failed to create WebGL vertex array","messagePattern":"Failed to create WebGL vertex array","errorType":"exception","errorClass":"Error","httpStatus":null,"severity":"critical","filePath":"packages/effects/src/starburst.ts","lineNumber":303,"sourceCode":"\t\t\tpremultipliedAlpha: true,\n\t\t\talpha: true,\n\t\t\tpreserveDrawingBuffer: true,\n\t\t});\n\t\tif (!gl) {\n\t\t\tthrow createWebGL2ContextError('starburst effect');\n\t\t}\n\n\t\tgl.pixelStorei(gl.UNPACK_PREMULTIPLY_ALPHA_WEBGL, true);\n\n\t\tconst vs = compileShader(gl, gl.VERTEX_SHADER, STARBURST_VS);\n\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');","sourceCodeStart":285,"sourceCodeEnd":321,"githubUrl":"https://github.com/remotion-dev/remotion/blob/78fe4bb3fdb5a2cd68724393d63cb223db333fa7/packages/effects/src/starburst.ts#L285-L321","documentation":"During starburst effect `setup`, `gl.createVertexArray()` returned `null`. A vertex array object (VAO) could not be allocated, indicating context loss or GL resource exhaustion. The error fires after the program is linked and shaders are deleted, before geometry is uploaded.","triggerScenarios":"Context lost between program linking and VAO creation; driver out of VAO resources; WebGL2 context in a destroyed state.","commonSituations":"High concurrent webgl2 effect count; long sessions after a driver reset; restrictive headless WebGL2 backends.","solutions":["Lower the number of concurrent webgl2 effects.","Restart the render/Studio to reset GL state.","Verify headless browser WebGL2 support.","Handle `webglcontextlost` to recreate contexts before re-running setup."],"exampleFix":null,"handlingStrategy":"fallback","validationCode":null,"typeGuard":null,"tryCatchPattern":"try {\n  starburst({...params});\n} catch (e) {\n  if (/Failed to create WebGL vertex array/.test((e as Error).message)) {\n    renderFallbackFrame();\n  } else throw e;\n}","preventionTips":["Reduce concurrent webgl2 effects to limit VAO allocation pressure.","Listen for `webglcontextlost` and rebuild VAOs on restore.","Restart long-running sessions to release leaked GL resources."],"tags":["starburst","webgl2","gpu","resource-exhaustion","context-lost","vao","setup"],"backgroundTag":null,"analyzedSha":"78fe4bb3fdb5a2cd68724393d63cb223db333fa7","analyzedAt":"2026-08-12T17:18:50.444Z","schemaVersion":2},"datasetVersion":"2026-08-12T23:17:12.415Z"}