Game Development Stack Exchange is a question and answer site for professional and independent game developers. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I just tried running my game on a friend's laptop, but for some reason it crashes. The exported .jar runs fine on my machine, and some others too. I can see that is has something to do with the glDrawArrays function, that is this code:


glTranslatef(pos.x*world.chunkSize.x, 0.0f, pos.y*world.chunkSize.z);

glBindBuffer(GL_ARRAY_BUFFER, vao_id);

glVertexAttribPointer(, 3, GL_FLOAT, false, 36, 0);
glVertexAttribPointer(, 3, GL_FLOAT, false, 36, 12);
glVertexAttribPointer(, 2, GL_FLOAT, false, 36, 24);
glVertexAttribPointer(, 1, GL_FLOAT, false, 36, 32);

glDrawArrays(GL_TRIANGLES, 0, arraySize / 9);

glBindBuffer(GL_ARRAY_BUFFER, 0);


As said, the exact same .jar runs fine on my system, and some more I have tried it on.

My friend's pc has Intel HD Graphics 3000, with GLSL version 1.40 and OpenGL 3.1.0.

Crash dump:

Thanks in advance.

share|improve this question

closed as too localized by Byte56, Maik Semder, Sean Middleditch, Trevor Powell, bummzack Mar 25 '13 at 14:37

This question is unlikely to help any future visitors; it is only relevant to a small geographic area, a specific moment in time, or an extraordinarily narrow situation that is not generally applicable to the worldwide audience of the internet. For help making this question more broadly applicable, visit the help center.If this question can be reworded to fit the rules in the help center, please edit the question.

This question on SO might be able to help you. – Polar Mar 22 '13 at 14:36
Some drivers are more forgiving that others. You'll need to ensure you're correctly formatting your data, setting up the pointers correctly and correctly buffering the data. – Byte56 Mar 22 '13 at 16:06
What about the GLSL 2.0 problem? Edit: you said GLSL 1.4 isnt compaitable with glVertexAttribPointer, but you meant OpenGL 1.4 right? So it should be able to run this? – Basaa Mar 22 '13 at 16:13
You're binding vao_id as your vertex buffer - can you confirm that this is intentional and shouldn't be something like "vbo_id" instead? (i.e. you're not using glBindVertexArray/etc anywhere?) – Le Comte du Merde-fou Mar 22 '13 at 17:04
Yep, my answer was wrong, mh01 pointed that out. Henk should be able to run Age of Blocks on their laptop. – Byte56 Mar 22 '13 at 17:08
up vote 1 down vote accepted

Ok, found it. It was a problem in the fragment shader. I passed a vec3 in a vec2 to the fragment shader. For some reason my Ati card driver accepted it, but for example Intel didnt. Thanks for the help all.

share|improve this answer

LWJGL comes with lwjgl.jar, which is needed in your classpath to run the program. It also comes with lwjgl-debug.jar, which can be used instead to find out incorrect OpenGL usage. Either replace lwjgl.jar with lwjgl-debug.jar in your classpath or just rename the files accordingly if that is easier.

The debug version of LWJGL will call glGetError after all OpenGL calls where it is allowed. If the result is not GL_NO_ERROR, it throws an Exception containing the type of the error. You can then check from the stacktrace or by using a debugger which of your OpenGL calls was incorrect. Together with the documentation of the the function you can find out what is wrong.

While this approach doesn't find out all problems and the results differ between graphics cards, it does pretty good job on ensuring that you are using OpenGL correctly. For example I just found out few days ago with this method that I was also passing vector of wrong dimension as a uniform to a shader. I recommend to test the application with the debug version with at least AMD and nVidia cards.

When you are releasing the game, make sure to use the non-debug version of the library again.

share|improve this answer
Wow, nice tip! Thanks! – Basaa Mar 23 '13 at 14:18

Not the answer you're looking for? Browse other questions tagged or ask your own question.