NVIDIA Driver segfault when using invariant, GL3.2

Hi all.

Here is my configuration :
Ubuntu 9.10
NVIDIA driver 190.29 (not the default one, installed by hand)
OpenGL 3.2, core profile (but I get the same problem in compatibility mode)

Problem : when declaring “invariant gl_Position;” in my vertex shader, the program segfaults at glCompileShader(vertex_id).

Here is the OpenGL part :


vertex_id = glCreateShader(GL_VERTEX_SHADER);
fragment_id = glCreateShader(GL_FRAGMENT_SHADER);

const char* vertex_source = loadSource("simple.vert");
const char* fragment_source = loadSource("simple.frag");

glShaderSource(vertex_id, 1, &vertex_source, NULL);
glShaderSource(fragment_id, 1, &fragment_source, NULL);

glCompileShader(vertex_id);
glCompileShader(fragment_id);

printShaderLog(vertex_id, "Vertex shader");
printShaderLog(fragment_id, "Fragment shader");

program_id = glCreateProgram();
glAttachShader(program_id, vertex_id);
glAttachShader(program_id, fragment_id);

glLinkProgram(program_id);

glUseProgram(program_id);

Vertex shader :


#version 150

invariant gl_Position; // HERE : if I comment this line, no segfault...

void main()
{
	gl_Position = vec4(0.0, 0.0, 0.0, 1.0);
}

Fragment shader :


#version 150

out vec4 color;

void main()
{
	color = vec4(0.0, 0.0, 0.0, 1.0);
}

Thanks for your help…

I upgraded my NVidia drivers to 190.53 (seems to be the last version at the time of this writing), and the problem persists…

Is there a bug report system for NVidia drivers ?

My best luck has been to post it here, and hope some NVidia programmer reads it (few drop by here once in a while). I reported one or two bugs and they were fixed eventually, but they may have been reported by others as well, so I’m not sure. I’m not aware of any official bug report system anyway.

Yes. There’s one at https://nvdeveloper.nvidia.com/. Log in, and click Report a Problem in the upper-left toolbar. I’ve had pretty good success with this method.

Posting problems here, if there’s question that what you’re seeing is your bug or a driver bug, also works well.

But over the years I’ve only had marginal success mailing the nvidia product support e-mail addresses. Exceptions being the NVPerfKit and Cg support addresses, but it’s been years since I mailed those.

So I’d recommend https://nvdeveloper.nvidia.com or post on OpenGL.org (the latter only if you’re not sure it’s not your bug).

Thank you very much :slight_smile:

I am not sure it is not a bug from me (maybe I do not use the API correctly), but anyway, adding a line in a shader should not make the driver crash, and make Valgrind unable to tell me what the call stack is…

I will try to reduce the program for removing all dependencies.

Assuming you haven’t corrupted memory before that point, you’re absolutely right. And valgrind should be able to confirm that.

I will try to reduce the program for removing all dependencies.

Ok, and please do post when you get it whittled down to a short test program so we can all run on various driver versions/vendors, and establish whether it’s a driver bug.

Yep, Valgrind does not complain, except for some “jumps depending on uninitialized values” in the driver, which I am not responsible of ^^

I created a similar topic on nvnews.net here : http://www.nvnews.net/vbulletin/showthread.php?p=2168097#post2168097

As I state there, I created a test case, here it is : https://www.etud.insa-toulouse.fr/~lfuentes/test_case.tar.gz

I bundled GLFW and GLEW in it, created scripts for easy compilation and execution and reduced the program to a minimum.
GLFW version is from SVN, GLEW is the latest version, with a tiny modification I made for it not to use the deprecated call to glGetString(GL_EXTENSIONS) (Cf this bug tracker : http://sourceforge.net/tracker/?func=detail&atid=523274&aid=2927731&group_id=67586 )
GLFW needs Xrandr to compile (and maybe something called xf86vm, not sure about this).

As stated in the README file, you normally just need to uncomment “invariant gl_Position;” in “simple.vert” for the program to crash (at least it crashes on my configuration).

I hope the dependency to Xrandr/GLFW is not a problem ^^

Thanks for the support :slight_smile:

Doesn’t crash here with any of the following NVidia 64-bit Linux drivers:

  • 190.32 beta (NVPerfKit)
  • 190.53
  • 195.30 beta

And no valgrind problems save the few uninitialized jump warnings in the NVidia driver.

As I answered on nvnews.net : did you uncomment the line I indicated to uncomment, in simple.vert ? It’s not supposed to crash otherwise…

Yes, I did.

This topic was automatically closed 183 days after the last reply. New replies are no longer allowed.