-
Notifications
You must be signed in to change notification settings - Fork 276
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-Err: currentGLContext was specified with no current GL context in GLXWindow::create #1934
Comments
I thought Wayland wouldn't work but apparently someone says it's working #1891 (comment). I don't know if you need to install XWayland for things to work or not. Other things you can try is
|
Thanks for the reply, I tried running gz with EGL but it gave me the same error. I cannot get vulkan running for now, maybe there's something wrong with my installation:
I experimented some more and tried the following:
Now it seems less like a bug with gz-sim and more like an issue with my installation - so I guess we can close this issue(?). I don't understand much about graphics and rendering. My guess is that something like the I still have no clue yet how to fix this so that I don't need to login to gnome everytime. Any ideas? |
hmm I don't know why that happens. If you do figure it out, please post back and we can add it to the troubleshooting guide, thanks. |
The error message is saying that there's no current GL context. GNOME must be initializing some GL context wich gz-sim then uses. I have the suspicion that sway behaves differently. Luckily in the code there is an option to disable using the current GL Context and creating a new context instead. In line 658 of gz-gui file
I first need to setup a development environment in order to test that but for now it looks promising. |
I remember that's had to be done so that the render engine (ogre2) can operate in the GL context created by Qt. This is mainly so that it can pass the render texture to Qt to be displayed in the GUI window. I suspect if you set it to 0, the GUI window may become black. There was another issue about missing gl context reported in gazebosim/gz-rendering#526 and was fixed by gazebosim/gz-rendering#794. I don't know if it's related or not but the version you are using (7.4.0) should have that fix already. |
actually, the gl context fix is released in gz-rendering 7.3.0. It might be worth checking to see if you have the latest version
|
Thanks for the reply, I checked my versions of After some more trying I came across a workaround to make sure that gz is started with XWayland. By removing the env |
Great glad you found a solution to this. I created a PR to update the troubleshooting page with this info: gazebosim/docs#356. Thanks for reporting back. |
I encountered the same issue recently, and none of the solutions provided here worked for me. Environment
Expected behaviorLaunch Gazebo successfully from both the desktop icon and the terminal. Observed behaviorLaunching from the desktop icon worked, but attempting to launch from terminals other than gnome-terminal (in my case, Hyper terminal and VS Code's terminal) produced the following error: terminal with "-v 4" option outputs: The window created quickly closes after the error (the window borders are different from the Ubuntu native style): Immediate solution
export XDG_CURRENT_DESKTOP=ubuntu:GNOME OR
echo "export XDG_CURRENT_DESKTOP=ubuntu:GNOME" >> ~/.bashrc
OR
unset XDG_SESSION_TYPE DiscussionWhile I understand that everything works fine on Xorg, I'm using Ubuntu on a laptop, and only Wayland recognizes touchpad gestures that significantly improve my productivity (such as opening the app gallery and switching workspaces). Therefore, it's crucial for me to have Gazebo working on Wayland. After extensive analysis, I discovered using It is important to note that there appears to be a relationship between the values in XDG_CURRENT_DESKTOP and XDG_SESSION_TYPE, since either setting the value in the first to ubuntu:GNOME or resetting the second makes Gazebo work correctly. Ps.: XDG_SESSION_TYPE has the same value ("wayland") on all terminals, but its value is ignored when XDG_CURRENT_DESKTOP is defined with the value "ubuntu:GNOME": I decided to investigate a little more what's different between gnome-terminal and Hyper/VS Code terminal. Thanks to neofetch, I found the same difference. In gnome-terminal, neofetch indicates that the DE is GNOME 42.9, while in Hyper/VS Code, it's Unity. "neofetch" on VS Code terminal Suggestion
|
Environment
~/.gz/rendering
Description
gz sim empty.sdf
I expected gazebo to startup and show me an empty world.Steps to reproduce
gz sim empty.sdf
Output
Error output in console:
I also tried following the steps from the troubleshooting docs for 'Unable to create the rendering window'. I could not notice any change in behaviour.
It might be of importance that I'm running sway-wm (wayland).
Running
glxgears
orglxdemo
works fine.The text was updated successfully, but these errors were encountered: