SHADERed icon indicating copy to clipboard operation
SHADERed copied to clipboard

Empty array GLSL crash

Open THEREALWWEFAN231 opened this issue 3 years ago • 2 comments

Empty arrays in a GLSL "pixel" shader causes the program to crash, I tested it in a new project and it crash. vec4[] colors = vec4[](); You have to edit the shader file with another editor to remove that line, or comment it out to make SHADERed not crash.

It doesn't crash if there is something in the array.

THEREALWWEFAN231 avatar Apr 03 '21 19:04 THEREALWWEFAN231

I just tested it out and I get a "array constructor must have at least one argument". Unfortunately, it seems I cannot reproduce it on my machine. Mind giving me the smallest code example that crashes the program?

dfranx avatar Apr 04 '21 13:04 dfranx

Huh, maybe it's my graphics or something, but I created a new glsl project and added a(commented array) //vec4[] colors = vec4;, I saved the project, it didn't crash, I uncommented the array, saved the file/project, and it crashed.

image

THEREALWWEFAN231 avatar Apr 04 '21 16:04 THEREALWWEFAN231