-
Notifications
You must be signed in to change notification settings - Fork 30
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
Crash on wayland #174
Comments
I've been able to run Principia with the native Wayland SDL video driver on my Arch system, but I just tested in a NixOS live environment and can reproduce the issue there. I ended up looking at the packaging for my system's GLEW package and saw that it has this patch applied for something with Wayland support, and rebuilding my GLEW package before this commit makes me able to reproduce the crash on Arch too. Seems like upstream GLEW knows about there being issues like this on Wayland: nigels-com/glew#172 The workaround other projects seems to have done is just ignore the diff --git a/src/tms/backend/main.cc b/src/tms/backend/main.cc
index 375a03d7..ca9ba0d9 100644
--- a/src/tms/backend/main.cc
+++ b/src/tms/backend/main.cc
@@ -400,7 +400,7 @@ tbackend_init_surface()
tms_infof("Initializing GLEW...");
GLenum err = glewInit();
- if (err != GLEW_OK) {
+ if (err != GLEW_OK && err != GLEW_ERROR_NO_GLX_DISPLAY) {
tms_infof("ERROR: %s", glewGetErrorString(err));
exit(1);
} I wonder if this workaround would work under NixOS too. |
Apparently the fix also fixes our AppImage builds that have previously been broken when trying with the Wayland video driver. So I assume this was it. |
I confirm that applying the patch in #174 (comment) fixes the issue for me |
Principia version
2024.06.28, NixOS package
OS / Hardware
Summary
principia crashes when run under wayland (
SDL_VIDEODRIVER=wayland
). It works fine under X11 (SDL_VIDEODRIVER=x11
)Steps to reproduce
contents of run.log:
The text was updated successfully, but these errors were encountered: