siyuan-note/siyuan · error · Error
Unable to allocate graph rendering resource
Error message
Unable to allocate graph rendering resource
What it means
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.
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
Defensive patterns
Strategy: type-guard
When it happens
Trigger: Thrown at app/src/layout/dock/graph/webglRenderer.ts:534 when the library encounters an invalid state.
Common situations: See trigger scenarios.
AI-assisted analysis of siyuan-note/siyuan@8641553a1f (2026-09-11).
Data as JSON: /api/errors/a30e0a95345d97b4.
Report an issue: GitHub.
Appendix: source
Thrown at app/src/layout/dock/graph/webglRenderer.ts:534
const gl = this.gl;
const shader = this.requireValue(gl.createShader(type));
gl.shaderSource(shader, source);
gl.compileShader(shader);
if (!gl.getShaderParameter(shader, gl.COMPILE_STATUS)) {
const message = gl.getShaderInfoLog(shader) || "Unable to compile graph shader";
gl.deleteShader(shader);
throw new Error(message);
}
return shader;
}
private getUniform(program: WebGLProgram, name: string) {
return this.requireValue(this.gl.getUniformLocation(program, name));
}
private requireValue<T>(value: T | null): T {
if (value === null) {
throw new Error("Unable to allocate graph rendering resource");
}
return value;
}
}
View on GitHub (pinned to 8641553a1f)