Hello gurus!
This is my first time to post here as I usually find a solution just searching around, but this time I found none. So my problem is that Java crashes upon calling glfwTerminate(). I call it after exiting the application loop and freeing callbacks and OpenGL resources like so:
while(!stopped)
{
glfwPollEvents();
//traverse scene
//render scene, draw code goes here
glfwSwapBuffers(displayID);
}
//free GL resources
glfwSetKeyCallback(displayID, null).free();
...
glfwTerminate();
What's interesting is that if I comment out the draw code the application exits gracefully

. Everything works fine with rendering btw. The draw code goes like:
glBindVertexArray(vao);
glDrawElements(type, numIndices, GL_UNSIGNED_INT, 0);
This problem occurred when I switched from LWJGL 3.0.0a to LWJGL 3.0.0b and later versions including nightlies. Any insight on this will be much appreciated
