glGetError gives 0xc0000005

Hello, I’m a guy with two computers and I made an openGL application. This application used to work on both machines, but since lately it crashes on one of my machines and I haven’t made any recent changes to it.

During debug, I’ve found out that the crash occurs at one of the calls to ‘glGetError’. It doesn’t occur at the first call to ‘glGetError’.

The error code is always 0xc0000005.

I’ve also seen some of my non-openGL applications act weird on this machine, but they don’t crash.

Does anyone know what 0xc0000005 on glGetError means? It could help me fix my computer.

I’m running in windows XP home edition on the computer that crashes. The other one uses windows XP professional.

Which hardware and drivers you use on machine where your program crash?

gluGetErrorString or something like that gives you the meaning of the error.

0xc0000005 is not returned by glGetError. It’s the error code I see in the error report in windows, after the program crashes.

This is on the receipt that I got when I bought the computer:

CPU intel dual core E2180 2.0 Ghz FSB800 S775

asus geforce 9600gt 256 MB Silent

Asus M2N-MX SE

DVD Brander

Western Digital 160 GB SATA II

GMB Cardreader


450 Watt ATX PSU

Codegen 3330 Miditower

I assume you have installed driver for that NVidia card.
Such errors is common when app overwrite part of its memory and affect opengl state or if you have multiple threads and one thread use some buffer to upload texture to opengl while second thread delete that buffer.

what exactly do you mean with the app overwriting memory and affecting the openGL state? If I would change bits in a memory block that wasn’t allocated, then shouldn’t the crash occur at the moment of changing instead of at the call to glGetError?

My application indeed uses a second thread, in which textures, shaders, etc. are loaded. But I’ve verified that this thread has ended long before the call to glGetError that gives this crash.

This crash occurs always in the same glGetError call somewhere in the rendering function. Strangely, the crash doesn’t happen with the first, but with the second call to that rendering function.

I’ve found something new:

There’s a call to ‘glBindFramebufferEXT’ with the GLuint variable ‘fbo’ as argument that was given the value ‘1’ by openGL. If I comment out this ‘glBindFramebufferEXT’ call I won’t get the crash.

It’s not after the first call to ‘glBindFramebufferEXT’ after which the crash occurs, but after the third. I’ve checked that the inserted argument ‘fbo’ stays ‘1’ all the time.

the fbo object is created like this:

	glGenFramebuffersEXT(1, &fbo);

	glBindFramebufferEXT(GL_FRAMEBUFFER_EXT, fbo);


	glBindTexture(GL_TEXTURE_2D, tex);

	glTexImage2D(GL_TEXTURE_2D, 0, GL_RGBA8, width, height, 0, GL_RGBA, GL_UNSIGNED_BYTE, NULL);




	glBindFramebufferEXT(GL_FRAMEBUFFER_EXT, 0);
	glBindTexture(GL_TEXTURE_2D, 0);

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