Hi,
so apparently I’ve found a bug between GLFW and Angle.
The angle examples terminate fine, so do the glfw examples.
The shaders I’ve used render fine and glGetString shows that indeed, Angle is being used.
The issue I’m having is that when calling glfwTerminate(), I get memory access violation (segfault) and a core dump.
I’ve run a gdb backtrace on it
#0 0x00007ffff72fef37 in _XSend () from /usr/lib/libX11.so.6
#1 0x00007ffff72f77d9 in XQueryExtension () from /usr/lib/libX11.so.6
#2 0x00007ffff6de7dd8 in ?? () from /usr/lib/libGLX.so.0
#3 0x00007ffff6dea2f9 in ?? () from /usr/lib/libGLX.so.0
#4 0x00007ffff6dea799 in glXDestroyPbuffer () from /usr/lib/libGLX.so.0
#5 0x00007ffff79672b7 in rx::DisplayGLX::terminate() ()
from /home/a/libraries/angle/out/Release/libGLESv2.so
#6 0x00007ffff77bbd90 in egl::Display::terminate(egl::Thread*, egl::Display::TerminateReason) ()
from /home/a/libraries/angle/out/Release/libGLESv2.so
#7 0x00007ffff760fb92 in egl::Terminate(egl::Thread*, egl::Display*) ()
from /home/a/libraries/angle/out/Release/libGLESv2.so
#8 0x00007ffff7611678 in EGL_Terminate () from /home/a/libraries/angle/out/Release/libGLESv2.so
#9 0x00007ffff7c73ec2 in eglTerminate () from /home/a/libraries/angle/out/Release/libEGL.so
#10 0x000055555559cc93 in _glfwTerminateEGL ()
#11 0x000055555558e53a in _glfwTerminateX11 ()
#12 0x000055555557be24 in terminate ()
#13 0x000055555557cea8 in glfwTerminate ()
#14 0x000055555557a083 in shutdown () at esshader.c:503
#15 0x000055555557a785 in main (argc=1, argv=0x7fffffffe2b8) at esshader.c:722
Running glfwDestroyWindow(window);
beforehand doesn’t change anything.
I’m using GLFW to load Angle:
#define GLFW_INCLUDE_ES3
#include <GLFW/glfw3.h>
And to initialize I’m doing this:
if (!glfwInit()) {
die("Unable to initialize GLFW.\n");
}
glfwWindowHint(GLFW_CLIENT_API, GLFW_OPENGL_ES_API);
glfwWindowHint(GLFW_CONTEXT_CREATION_API, GLFW_EGL_CONTEXT_API);
glfwWindowHint(GLFW_CONTEXT_VERSION_MAJOR, 3);
glfwWindowHint(GLFW_CONTEXT_VERSION_MINOR, 0);
if (!(window = glfwCreateWindow(width, height, "esshader", monitor, NULL))) {
glfwTerminate();
die("Unable to create GLFW window.\n");
}
glfwMakeContextCurrent(window);
Maybe I’m doing something wrong again?