GTX 1060 with Ubuntu 12.04 - OpenGL problem


I’m having some troubles with a function of openGL (glDeleteTextures()). When I call it, I get a segmentation fault…

I tried the same code in another computer with other hardware configuration, so I think the problem is that(hardware), but I want to know if someone has had the same problem and if you know a way to solve it(without changing the hardware ;) )

My configuration:
-Processor------> Intel Core i7-7700
-Graphic card—> GTX 1060
-SO-------------> Ubuntu 12.04
-Kernel version-> 3.8.0-44
-Nvidia-version-> 387.34

Depends on language and code, minimal example to reproduce? General hint:

More or less this is a resume of the proyect. If I call the first function, everything works fine, but when I need to release the resources, I call the second function and it crashes; and I check that the program stops in the function “glDeleteTextures()”

typedef struct {
	GLuint tx;
	uint32 height;
	uint32 width;
} a;

function gen(){

    a * xx;
    GLuint tx = 0;

    glGenTextures(1, &tx);
    glBindTexture(GL_TEXTURE_RECTANGLE_ARB, tx);
    xx->tx = tx;

function release(a *x){
    glDeleteTextures(1, &x->tx);
    x->tx = 0;

Does it still crash if you run it with env variable


Yes… I just tried it and it still crash