{"record":{"id":"c7efbcc3584aae01","repo":"perspective-dev/perspective","slug":"vertex-shader-compile-error-name-info","errorCode":null,"errorMessage":"Vertex shader compile error [${name}]: ${info}","messagePattern":"Vertex shader compile error \\[(.+?)\\]: (.+?)","errorType":"exception","errorClass":"Error","httpStatus":null,"severity":"error","filePath":"packages/viewer-charts/src/ts/webgl/shader-registry.ts","lineNumber":56,"sourceCode":"            this.getOrCreate(spec.name, spec.vert, spec.frag);\n        }\n    }\n\n    getOrCreate(name: string, vertSrc: string, fragSrc: string): WebGLProgram {\n        let program = this._programs.get(name);\n        if (program) {\n            return program;\n        }\n\n        const gl = this._gl;\n\n        const vert = gl.createShader(gl.VERTEX_SHADER)!;\n        gl.shaderSource(vert, vertSrc);\n        gl.compileShader(vert);\n        if (!gl.getShaderParameter(vert, gl.COMPILE_STATUS)) {\n            const info = gl.getShaderInfoLog(vert);\n            gl.deleteShader(vert);\n            throw new Error(`Vertex shader compile error [${name}]: ${info}`);\n        }\n\n        const frag = gl.createShader(gl.FRAGMENT_SHADER)!;\n        gl.shaderSource(frag, fragSrc);\n        gl.compileShader(frag);\n        if (!gl.getShaderParameter(frag, gl.COMPILE_STATUS)) {\n            const info = gl.getShaderInfoLog(frag);\n            gl.deleteShader(vert);\n            gl.deleteShader(frag);\n            throw new Error(`Fragment shader compile error [${name}]: ${info}`);\n        }\n\n        program = gl.createProgram()!;\n        gl.attachShader(program, vert);\n        gl.attachShader(program, frag);\n        gl.linkProgram(program);\n\n        if (!gl.getProgramParameter(program, gl.LINK_STATUS)) {","sourceCodeStart":38,"sourceCodeEnd":74,"githubUrl":"https://github.com/perspective-dev/perspective/blob/11c8238c0c9c0b9e490b5a6a2dc277afad1e980a/packages/viewer-charts/src/ts/webgl/shader-registry.ts#L38-L74","documentation":"During program creation in ShaderRegistry.getOrCreate, the vertex shader failed to compile: gl.COMPILE_STATUS was false and the driver's getShaderInfoLog is embedded in the message. This indicates a GLSL syntax error, unsupported version directive, or driver-specific incompatibility in the source registered under the given program name.","triggerScenarios":"Thrown at packages/viewer-charts/src/ts/webgl/shader-registry.ts:56 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Read the attached GLSL info log for the exact line/column error","Check shader version directives (#version 300 es) match the available context (WebGL1 vs WebGL2)","Validate GLSL offline (glslangValidator) and fix syntax/type errors in the vertex source"],"exampleFix":null,"handlingStrategy":"try-catch","validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"11c8238c0c9c0b9e490b5a6a2dc277afad1e980a","analyzedAt":"2026-09-09T00:35:19.377Z","contentChangedAt":"2026-09-09T00:35:19.377Z","schemaVersion":2},"datasetVersion":"2026-09-17T15:17:12.973Z"}