{"record":{"id":"dcfc7f05ca89db7c","repo":"remotion-dev/remotion","slug":"failed-to-create-webgl-texture-dcfc7f","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/emboss.ts","lineNumber":352,"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_WRAP_S, gl.CLAMP_TO_EDGE);\n\tgl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_WRAP_T, gl.CLAMP_TO_EDGE);\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.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\tuResolution: gl.getUniformLocation(program, 'uResolution'),","sourceCodeStart":334,"sourceCodeEnd":370,"githubUrl":"https://github.com/remotion-dev/remotion/blob/78fe4bb3fdb5a2cd68724393d63cb223db333fa7/packages/effects/src/emboss.ts#L334-L370","documentation":"Thrown by setupEmboss() when gl.createTexture() returns null. The VAO/VBO already succeeded, so a null texture means the driver could not allocate a texture object, indicating context loss or texture-resource exhaustion.","triggerScenarios":"Occurs during setupEmboss() when allocating the source texture that receives each frame's pixel data, on a GPU that has lost the context or exhausted its texture-object budget.","commonSituations":"Many concurrent GPU-effect frames, a GPU process crash, or a sandboxed headless Chrome with constrained texture memory.","solutions":["Render with a software backend: `npx remotion render <comp> --gl=swiftshader`.","Lower render concurrency to reduce simultaneous texture allocation.","Restart the render worker to recover a lost context.","Update GPU drivers / Chromium."],"exampleFix":null,"handlingStrategy":"try-catch","validationCode":null,"typeGuard":null,"tryCatchPattern":"async function safeRender(opts) {\n  try {\n    return await renderMedia(opts);\n  } catch (err) {\n    if (/Failed to create WebGL texture/.test(String(err?.message ?? ''))) {\n      return await renderMedia({...opts, gl: 'swiftshader', concurrency: 1});\n    }\n    throw err;\n  }\n}","preventionTips":["Reduce concurrency to lower simultaneous texture allocation pressure.","Prefer a software GL backend in constrained/headless environments.","Restart the render worker if you suspect a leaked/lost context.","Keep GPU drivers / Chromium updated."],"tags":["webgl","gpu","rendering","effects","runtime"],"backgroundTag":null,"analyzedSha":"78fe4bb3fdb5a2cd68724393d63cb223db333fa7","analyzedAt":"2026-08-12T17:18:50.444Z","schemaVersion":2},"datasetVersion":"2026-08-12T18:17:37.767Z"}