remotion-dev/remotion · critical · Error
Failed to create WebGL buffer
Error message
Failed to create WebGL buffer
What it means
Thrown when `gl.createBuffer()` returns null while allocating the fullscreen-quad VBO for linearGradientTint. Failure is limited to context loss or buffer-handle exhaustion.
Source
Thrown at packages/effects/src/linear-gradient-tint.ts:296
gl.pixelStorei(gl.UNPACK_PREMULTIPLY_ALPHA_WEBGL, true);
const program = createProgram(gl);
const vao = gl.createVertexArray();
if (!vao) {
throw new Error('Failed to create WebGL vertex array');
}
gl.bindVertexArray(vao);
const data = new Float32Array([
-1, -1, 0, 0, 1, -1, 1, 0, -1, 1, 0, 1, 1, 1, 1, 1,
]);
const vbo = gl.createBuffer();
if (!vbo) {
throw new Error('Failed to create WebGL buffer');
}
gl.bindBuffer(gl.ARRAY_BUFFER, vbo);
gl.bufferData(gl.ARRAY_BUFFER, data, gl.STATIC_DRAW);
const aPos = gl.getAttribLocation(program, 'aPos');
const aUv = gl.getAttribLocation(program, 'aUv');
gl.enableVertexAttribArray(aPos);
gl.vertexAttribPointer(aPos, 2, gl.FLOAT, false, 16, 0);
gl.enableVertexAttribArray(aUv);
gl.vertexAttribPointer(aUv, 2, gl.FLOAT, false, 16, 8);
gl.bindVertexArray(null);
const textureSource = createRgbaTexture(gl);
const colorCanvas = document.createElement('canvas');
colorCanvas.width = 1;View on GitHub (pinned to 78fe4bb3fd)
Solutions
- Pair setup with cleanup to free VBOs.
- Recover on context restore rather than retrying.
- Limit stacked WebGL effects per frame.
- Restart workers that accumulate handles.
Defensive patterns
Strategy: fallback
Try / catch
try {
setupLinearGradientTint(canvas);
} catch (err) {
renderWithoutEffect();
} Prevention
- Pair setup with cleanup to free buffers.
- Reuse cached state; do not allocate per frame.
- Recover on context restore.
When it happens
Trigger: Setup on a lost context; many effects leaking VBOs; constrained embedded GPU buffer limits.
Common situations: Long-lived render sessions that leak buffers; Studio hot-reload without teardown; embedded/VM GPUs.
Related errors
- Failed to create WebGL shader
- Failed to create WebGL program
- Failed to create WebGL vertex array
- Failed to create WebGL shader
- Failed to create WebGL program
AI-assisted analysis of remotion-dev/remotion@78fe4bb3fd (2026-08-12).
Data as JSON: /api/errors/8e8f76ea6587dad7.
Report an issue: GitHub.