{"record":{"id":"fab8c630a259e4b3","repo":"remotion-dev/remotion","slug":"thermal-vision-program-link-failed-log-no","errorCode":null,"errorMessage":"Thermal vision program link failed: ${log ?? '(no log)'}","messagePattern":"Thermal vision program link failed: (.+?)","errorType":"exception","errorClass":"Error","httpStatus":null,"severity":"critical","filePath":"packages/effects/src/thermal-vision.ts","lineNumber":188,"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(`Thermal vision program link failed: ${log ?? '(no log)'}`);\n\t}\n\n\treturn program;\n};\n\nconst createProgram = (\n\tgl: WebGL2RenderingContext,\n\tvertexSource: string,\n\tfragmentSource: string,\n): WebGLProgram => {\n\tconst vs = compileShader(gl, gl.VERTEX_SHADER, vertexSource);\n\tconst fs = compileShader(gl, gl.FRAGMENT_SHADER, fragmentSource);\n\tconst program = linkProgram(gl, vs, fs);\n\tgl.deleteShader(vs);\n\tgl.deleteShader(fs);\n\treturn program;\n};\n","sourceCodeStart":170,"sourceCodeEnd":206,"githubUrl":"https://github.com/remotion-dev/remotion/blob/78fe4bb3fdb5a2cd68724393d63cb223db333fa7/packages/effects/src/thermal-vision.ts#L170-L206","documentation":"The thermal vision effect's shader program failed to link after both shaders compiled successfully. `gl.LINK_STATUS === false` and the program info log is appended. Linking fails when vertex/fragment interface declarations mismatch or due to driver-specific linking bugs. Since shaders are static library code, this typically indicates a driver issue. The program is deleted before throwing.","triggerScenarios":"A driver linking bug; a varying/interface mismatch introduced by editing the shader strings; exceeding a driver-specific uniform/varying limit.","commonSituations":"Outdated mobile/integrated GPU drivers; software WebGL2 backends with linking quirks; a regression from modifying `THERMAL_VISION_VS` or `THERMAL_VISION_FS` (e.g. renaming a varying in only one shader stage).","solutions":["Read the info log in the message for the linker's complaint.","Update GPU drivers and browser.","If editing shaders, ensure vertex `out` declarations exactly match fragment `in` declarations (names, types, order).","Test on another machine/browser; report to maintainers if shaders are unmodified."],"exampleFix":null,"handlingStrategy":"try-catch","validationCode":null,"typeGuard":null,"tryCatchPattern":"try {\n  thermalVision({...params});\n} catch (e) {\n  const msg = (e as Error).message;\n  if (/program link failed/.test(msg)) {\n    console.error('Linker failure (likely driver bug):', msg);\n    renderFallbackFrame();\n  } else throw e;\n}","preventionTips":["Keep GPU drivers and browsers up to date.","When editing shaders, ensure vertex `out` and fragment `in` declarations match exactly.","Ship a non-webgl2 fallback for driver combos that fail linking."],"tags":["thermal-vision","webgl2","shader","glsl","link","driver"],"backgroundTag":null,"analyzedSha":"78fe4bb3fdb5a2cd68724393d63cb223db333fa7","analyzedAt":"2026-08-12T17:18:50.444Z","schemaVersion":2},"datasetVersion":"2026-08-12T18:17:37.767Z"}