remotion-dev/remotion · critical · Error

Failed to create WebGL buffer

Error message

Failed to create WebGL buffer

What it means

During zoomBlur setup, `gl.createBuffer()` returned `null`, meaning the WebGL2 context could not allocate a vertex buffer object for the fullscreen-quad geometry. This is a resource-exhaustion or context-loss condition, not a user parameter issue.

Source

Thrown at packages/effects/src/zoom-blur/zoom-blur-runtime.ts:118

	}

	gl.pixelStorei(gl.UNPACK_PREMULTIPLY_ALPHA_WEBGL, true);

	const program = createProgram(gl, ZOOM_BLUR_VS, ZOOM_BLUR_FS);
	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);

	return {
		gl,
		program,
		vao,
		vbo,

View on GitHub (pinned to 78fe4bb3fd)

Solutions

  1. Reduce the number of concurrent WebGL effects.
  2. Handle context loss and recreate effect state.
  3. Update GPU drivers.
  4. Ensure effect cleanup (`cleanupZoomBlur`) is called to free GL objects.
Defensive patterns

Strategy: try-catch

Try / catch

try {
  zoomBlur({ amount: 40 });
} catch (err) {
  if (err instanceof Error && err.message.includes('WebGL buffer')) {
    console.error('VBO creation failed:', err.message);
  } else {
    throw err;
  }
}

Prevention

When it happens

Trigger: WebGL2 context lost, GPU buffer/object limit reached from many concurrent effects, or a degraded driver state.

Common situations: Compositions stacking many WebGL2 effects, context loss after GPU reset, rendering on hardware with tight WebGL2 object limits, or long-running sessions that leak GL objects.

Related errors


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