-
Notifications
You must be signed in to change notification settings - Fork 5.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
glfwTerminate causes segfault, at XCloseDisplay on master #1146
Comments
Are you asking GLFW to create the context using EGL? |
Thanks for your quick response. All the code interacting with GLFW is in https://github.com/wjakob/nanogui/blob/master/src/screen.cpp It states that the default is an OpenGL 3.3 context (line 121). The example code does not pass the major and minor so the context should be 3.3. In any case, EGL is not found anywhere in the calling code so I have to say, probably not, unless there is something tricky going on. I would have expected glfwGetEGLDisplay somewhere if it were using EGL. Admittedly I am not a GL buff, but I am happy to do any digging. |
Thanks! A call stack for the segfault would be invaluable. If you're able, also try running the current The output of |
Hi again, Stack trace is
|
I was able to get a list of all glfw calls, just started the application, immediately closed, got a segfault, and processed the output. https://gist.github.com/chalecampb/0e2b95ff6201779685e26dd5b912aacb And based on those calls, internally something is routing to the GLFW calls to EGL. So that does actually sound like you guessed the issue correctly. I am not sure how that is happening, I will dig more. I am interested in understanding why that could cause the failure, even then. |
It seems from the gdb call stack like you're not using a debug build ( |
Is this behavior expected under EGL?
…On Tue, Nov 28, 2017, 8:18 AM Camilla Löwy ***@***.***> wrote:
And based on those calls, internally something is routing to the GLFW
calls to EGL.
It seems from the gdb call stack like you're not using a debug build (-g
-O0), so the trace tool you're using may be guessing wrong. I don't see
any calls to _glfwChooseVisualEGL or _glfwCreateContextEGL which would be
there if EGL was used for context creation.
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
<#1146 (comment)>, or mute
the thread
<https://github.com/notifications/unsubscribe-auth/AInNKuropCSAgL7Mt1Opr91aZiM11Bbqks5s7AgigaJpZM4QrIU5>
.
|
There was an issue with recent Nvidia EGL that was fixed yesterday with 9e6c0c7. |
Oh. I can check that tonight and see what happens. Will get back to you.
…On Tue, Nov 28, 2017, 8:26 AM Camilla Löwy ***@***.***> wrote:
There was an issue with recent Nvidia EGL that was fixed yesterday with
9e6c0c7
<9e6c0c7>
.
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
<#1146 (comment)>, or mute
the thread
<https://github.com/notifications/unsubscribe-auth/AInNKhz-VFqDHkgA4BXrd4vCTk52Vt9yks5s7AoZgaJpZM4QrIU5>
.
|
Hi, I wasn't able to checkout that reference, but I did see that it was a 1 line move in x11_init.c where the segfault was happening. So I just made the change and can confirm that it resolves the issue. Thanks! |
Yay! Thank you for the follow-up! |
Hi guys,
Versions - Ubuntu 16.04LTS, with CMake 3.5.1, git 2.7.4, GCC 5.4, NVidia 384.98
I just came from the nanogui repo, I found that their 2 year old example repository (nanogui-test) works but when GLFW is updated to latest, it starts segfaulting on exit. Wanted to bring it to your attention.
The glfw submodule in nanogui-test is pegged at bde2fa0. Syncing to that commit resolves the issue.
I checked where the segfault occurred; the last break I set was at
/glfw/src/x11_init.c:783
Shortly after that the line XCloseDisplay(_glfw.x11.display); causes a segfault.
I saw that there are some issues entered which could cause a segfault if terminate were called twice, but you can inspect the code at nanogui-test, the application only calls glfwTerminate is called only once on exit (from nanogui::shutdown()). Also, in gdb there was no second call to terminate, it only ever failed at the first one.
I'll try to find specifically when the commits stop working. If you have any recommendations let me know.
Thanks!
-Alex
EDIT: Changed NVidia driver version to 384.98
The text was updated successfully, but these errors were encountered: