{"record":{"id":"8b2643a31803ba2b","repo":"remotion-dev/remotion","slug":"failed-to-create-webgl-vertex-array-8b2643","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/zoom-blur/zoom-blur-runtime.ts","lineNumber":107,"sourceCode":"\treturn texture;\n};\n\nexport const setupZoomBlur = (target: HTMLCanvasElement): ZoomBlurState => {\n\tconst gl = target.getContext('webgl2', {\n\t\tpremultipliedAlpha: true,\n\t\talpha: true,\n\t\tpreserveDrawingBuffer: true,\n\t});\n\tif (!gl) {\n\t\tthrow createWebGL2ContextError('zoom blur effect');\n\t}\n\n\tgl.pixelStorei(gl.UNPACK_PREMULTIPLY_ALPHA_WEBGL, true);\n\n\tconst program = createProgram(gl, ZOOM_BLUR_VS, ZOOM_BLUR_FS);\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);","sourceCodeStart":89,"sourceCodeEnd":125,"githubUrl":"https://github.com/remotion-dev/remotion/blob/78fe4bb3fdb5a2cd68724393d63cb223db333fa7/packages/effects/src/zoom-blur/zoom-blur-runtime.ts#L89-L125","documentation":"During zoomBlur setup, `gl.createVertexArray()` returned `null`, meaning the WebGL2 context could not allocate a VAO. This is a resource-exhaustion or context-loss condition. The VAO stores the effect's fullscreen-quad vertex attribute bindings.","triggerScenarios":"WebGL2 context lost before VAO creation, GPU object limit reached from many concurrent effects, or a driver in a degraded state.","commonSituations":"Many simultaneous WebGL effect instances in one render, context loss after GPU crash, or environments with limited WebGL2 object quotas.","solutions":["Reduce concurrent WebGL effects in the composition.","Handle `webglcontextlost` and re-setup the effect.","Update GPU drivers.","Render on a machine with a more capable GPU."],"exampleFix":null,"handlingStrategy":"try-catch","validationCode":null,"typeGuard":null,"tryCatchPattern":"try {\n  zoomBlur({ amount: 40 });\n} catch (err) {\n  if (err instanceof Error && err.message.includes('vertex array')) {\n    console.error('VAO creation failed:', err.message);\n  } else {\n    throw err;\n  }\n}","preventionTips":["Limit concurrent WebGL effect instances.","Handle context loss events.","Ensure proper cleanup of effects when no longer needed."],"tags":["webgl","effects","zoom-blur","gpu","runtime"],"backgroundTag":null,"analyzedSha":"78fe4bb3fdb5a2cd68724393d63cb223db333fa7","analyzedAt":"2026-08-12T17:18:50.444Z","schemaVersion":2},"datasetVersion":"2026-08-12T23:17:12.415Z"}