{"record":{"id":"92386f4b2a5a6f0a","repo":"remotion-dev/remotion","slug":"pattern-program-link-failed-log-no-log","errorCode":null,"errorMessage":"Pattern program link failed: ${log ?? '(no log)'}","messagePattern":"Pattern program link failed: (.+?)","errorType":"exception","errorClass":"Error","httpStatus":null,"severity":"error","filePath":"packages/effects/src/pattern.ts","lineNumber":432,"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(`Pattern program link failed: ${log ?? '(no log)'}`);\n\t}\n\n\treturn program;\n};\n\nexport const pattern = createEffect<PatternParams, PatternState>({\n\ttype: 'dev.remotion.effects.pattern',\n\tlabel: 'pattern()',\n\tdocumentationLink: 'https://www.remotion.dev/docs/effects/pattern',\n\tbackend: 'webgl2',\n\tcalculateKey: (params) => {\n\t\tconst r = resolve(params);\n\t\treturn `pattern-${r.scale}-${r.cropLeft}-${r.cropTop}-${r.cropRight}-${r.cropBottom}-${r.gapX}-${r.gapY}-${r.offsetU}-${r.offsetV}-${r.rowOffset}-${r.rowOffsetEvery}-${r.columnOffset}-${r.columnOffsetEvery}-${r.origin[0]}-${r.origin[1]}-${r.wrap ? 1 : 0}`;\n\t},\n\tsetup: (target) => {\n\t\tconst gl = target.getContext('webgl2', {\n\t\t\tpremultipliedAlpha: true,\n\t\t\talpha: true,","sourceCodeStart":414,"sourceCodeEnd":450,"githubUrl":"https://github.com/remotion-dev/remotion/blob/78fe4bb3fdb5a2cd68724393d63cb223db333fa7/packages/effects/src/pattern.ts#L414-L450","documentation":"After pattern()'s vertex and fragment shaders are attached and gl.linkProgram runs, the driver reports LINK_STATUS=false. With fixed, separately-compiled shaders this means the program failed to link on this driver (e.g. mismatched varyings/precision the driver rejects) or the context is failing operations. The program info log is interpolated for diagnostics.","triggerScenarios":"linkProgram() calls gl.getProgramParameter(program, LINK_STATUS) which returns false; gl.getProgramInfoLog yields the driver's link error. Occurs during pattern effect setup.","commonSituations":"Driver quirk rejecting the shader pair; lost context causing link to fail; outdated mobile/virtual GPU drivers; GPU blacklists in the browser degrading WebGL2.","solutions":["Render on a current Chromium build with a capable GPU (or SwiftShader in CI).","Update GPU drivers.","Handle context loss and retry initialization on restore.","Capture and report the interpolated info log if it reproduces on supported hardware."],"exampleFix":null,"handlingStrategy":"try-catch","validationCode":"// Probe program linking capability on this GPU once at startup.\nfunction canLinkPatternProgram(gl: WebGL2RenderingContext): boolean {\n  const vs = buildShader(gl, gl.VERTEX_SHADER, PATTERN_VS);\n  const fs = buildShader(gl, gl.FRAGMENT_SHADER, PATTERN_FS);\n  if (!vs || !fs) return false;\n  const p = gl.createProgram();\n  gl.attachShader(p, vs); gl.attachShader(p, fs); gl.linkProgram(p);\n  const ok = gl.getProgramParameter(p, gl.LINK_STATUS);\n  gl.deleteProgram(p);\n  return Boolean(ok);\n}","typeGuard":null,"tryCatchPattern":"try {\n  initPattern(canvas);\n} catch (err) {\n  if (String(err.message).startsWith('Pattern program link failed')) {\n    logLinkIssue(err.message);\n    useNonGpuFallback();\n  } else throw err;\n}","preventionTips":["Render on a current Chromium build with a capable GPU (or SwiftShader in CI).","Update GPU drivers on render machines.","Handle context loss and retry setup on restore.","Report the interpolated info log if it reproduces on supported hardware."],"tags":["webgl","gpu","program","link","pattern-effect","driver"],"backgroundTag":null,"analyzedSha":"78fe4bb3fdb5a2cd68724393d63cb223db333fa7","analyzedAt":"2026-08-12T17:18:50.444Z","schemaVersion":2},"datasetVersion":"2026-08-12T23:17:12.415Z"}