{"record":{"id":"0f0f677bbe43e4e1","repo":"remotion-dev/remotion","slug":"failed-to-create-webgl-texture-0f0f67","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/venetian-blinds.ts","lineNumber":282,"sourceCode":"\tif (!vbo) {\n\t\tthrow new Error('Failed to create WebGL buffer');\n\t}\n\n\tgl.bindBuffer(gl.ARRAY_BUFFER, vbo);\n\tgl.bufferData(gl.ARRAY_BUFFER, data, gl.STATIC_DRAW);\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\n\tgl.bindVertexArray(null);\n\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\n\treturn {\n\t\tgl,\n\t\tprogram,\n\t\tvao,\n\t\tvbo,\n\t\ttexture,\n\t\tuniforms: {\n\t\t\tuSource: gl.getUniformLocation(program, 'uSource'),\n\t\t\tuProgress: gl.getUniformLocation(program, 'uProgress'),","sourceCodeStart":264,"sourceCodeEnd":300,"githubUrl":"https://github.com/remotion-dev/remotion/blob/78fe4bb3fdb5a2cd68724393d63cb223db333fa7/packages/effects/src/venetian-blinds.ts#L264-L300","documentation":"Thrown by setupVenetianBlinds when gl.createTexture() returns null. The texture holds the source frame uploaded via texImage2D each render. A null texture handle means the GL context is lost or the GPU has exhausted its texture object budget — a common failure under high VRAM usage.","triggerScenarios":"After VAO and buffer setup, gl.createTexture() returns null. Occurs when the GL context is lost, when VRAM is exhausted by many large textures across concurrent renders, or when the driver has a low texture object limit.","commonSituations":"Rendering high-resolution video (4K+) with many concurrent processes each allocating large source textures; GPU with limited VRAM; context loss from driver instability; software rendering with strict texture limits.","solutions":["Reduce render concurrency to lower aggregate VRAM usage","Render at a lower resolution if full resolution is not required","Handle webglcontextlost and retry after restoration","Use a GPU with more VRAM for server-side rendering"],"exampleFix":null,"handlingStrategy":"try-catch","validationCode":null,"typeGuard":null,"tryCatchPattern":"try {\n  const state = setupVenetianBlinds(canvas);\n} catch (err) {\n  if (err instanceof Error && err.message === 'Failed to create WebGL texture') {\n    // VRAM exhausted or context lost — reduce resolution or concurrency and retry.\n    throw new Error('GPU texture allocation failed for venetian-blinds. Lower resolution or concurrency and retry.');\n  }\n  throw err;\n}","preventionTips":["Reduce render concurrency to lower aggregate VRAM consumption","Render at lower resolution if full resolution is not required","Use a GPU with more VRAM for server-side rendering of high-resolution video","Monitor webglcontextlost events to detect texture allocation failures early"],"tags":["webgl","gpu","venetian-blinds","context-loss","resource-exhaustion","texture","vram"],"backgroundTag":null,"analyzedSha":"78fe4bb3fdb5a2cd68724393d63cb223db333fa7","analyzedAt":"2026-08-12T17:18:50.444Z","schemaVersion":2},"datasetVersion":"2026-08-12T18:17:37.767Z"}