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

Failed to run the Irrlicht visualizer on Linux #1116

Closed
S-Dafarra opened this issue Sep 26, 2023 · 6 comments · Fixed by #1119
Closed

Failed to run the Irrlicht visualizer on Linux #1116

S-Dafarra opened this issue Sep 26, 2023 · 6 comments · Fixed by #1119

Comments

@S-Dafarra
Copy link
Contributor

Whenever I try to launch a iDynTree::Visualizer instance on Ubuntu 20.04, I get the following error:

X Error of failed request:  BadMatch (invalid parameter attributes)
  Major opcode of failed request:  152 (GLX)
  Minor opcode of failed request:  31 (X_GLXCreateWindow)
  Serial number of failed request:  27
  Current serial number in output stream:  28
Irrlicht Engine version 1.8.4
Linux 5.15.0-84-generic #93~20.04.1-Ubuntu SMP Wed Sep 6 16:15:40 UTC 2023 x86_64

Getting into it, I noticed that the error occurs when initializing irrlicht in

pimpl->m_irrDevice = irr::createDeviceEx(irrDevParams);

and not when creating the window, which is done earlier in
pimpl->m_window = glfwCreateWindow(visualizerOptions.winWidth, visualizerOptions.winHeight, "iDynTree Visualizer", nullptr, nullptr);

Currently, I am using the nvidia-driver-525

@S-Dafarra
Copy link
Contributor Author

I noticed that if I comment the lines

pimpl->m_windowId = glfwGetX11Window(pimpl->m_window);
irrDevParams.WindowId = (void*)(pimpl->m_windowId);

it works.

I am planning to open a PR to use the classical window creation in Linux, while keeping the use of SDL for Windows and Mac

@traversaro
Copy link
Member

Do you think this was a regression of #1071 ?

@traversaro
Copy link
Member

I am planning to open a PR to use the classical window creation in Linux, while keeping the use of SDL for Windows and Mac

SDL or glfw?

@S-Dafarra
Copy link
Contributor Author

I think so, although I am not sure why it is happening now. I did test it on Linux back in time. As a mater of fact, I developed it in the very same machine.

I am planning to open a PR to use the classical window creation in Linux, while keeping the use of SDL for Windows and Mac

SDL or glfw?

glfw to create the window and SDL on the irrlicht side. Since on Ubuntu with irrlicht from apt we cannot use SDL, maybe we can still let irrlicht create the window on Ubuntu, since there are no resize issues

S-Dafarra added a commit to S-Dafarra/idyntree that referenced this issue Sep 26, 2023
@S-Dafarra
Copy link
Contributor Author

Relevant commit: S-Dafarra@6c51ff8

I will test it on Windows too

@S-Dafarra
Copy link
Contributor Author

Relevant commit: S-Dafarra@6c51ff8

I will test it on Windows too

Tested and working (actually on the Windows and Mac side, nothing should have changed). Corresponding PR: #1119

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

Successfully merging a pull request may close this issue.

2 participants