Skip to content
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

gui example crashing on gui_init #397

Open
dfarmer opened this issue Feb 7, 2021 · 5 comments
Open

gui example crashing on gui_init #397

dfarmer opened this issue Feb 7, 2021 · 5 comments

Comments

@dfarmer
Copy link

dfarmer commented Feb 7, 2021

This is my first time using extempore in several years but I was able to get up & running with the quickstart pretty well and everything was working. Trying to run the gui.xtm sample though is giving me problems. The sys:load call seems to work and everything is compiled fine, but when I issue the (gui_init 800 600) the OpenGL window is displayed for a second and then closes and the extempore process seems to crash but there are no errors logged or anything so it's a little hard for me to know what else I can report. I'm on Windows 10, no issues with OpenGL / DirectX anywhere else (nvidia graphics card). If there's any way I can run it so that I'll get a backtrace I'd be happy to.

@benswift
Copy link
Collaborator

benswift commented Feb 8, 2021

Thanks for the heads up. That example is one I haven't touched in a while, so I'm not too surprised if it's broken. I can have a look into it when I get a chance.

To get a backtrace, you'll need to build with debug symbols (-DCMAKE_BUILD_TYPE=Debug, or just select Debug configuration in Visual Studio) and then run extempore under a debugger.

If you're after something in particular about this example then that's the way to go, anyway. If you're just looking around different examples and wondering why this one isn't working, the answer is that it may well not be your fault. Sorry that I can't be more helpful (I don't have a Windows box handy rn), but will have a look when I get a chance.

@dfarmer
Copy link
Author

dfarmer commented Feb 12, 2021

It seems to just be a bug in nanovg itself... seems to be dereferencing a null pointer when it's trying to set up the initial render shader...
image

@benswift
Copy link
Collaborator

Ok, thanks for digging in to it.

@CastixGitHub
Copy link

This example doesn't work either on linux
Here's the log I got with -DCMAKE_BUILD_TYPE=Debug

Compiled:  gui_render_loop >>> [void,i64,double]*
Compiled:  gui_shutdown >>> [i8*]*
GLFW error 65544: Wayland: Failed to connect to display
GLFW error 65544: Wayland: Failed to connect to display
GLFW error 65537: The GLFW library is not initialized
GLFW error 65537: The GLFW library is not initialized
GLFW error 65537: The GLFW library is not initialized
GLFW error 65537: The GLFW library is not initialized
GLFW error 65537: The GLFW library is not initialized
[1]    34352 abort (core dumped)  ./extempore

I do have wayland 1.19.0-1 installed but i'm in a Xorg session right now

@benswift
Copy link
Collaborator

hey all, as a temporary (and existentially unsatisfying) fix, I've moved the gui.xtm stuff into the contrib folder in 3b77d16

Since it's a bit complicated and may require upstream fixes from nanovg (although since the version of nanovg we use is a bit old now it might not be too hard) it might be a little while before we have a more satisfying fix (although if anyone gets to the bottom of it do let me know 😄).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants