{"record":{"id":"ba71607961267e8b","repo":"remotion-dev/remotion","slug":"gridlines-program-link-failed-log-no-log","errorCode":null,"errorMessage":"Gridlines program link failed: ${log ?? '(no log)'}","messagePattern":"Gridlines program link failed: (.+?)","errorType":"exception","errorClass":"Error","httpStatus":null,"severity":"error","filePath":"packages/effects/src/gridlines.ts","lineNumber":395,"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(`Gridlines program link failed: ${log ?? '(no log)'}`);\n\t}\n\n\treturn program;\n};\n\nconst rgbaToUniform = (\n\trgba: ParsedColorRgba,\n): readonly [number, number, number, number] => {\n\tconst [r, g, b, a] = rgba;\n\tconst alpha = a / 255;\n\treturn [(r / 255) * alpha, (g / 255) * alpha, (b / 255) * alpha, alpha];\n};\n\nexport const gridlines = createEffect<GridlinesParams, GridlinesState>({\n\ttype: 'remotion/gridlines',\n\tlabel: 'gridlines()',\n\tdocumentationLink: 'https://www.remotion.dev/docs/effects/gridlines',\n\tbackend: 'webgl2',","sourceCodeStart":377,"sourceCodeEnd":413,"githubUrl":"https://github.com/remotion-dev/remotion/blob/78fe4bb3fdb5a2cd68724393d63cb223db333fa7/packages/effects/src/gridlines.ts#L377-L413","documentation":"Thrown by gridlines' linkProgram after gl.linkProgram when LINK_STATUS is false. The driver's program info log is appended. Because both shaders already compiled, a link failure means a shader-interface mismatch or driver bug, not a user parameter problem.","triggerScenarios":"Setup-time linking of the hardcoded Gridlines vertex+fragment shaders. Real causes: varying in/out declarations that do not match across stages, an attribute referenced in GLSL that the driver cannot bind, or a driver bug rejecting a valid program. On WebGL2 hardware this is rare with the shipped shaders, so it usually points to a non-conformant driver.","commonSituations":"Buggy/outdated GPU drivers; a software renderer (SwiftShader) version with known linking bugs; a GPU on the browser's blocklist being used anyway; rare ANGLE regressions.","solutions":["Read the appended info log for the mismatch reason.","Reproduce on a mainstream desktop GPU with current drivers to confirm the link should succeed.","For headless, switch ANGLE backend or update SwiftShader.","Update GPU drivers / browser; if a blocklist entry applies, address the underlying GPU/driver issue."],"exampleFix":"// before: stale headless backend produces 'Gridlines program link failed: ...'\nNVIDIA driver from 2019 in headless Chrome\n\n// after: update driver + use a conformant backend\nlatest stable GPU driver; chrome --use-gl=angle --use-angle=swiftshader","handlingStrategy":"try-catch","validationCode":"// Validate a conformant WebGL2 compiler is present (run the effect in a known-good env first)\nconst gl = canvas.getContext('webgl2');\nif (!gl || gl.isContextLost()) throw new Error('No healthy WebGL2 context');","typeGuard":"null","tryCatchPattern":"try {\n  gridlines.setup(canvas);\n} catch (e) {\n  if (e instanceof Error && e.message.startsWith('Gridlines program link failed')) {\n    // driver bug: read info log, switch backend / update drivers\n  }\n  throw e;\n}","preventionTips":["Develop/test on mainstream desktop GPUs with current drivers.","Keep ANGLE/SwiftShader updated in headless.","Read the link info log to find the shader-interface mismatch.","Reproduce on a second machine to rule out a driver-specific bug."],"tags":["webgl","gridlines-effect","program","glsl","gpu"],"backgroundTag":null,"analyzedSha":"78fe4bb3fdb5a2cd68724393d63cb223db333fa7","analyzedAt":"2026-08-12T17:18:50.444Z","schemaVersion":2},"datasetVersion":"2026-08-12T23:17:12.415Z"}