remotion-dev/remotion · error · Error

Failed to create WebGL buffer

Error message

Failed to create WebGL buffer

What it means

Thrown by setupLinearProgressiveBlur() when gl.createBuffer() returns null while building the fullscreen-quad vertex buffer. The runtime cannot upload the quad's vertex/UV data, so it aborts setup.

Source

Thrown at packages/effects/src/linear-progressive-blur/linear-progressive-blur-runtime.ts:157

		gl,
		LINEAR_PROGRESSIVE_BLUR_VS,
		buildLinearProgressiveBlurFs('vertical'),
	);

	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);

	gl.enableVertexAttribArray(0);
	gl.vertexAttribPointer(0, 2, gl.FLOAT, false, 16, 0);
	gl.enableVertexAttribArray(1);
	gl.vertexAttribPointer(1, 2, gl.FLOAT, false, 16, 8);

	gl.bindVertexArray(null);

	const textureSource = createRgbaTexture(gl);
	const textureIntermediate = createRgbaTexture(gl);

	const framebuffer = gl.createFramebuffer();
	if (!framebuffer) {
		throw new Error('Failed to create WebGL framebuffer');

View on GitHub (pinned to 78fe4bb3fd)

Solutions

  1. Restart Chrome / the worker and retry once.
  2. Reduce `--concurrency` / framesPerLambda.
  3. Force software rendering (`--gl=angle --angle-backend=swiftshader`).
  4. Reload Studio / restart the dev server to release leaked objects.
  5. Update Chrome and GPU drivers on persistent failure.
Defensive patterns

Strategy: retry

Validate before calling

function canAllocateBuffer(canvas: HTMLCanvasElement): boolean {
  const gl = canvas.getContext('webgl2');
  if (!gl) return false;
  const b = gl.createBuffer();
  const ok = b !== null;
  if (b) gl.deleteBuffer(b);
  return ok;
}

Try / catch

try {
  renderWithLinearProgressiveBlur();
} catch (err) {
  if (err instanceof Error && err.message === 'Failed to create WebGL buffer') {
    await restartRendererWorker();
    renderWithLinearProgressiveBlur();
  } else throw err;
}

Prevention

When it happens

Trigger: WebGL2 context refuses a buffer object — failing context, GPU memory exhaustion, or driver object-table limit reached. Mirrors the other GL null-allocations but at the buffer step.

Common situations: Concurrent renders saturating driver object limits, crashed GPU process leaving a half-dead context, integrated GPUs under memory pressure, long Studio sessions leaking buffers.

Related errors


AI-assisted analysis of remotion-dev/remotion@78fe4bb3fd (2026-08-12). Data as JSON: /api/errors/a0c8221868c96deb. Report an issue: GitHub.