(Opening this issue here because I'm using it with @kmamal/sdl, and with the gl repo being a fork, it has issues disabled, probably unintentionally?)
My process just segfaulted after a GLSL compilation error; this may very possibly be caused by my somewhat janky hot-reloading setup, but I was unable to determine this from the stacktrace, so I'm posting the stacktrace here in case it's a gl bug.
The error output in terminal:
[nix-shell:~/projects/breakout]$ node bootstrap.js
file number 0: /home/sven/projects/breakout/game.js:27:24
1|
2| attribute vec2 position;
3| varying vec3 color;
4| uniform float u_step;
5|
6| void main() {
7| gl_Position = vec4(position, 0, 1);
8| float red = mix(0, 1, abs(sin(u_step + x)));
9| float blue = mix(1.0, 0.0, abs(sin(u_step + y)));
| ^^^
| undeclared identifier
| ^^^
| no matching overloaded function found
|
10| color = vec3(position, 0);
| ^^^
| undeclared identifier
|
11| }
Error: (regl) Error compiling vertex shader, /home/sven/projects/breakout/game.js:27:24
at Function.raise (/home/sven/projects/breakout/node_modules/.pnpm/regl@2.1.0/node_modules/regl/dist/regl.js:47:15)
at Function.checkShaderError [as shaderError] (/home/sven/projects/breakout/node_modules/.pnpm/regl@2.1.0/node_modules/regl/dist/regl.js:339:11)
at Object.getShader [as shader] (/home/sven/projects/breakout/node_modules/.pnpm/regl@2.1.0/node_modules/regl/dist/regl.js:5499:15)
at /home/sven/projects/breakout/node_modules/.pnpm/regl@2.1.0/node_modules/regl/dist/regl.js:6882:23
at Function.checkOptional [as optional] (/home/sven/projects/breakout/node_modules/.pnpm/regl@2.1.0/node_modules/regl/dist/regl.js:432:3)
at parseShader (/home/sven/projects/breakout/node_modules/.pnpm/regl@2.1.0/node_modules/regl/dist/regl.js:6881:17)
at parseProgram (/home/sven/projects/breakout/node_modules/.pnpm/regl@2.1.0/node_modules/regl/dist/regl.js:6908:16)
at parseArguments (/home/sven/projects/breakout/node_modules/.pnpm/regl@2.1.0/node_modules/regl/dist/regl.js:8115:18)
at Object.compileCommand [as compile] (/home/sven/projects/breakout/node_modules/.pnpm/regl@2.1.0/node_modules/regl/dist/regl.js:9628:16)
at compileProcedure (/home/sven/projects/breakout/node_modules/.pnpm/regl@2.1.0/node_modules/regl/dist/regl.js:10253:25)
ERROR: Error: (regl) Error compiling vertex shader, /home/sven/projects/breakout/game.js:27:24
at Function.raise (/home/sven/projects/breakout/node_modules/.pnpm/regl@2.1.0/node_modules/regl/dist/regl.js:47:15)
at Function.checkShaderError [as shaderError] (/home/sven/projects/breakout/node_modules/.pnpm/regl@2.1.0/node_modules/regl/dist/regl.js:339:11)
at Object.getShader [as shader] (/home/sven/projects/breakout/node_modules/.pnpm/regl@2.1.0/node_modules/regl/dist/regl.js:5499:15)
at /home/sven/projects/breakout/node_modules/.pnpm/regl@2.1.0/node_modules/regl/dist/regl.js:6882:23
at Function.checkOptional [as optional] (/home/sven/projects/breakout/node_modules/.pnpm/regl@2.1.0/node_modules/regl/dist/regl.js:432:3)
at parseShader (/home/sven/projects/breakout/node_modules/.pnpm/regl@2.1.0/node_modules/regl/dist/regl.js:6881:17)
at parseProgram (/home/sven/projects/breakout/node_modules/.pnpm/regl@2.1.0/node_modules/regl/dist/regl.js:6908:16)
at parseArguments (/home/sven/projects/breakout/node_modules/.pnpm/regl@2.1.0/node_modules/regl/dist/regl.js:8115:18)
at Object.compileCommand [as compile] (/home/sven/projects/breakout/node_modules/.pnpm/regl@2.1.0/node_modules/regl/dist/regl.js:9628:16)
at compileProcedure (/home/sven/projects/breakout/node_modules/.pnpm/regl@2.1.0/node_modules/regl/dist/regl.js:10253:25)
Segmentation fault (core dumped)
(Opening this issue here because I'm using it with
@kmamal/sdl
, and with thegl
repo being a fork, it has issues disabled, probably unintentionally?)My process just segfaulted after a GLSL compilation error; this may very possibly be caused by my somewhat janky hot-reloading setup, but I was unable to determine this from the stacktrace, so I'm posting the stacktrace here in case it's a
gl
bug.The error output in terminal:
Coredump/stacktrace:
bootstrap.js
, which is the wrapper that handles hot-reloading:game.js
, which is the actual file I'm working in:For the sake of completeness, the
fallback-error.js
for error-after-start conditions: