Random crashes with lwjgl + SWT on Intel GPUs on OS X

Started by SwtUser, August 19, 2010, 13:58:33

Previous topic - Next topic

SwtUser

Hello,

I'm currently trying to embed lwjgl in a SWT application and I'm expierencing random crashes on OS X with the attached stack trace. This happens sometimes (~10%) when running the following code:

public void drawQuad() {
		// For some reason I can't get glDrawArrays to work.
		glBegin(GL_TRIANGLE_FAN);
			glVertex3f(0, 1, 0);
			glVertex3f(0, 0, 0);
			glVertex3f(1, 0, 0);
			glVertex3f(1, 1, 0);
		glEnd();
	}


The crash only occurs when the code is executed for the first time. It also only crashes when using the embedded GPU of my i5 CPU, never with Nvidia GPUs (tested 9600M, 9400M and 330M). I haven't had a chance to test ATI GPUs or other operating systems yet.

It always crashed with all GPUs when I used glDrawArrays in this method (but I don't have a crash log of this crash)

Matthias

Looks like a buggy graphics driver. Such simple GL calls (the calls which do not accept a NIO buffer) should not cause a native crash.

Passing too small arrays to gl*Pointer (eg using vertex arrays) can crash if you access elements outside the buffer as LWJGL can't check this. But glBegin should never cause a native crash.

SwtUser

Quote from: Matthias on August 19, 2010, 16:34:27
Passing too small arrays to gl*Pointer (eg using vertex arrays) can crash if you access elements outside the buffer as LWJGL can't check this.

I suspected that was the cause and increased the size of the buffer (twice as much as required), but that didn't change anything.