danielscherzer / GLSL

VSIX Project that provides GLSL language integration.
258 stars 28 forks source link

Instant crash when opening this geometry shader #9

Closed human-0 closed 6 years ago

human-0 commented 6 years ago

Installed product versions

Description

When opening a particular geometry shader, Visual Studio instantly crashes with the error: System.AccessViolationException (Trying to read protected data).

Steps to recreate

  1. open this file: https://www.dropbox.com/s/4venwdszb7qn6we/shape.geom?dl=0

Current behavior

Visual studio crashes. It did not crash during the creation of the file

Expected behavior

It should be working as normal.

danielscherzer commented 6 years ago

Interesting OpenGL shader compiler error! Even this one line geometry shader
void main() { gl_Position = vertex0+vec4(gl_in.gl_Position[0]); } kills the compiler. I now catch this exception and give an error message and squiggle. The error message is just a general shader compieler has crashed. I was able to continue editing the shader afterwards, but this is a serious exception, which could kill the whole OpenGL context in a different driver version.

human-0 commented 6 years ago

Thanks! It all works correctly now and I can fix the silly mistake in the shader!