{"record":{"id":"6d82c729a1e40484","repo":"remotion-dev/remotion","slug":"contour-lines-program-link-failed-log-no-l","errorCode":null,"errorMessage":"Contour lines program link failed: ${log ?? '(no log)'}","messagePattern":"Contour lines program link failed: (.+?)","errorType":"exception","errorClass":"Error","httpStatus":null,"severity":"error","filePath":"packages/effects/src/contour-lines.ts","lineNumber":385,"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(`Contour lines 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":367,"sourceCodeEnd":403,"githubUrl":"https://github.com/remotion-dev/remotion/blob/78fe4bb3fdb5a2cd68724393d63cb223db333fa7/packages/effects/src/contour-lines.ts#L367-L403","documentation":"Thrown by linkProgram in contour-lines.ts when gl.getProgramParameter(program, gl.LINK_STATUS) returns false. The vertex and fragment shaders compiled but could not be linked into a working program. The info log from gl.getProgramInfoLog() is included. Since both shaders are library constants, a link failure is a driver/GPU compatibility issue, not a user parameter problem.","triggerScenarios":"setupContourLines compiles both shaders, creates a program, attaches the shaders, calls gl.linkProgram(), and LINK_STATUS is false. Internal to the contour-lines WebGL pipeline setup.","commonSituations":"Vertex/fragment shader interface mismatch on a strict driver (e.g. varying/in-out declarations, precision qualifiers); GPU driver bug in the program linker; incomplete WebGL2 implementation that compiles shaders individually but fails cross-shader validation; running on older mobile GPU drivers.","solutions":["Update GPU drivers.","Test on a different GPU or browser to isolate driver-specific linker bugs.","For headless rendering, use a Chrome build with full WebGL2/SwiftShader support.","Report the info log to Remotion with GPU/driver details if it reproduces on modern hardware."],"exampleFix":null,"handlingStrategy":"try-catch","validationCode":null,"typeGuard":null,"tryCatchPattern":"try {\n  contourLines({...})(source, target);\n} catch (e) {\n  if (e instanceof Error && e.message.startsWith('Contour lines program link failed')) {\n    // driver-specific linker issue — capture info log from message\n  }\n  throw e;\n}","preventionTips":["Update GPU drivers.","Test on different GPU/browser to isolate driver linker bugs.","Use Chrome with full WebGL2 support for headless rendering.","Capture the info log from the error message when reporting."],"tags":["webgl","effects","contour-lines","shader","gpu","driver"],"backgroundTag":null,"analyzedSha":"78fe4bb3fdb5a2cd68724393d63cb223db333fa7","analyzedAt":"2026-08-12T17:18:50.444Z","schemaVersion":2},"datasetVersion":"2026-08-12T18:17:37.767Z"}