{"record":{"id":"a30e0a95345d97b4","repo":"siyuan-note/siyuan","slug":"unable-to-allocate-graph-rendering-resource","errorCode":null,"errorMessage":"Unable to allocate graph rendering resource","messagePattern":"Unable to allocate graph rendering resource","errorType":"exception","errorClass":"Error","httpStatus":null,"severity":"error","filePath":"app/src/layout/dock/graph/webglRenderer.ts","lineNumber":534,"sourceCode":"        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":516,"sourceCodeEnd":539,"githubUrl":"https://github.com/siyuan-note/siyuan/blob/8641553a1f07374001902d3ce773285db1292b2d/app/src/layout/dock/graph/webglRenderer.ts#L516-L539","documentation":"Generic resource-allocation guard inside GraphWebGLRenderer (requireValue): a WebGL object creation or location lookup returned null/zero — e.g. createShader, createProgram, or getUniformLocation failed — so a required graph rendering resource could not be allocated.","triggerScenarios":"Thrown at app/src/layout/dock/graph/webglRenderer.ts:534 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Free WebGL resources and contexts to relieve GPU memory pressure","Check uniform names in shader source match lookups","Update GPU drivers or fall back to the canvas renderer"],"exampleFix":null,"handlingStrategy":"type-guard","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"}