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

Segmentation fault when there is no display #98

Open
coderforlife opened this issue Jan 16, 2023 · 2 comments
Open

Segmentation fault when there is no display #98

coderforlife opened this issue Jan 16, 2023 · 2 comments

Comments

@coderforlife
Copy link

When rendering a scene to an output file (and thus no window is opened), this works just fine when there is a display. However, when running from ssh or similar, the program segfaults.

@mkeeter
Copy link
Collaborator

mkeeter commented Jan 17, 2023

Can you post a backtrace? I'm not sure whether a headless session is able to get an OpenGL context, so this may not be possible at all, but a segfault is a bad way to report it.

@coderforlife
Copy link
Author

I did find a workaround. I can use Xvfb to make a fake X session and it works headless then. The Xvfb can even be arbitrarily small (I am using a 640x480 fake screen but generating a 1800x1350 image with the command line). I will still try to get a backtrace as well, but for the moment my problem has an effective workaround. It seems to me to not be an OpenGL issue but instead a Qt issue (Qt won't start without a display, and even though you are never opening a Qt window, it is still looking for that display). I do get a warning message from Xvfb every time f3d is run that a keyboard mapping can't be loaded (for emojis...), which is another indication that it is Qt and not OpenGL opening the current display.

I hope that doing this isn't using software rendering, since the machine has multiple GPUs that I usually use headless for other purposes. Is there any way to test if your program is using software rendering or not? On the one model I tried (a fairly complex/large STL) it renders essentially instantly.

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

2 participants