{"record":{"id":"b429f584cffae83c","repo":"remotion-dev/remotion","slug":"failed-to-create-vibrance-vertex-buffer","errorCode":null,"errorMessage":"Failed to create vibrance vertex buffer","messagePattern":"Failed to create vibrance vertex buffer","errorType":"exception","errorClass":"Error","httpStatus":null,"severity":"error","filePath":"packages/effects/src/vibrance.ts","lineNumber":176,"sourceCode":"\t\tpremultipliedAlpha: true,\n\t\talpha: true,\n\t\tpreserveDrawingBuffer: true,\n\t});\n\tif (!gl) {\n\t\tthrow createWebGL2ContextError('vibrance 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 vibrance vertex array');\n\t}\n\n\tconst vbo = gl.createBuffer();\n\tif (!vbo) {\n\t\tthrow new Error('Failed to create vibrance vertex buffer');\n\t}\n\n\tgl.bindVertexArray(vao);\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","sourceCodeStart":158,"sourceCodeEnd":194,"githubUrl":"https://github.com/remotion-dev/remotion/blob/78fe4bb3fdb5a2cd68724393d63cb223db333fa7/packages/effects/src/vibrance.ts#L158-L194","documentation":"Thrown during vibrance setup when gl.createBuffer() returns null. The vertex buffer holds the fullscreen-quad geometry fed to the shader; without it the vibrance pass cannot run. A null return signals context loss or GL object/memory exhaustion, not a usage error.","triggerScenarios":"setupVibrance() calls gl.createBuffer() after the VAO is created and bound; it returns null because the context is lost or the buffer object limit is hit.","commonSituations":"Context loss under heavy concurrent effect load in Studio; GPU memory pressure; headless Chrome resource limits on Lambda.","solutions":["Reload to reset the context and release GL buffers.","Cut the number of simultaneously-applied WebGL effects.","Verify hardware-accelerated WebGL2 and update drivers if needed.","Ensure effects on unmounted/offscreen sequences are cleaned up rather than lingering."],"exampleFix":"// before\nconst effect = vibrance({amount: 1});\n\n// after\nconst effect = (() => {\n  try { return vibrance({amount: 1}); } catch { return null; }\n})();","handlingStrategy":"try-catch","validationCode":null,"typeGuard":null,"tryCatchPattern":"let effect = null;\ntry {\n  effect = vibrance({amount: 1});\n} catch (err) {\n  console.warn('vibrance VBO alloc failed, skipping effect', err);\n}","preventionTips":["Dispose offscreen effects to release GL buffers.","Handle 'webglcontextlost'/'webglcontextrestored' and rebuild effects.","Limit concurrent WebGL effects to avoid buffer-object exhaustion.","Render on hardware with adequate GL resources."],"tags":["webgl2","gpu-memory","context-loss","vibrance"],"backgroundTag":null,"analyzedSha":"78fe4bb3fdb5a2cd68724393d63cb223db333fa7","analyzedAt":"2026-08-12T17:18:50.444Z","schemaVersion":2},"datasetVersion":"2026-08-12T18:17:37.767Z"}