cancel
Showing results for 
Search instead for 
Did you mean: 

Archives Discussions

einzuweitesfeld
Adept I

calling glLinkProgram crashes

When linking a program that consists of a FS from the following code the call to glLinkProgram crashes with a NULL pointer exception:

#version 450

uniform int umsch;//umschalten

layout(binding = 0) uniform sampler2D FarbTextur;

                       in  vec2 ausgTexKoord;

layout(location = 0)   out vec4 Helligkeit;

void main( void ){

  float test_ft;

  float asdf;

  do {

    if( ausgTexKoord.x < 0.0f || ausgTexKoord.y < 0.0f )

      test_ft = 1.0;

  } while(false);

  if(umsch == 1){

    test_ft = asdf;

  }

  Helligkeit = vec4(test_ft);

  test_ft = texture( FarbTextur, ausgTexKoord ).x;

}

The code looks pretty random and that's because it is. I have tried to remove as much from it while still triggering the exception and that's what I end up with.

Note that both, the VS and the FS compile without problems and I check that by calling glGetShaderiv with the GL_COMPILE_STATUS argument. Also attaching the compiled Shaders to the program works fine. But when I call glLinkProgram on said program the (C++) application crashes with a NULL pointer exception.

I have tested on an RX 480 with the latest drivers. It says Driver Packaging Version is 16.50.2011-161223a-310015C and OpenGL Driver version 6.14.10.13464 and my OS is Windows 7 64 bit.

I have attached a zip file with a Visual C++ 2010 project and the following relevant files:

  • Quelle1.cpp
  • Shader/test.frag
  • Shader/test.vert

Can someone confirm this behaviour?

0 Likes
4 Replies
dwitczak
Staff
Staff

Re: calling glLinkProgram crashes

Thanks for the report and the repro! I've passed it to the relevant team for further investigation. Will get back to you as soon as I hear back.

0 Likes
einzuweitesfeld
Adept I

Re: calling glLinkProgram crashes

Thank you.

Have you personally observed a crash with the code I attached? Atm I don't know if it's a problem exclusively on my setup.

0 Likes
dwitczak
Staff
Staff

Re: calling glLinkProgram crashes

It does appear to crash somewhere inside one of the driver threads, from what I can see. That being said, I don't deal directly with the GL stack, so that's as much as I can help you with this issue, I'm afraid.

0 Likes
dwitczak
Staff
Staff

Re: calling glLinkProgram crashes

Issue has been confirmed by the team. Will let you know as soon as I hear that the bug has been fixed. Many thanks for letting us know about the problem!

0 Likes