{"record":{"id":"e5e6385a3f2c8ffe","repo":"remotion-dev/remotion","slug":"halftone-program-link-failed-log-no-log","errorCode":null,"errorMessage":"Halftone program link failed: ${log ?? '(no log)'}","messagePattern":"Halftone program link failed: (.+?)","errorType":"exception","errorClass":"Error","httpStatus":null,"severity":"error","filePath":"packages/effects/src/halftone.ts","lineNumber":387,"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(`Halftone program link failed: ${log ?? '(no log)'}`);\n\t}\n\n\treturn program;\n};\n\n// Halftone effect (WebGL2). Converts luminance into a grid of dots, squares,\n// or lines. Each fragment determines its nearest grid cell and whether it falls\n// inside a dot, so edge dots are never culled. `dotSpacing` sets the grid pitch\n// (defaults to `dotSize`). `sampling` controls texture interpolation when\n// reading luminance at grid centres. `invert` inverts the pattern so\n// bright/transparent areas produce larger dots and dark areas produce fewer.\n// `colorMode` controls whether dots use a solid `dotColor` or the sampled source\n// color at each grid cell.\nexport const halftone = createEffect<HalftoneParams, HalftoneState>({\n\ttype: 'dev.remotion.effects.halftone',\n\tlabel: 'halftone()',\n\tdocumentationLink: 'https://www.remotion.dev/docs/effects/halftone',\n\tbackend: 'webgl2',","sourceCodeStart":369,"sourceCodeEnd":405,"githubUrl":"https://github.com/remotion-dev/remotion/blob/78fe4bb3fdb5a2cd68724393d63cb223db333fa7/packages/effects/src/halftone.ts#L369-L405","documentation":"Thrown by linkProgram() in the halftone effect when gl.getProgramParameter(program, gl.LINK_STATUS) is false after gl.linkProgram(). The driver program-info log is appended (or '(no log)'). The vertex and fragment shaders each compiled, but linking them together failed. Since both shaders are fixed library code, a link failure points at a driver/WebGL2 bug rather than user input.","triggerScenarios":"Linking the halftone program on a driver that mis-handles varying interpolation, uniform layout, or attribute binding between the two fixed shaders; software GL with incomplete linkers; context-degraded state after a GPU fault.","commonSituations":"Headless rendering with swiftshader or old mesa; remote Linux render boxes; post-crash context; transient driver faults.","solutions":["Read the program info log embedded in the message — it states the exact link failure.","Render on a machine with a known-good WebGL2 stack (hardware acceleration or Remotion's bundled headless shell).","Update the GPU driver.","If transient, restart the render once to get a fresh GL context."],"exampleFix":null,"handlingStrategy":"try-catch","validationCode":null,"typeGuard":null,"tryCatchPattern":"try {\n  // ...use halftone()\n} catch (e) {\n  if (e instanceof Error && e.message.startsWith('Halftone program link failed')) {\n    // driver info log is in e.message; switch to a known-good WebGL2 stack\n    console.error(e.message);\n  } else throw e;\n}","preventionTips":["Render with hardware acceleration enabled or use Remotion's bundled headless shell.","Keep GPU drivers current so GLSL ES 3.00 linking works.","Smoke-test one WebGL2-backed effect in CI to fail fast on driver issues."],"tags":["webgl","halftone","shader","gpu-driver","rendering"],"backgroundTag":null,"analyzedSha":"78fe4bb3fdb5a2cd68724393d63cb223db333fa7","analyzedAt":"2026-08-12T17:18:50.444Z","schemaVersion":2},"datasetVersion":"2026-08-12T23:17:12.415Z"}