{"record":{"id":"5c27e652c88e8dca","repo":"siyuan-note/siyuan","slug":"unable-to-compile-graph-shader","errorCode":null,"errorMessage":"Unable to compile graph shader","messagePattern":"Unable to compile graph shader","errorType":"exception","errorClass":"Error","httpStatus":null,"severity":"error","filePath":"app/src/layout/dock/graph/webglRenderer.ts","lineNumber":523,"sourceCode":"        gl.deleteShader(vertex);\n        gl.deleteShader(fragment);\n        if (!gl.getProgramParameter(program, gl.LINK_STATUS)) {\n            const message = gl.getProgramInfoLog(program) || \"Unable to link graph shader\";\n            gl.deleteProgram(program);\n            throw new Error(message);\n        }\n        return program;\n    }\n\n    private createShader(type: number, source: string) {\n        const gl = this.gl;\n        const shader = this.requireValue(gl.createShader(type));\n        gl.shaderSource(shader, source);\n        gl.compileShader(shader);\n        if (!gl.getShaderParameter(shader, gl.COMPILE_STATUS)) {\n            const message = gl.getShaderInfoLog(shader) || \"Unable to compile graph shader\";\n            gl.deleteShader(shader);\n            throw new Error(message);\n        }\n        return shader;\n    }\n\n    private getUniform(program: WebGLProgram, name: string) {\n        return this.requireValue(this.gl.getUniformLocation(program, name));\n    }\n\n    private requireValue<T>(value: T | null): T {\n        if (value === null) {\n            throw new Error(\"Unable to allocate graph rendering resource\");\n        }\n        return value;\n    }\n}\n","sourceCodeStart":505,"sourceCodeEnd":539,"githubUrl":"https://github.com/siyuan-note/siyuan/blob/8641553a1f07374001902d3ce773285db1292b2d/app/src/layout/dock/graph/webglRenderer.ts#L505-L539","documentation":"GraphWebGLRenderer.createShader reports that gl.compileShader failed the COMPILE_STATUS check for a graph vertex or fragment shader. The shader source was rejected by the driver (syntax error, unsupported construct, or driver bug); the info-log message is preferred and this text is the fallback. Called from createProgram during construction.","triggerScenarios":"Thrown at app/src/layout/dock/graph/webglRenderer.ts:523 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Read the shader info log to find the failing line","Verify shader source strings are not corrupted or truncated","Test on another GPU/driver to identify driver-specific compile bugs"],"exampleFix":null,"handlingStrategy":"validation","validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"8641553a1f07374001902d3ce773285db1292b2d","analyzedAt":"2026-09-11T16:08:28.414Z","contentChangedAt":"2026-09-11T16:08:28.414Z","schemaVersion":2},"datasetVersion":"2026-09-23T08:17:48.524Z"}