{"record":{"id":"a933cbf8b033ecb1","repo":"remotion-dev/remotion","slug":"roughen-edges-program-link-failed-log-no-l","errorCode":null,"errorMessage":"Roughen edges program link failed: ${log ?? '(no log)'}","messagePattern":"Roughen edges program link failed: (.+?)","errorType":"exception","errorClass":"Error","httpStatus":null,"severity":"error","filePath":"packages/effects/src/roughen-edges.ts","lineNumber":333,"sourceCode":"};\n\nconst linkProgram = (\n\tgl: WebGL2RenderingContext,\n\tvs: WebGLShader,\n\tfs: WebGLShader,\n): WebGLProgram => {\n\tconst program = gl.createProgram();\n\tif (!program) {\n\t\tthrow new Error('Failed to create WebGL program');\n\t}\n\n\tgl.attachShader(program, vs);\n\tgl.attachShader(program, fs);\n\tgl.linkProgram(program);\n\tif (!gl.getProgramParameter(program, gl.LINK_STATUS)) {\n\t\tconst log = gl.getProgramInfoLog(program);\n\t\tgl.deleteProgram(program);\n\t\tthrow new Error(`Roughen edges program link failed: ${log ?? '(no log)'}`);\n\t}\n\n\treturn program;\n};\n\nconst createSourceTexture = (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;","sourceCodeStart":315,"sourceCodeEnd":351,"githubUrl":"https://github.com/remotion-dev/remotion/blob/78fe4bb3fdb5a2cd68724393d63cb223db333fa7/packages/effects/src/roughen-edges.ts#L315-L351","documentation":"The `roughenEdges()` effect's vertex and fragment shaders compiled but `gl.linkProgram()` failed. Because both stages are static constants shipped together, a link failure indicates a driver/GPU bug, a non-conformant GLSL ES 3.00 implementation, or link-time resource limits on constrained hardware. Not reachable through any user param.","triggerScenarios":"Non-conformant GPU/driver; linking on a half-dead context after a GPU reset; a patched effects package whose VS/FS varying declarations no longer match.","commonSituations":"Mobile WebViews; headless render servers; remote desktop; forks of `@remotion/effects` with mismatched shader edits.","solutions":["Use a conformant desktop GPU with current drivers.","Reinstall `@remotion/effects` to rule out edited shader sources.","Handle context loss/restore so the program is relinked cleanly.","Report the `getProgramInfoLog` text plus renderer string to Remotion."],"exampleFix":null,"handlingStrategy":"try-catch","validationCode":null,"typeGuard":null,"tryCatchPattern":"try {\n  roughenEdges()({...});\n} catch (err) {\n  if (err instanceof Error && /Roughen edges program link failed/.test(err.message)) {\n    // log err.message (program info log) and render a fallback without the effect\n  } else {\n    throw err;\n  }\n}","preventionTips":["Use a conformant desktop GPU with current drivers.","Keep the bundled `@remotion/effects` shaders unmodified.","Handle context loss so a stale program is not re-linked.","Report persistent link failures with the renderer string."],"tags":["webgl2","roughen-edges-effect","effects","glsl","gpu","shader","linker"],"backgroundTag":null,"analyzedSha":"78fe4bb3fdb5a2cd68724393d63cb223db333fa7","analyzedAt":"2026-08-12T17:18:50.444Z","schemaVersion":2},"datasetVersion":"2026-08-12T18:17:37.767Z"}