{"record":{"id":"30fee70b55f30fda","repo":"remotion-dev/remotion","slug":"failed-to-create-webgl-texture-30fee7","errorCode":null,"errorMessage":"Failed to create WebGL texture","messagePattern":"Failed to create WebGL texture","errorType":"exception","errorClass":"Error","httpStatus":null,"severity":"error","filePath":"packages/effects/src/linear-progressive-blur/linear-progressive-blur-runtime.ts","lineNumber":107,"sourceCode":"\treturn program;\n};\n\nconst getUniforms = (\n\tgl: WebGL2RenderingContext,\n\tprogram: WebGLProgram,\n): LinearProgressiveBlurUniforms => ({\n\tuSource: gl.getUniformLocation(program, 'uSource'),\n\tuTexelSize: gl.getUniformLocation(program, 'uTexelSize'),\n\tuStart: gl.getUniformLocation(program, 'uStart'),\n\tuEnd: gl.getUniformLocation(program, 'uEnd'),\n\tuStartBlur: gl.getUniformLocation(program, 'uStartBlur'),\n\tuEndBlur: gl.getUniformLocation(program, 'uEndBlur'),\n});\n\nconst createRgbaTexture = (gl: WebGL2RenderingContext): WebGLTexture => {\n\tconst texture = gl.createTexture();\n\tif (!texture) {\n\t\tthrow new Error('Failed to create WebGL texture');\n\t}\n\n\tgl.bindTexture(gl.TEXTURE_2D, texture);\n\tgl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_MIN_FILTER, gl.LINEAR);\n\tgl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_MAG_FILTER, gl.LINEAR);\n\tgl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_WRAP_S, gl.CLAMP_TO_EDGE);\n\tgl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_WRAP_T, gl.CLAMP_TO_EDGE);\n\tgl.bindTexture(gl.TEXTURE_2D, null);\n\treturn texture;\n};\n\nexport const setupLinearProgressiveBlur = (\n\ttarget: HTMLCanvasElement,\n): LinearProgressiveBlurState => {\n\tconst gl = target.getContext('webgl2', {\n\t\tpremultipliedAlpha: true,\n\t\talpha: true,\n\t\tpreserveDrawingBuffer: true,","sourceCodeStart":89,"sourceCodeEnd":125,"githubUrl":"https://github.com/remotion-dev/remotion/blob/78fe4bb3fdb5a2cd68724393d63cb223db333fa7/packages/effects/src/linear-progressive-blur/linear-progressive-blur-runtime.ts#L89-L125","documentation":"Thrown by createRgbaTexture() in the linear-progressive-blur runtime when gl.createTexture() returns null. The runtime needs two RGBA textures (source and intermediate ping-pong), so a null texture aborts setup because there is no surface to render the blur passes into.","triggerScenarios":"WebGL2 context refuses texture allocation — context on the verge of loss, GPU texture memory exhausted, or driver object limit reached. The runtime allocates textures sized to the target canvas, so very large outputs amplify memory pressure.","commonSituations":"Large composition resolutions (4K+) with high concurrency; integrated GPUs with limited texture memory; long-running workers leaking textures; GPU process crash leaving allocations failing.","solutions":["Restart Chrome / the worker and retry once.","Reduce output resolution or lower `--concurrency` / framesPerLambda to cut texture memory.","Force software rendering (`--gl=angle --angle-backend=swiftshader`) with enough host RAM.","Raise Lambda memory if the GPU process is OOM-killed.","Ensure effect cleanup runs so textures are returned between compositions."],"exampleFix":null,"handlingStrategy":"retry","validationCode":"function canAllocateTexture(canvas: HTMLCanvasElement): boolean {\n  const gl = canvas.getContext('webgl2');\n  if (!gl) return false;\n  const t = gl.createTexture();\n  const ok = t !== null;\n  if (t) gl.deleteTexture(t);\n  return ok;\n}","typeGuard":null,"tryCatchPattern":"try {\n  renderWithLinearProgressiveBlur();\n} catch (err) {\n  if (err instanceof Error && err.message === 'Failed to create WebGL texture') {\n    await restartRendererWorker();\n    renderWithLinearProgressiveBlur();\n  } else throw err;\n}","preventionTips":["Keep output resolution reasonable — this effect allocates two target-sized RGBA textures.","Lower concurrency on large renders to reduce texture memory pressure.","Run effect cleanup to release textures between compositions.","Raise Lambda memory if the GPU process is OOM-killed."],"tags":["webgl","gpu","texture","rendering","resource-exhaustion"],"backgroundTag":null,"analyzedSha":"78fe4bb3fdb5a2cd68724393d63cb223db333fa7","analyzedAt":"2026-08-12T17:18:50.444Z","schemaVersion":2},"datasetVersion":"2026-08-12T18:17:37.767Z"}