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

Fix compilation on simple_demo_qml on Windows #986

Merged
merged 1 commit into from
Apr 15, 2024

Conversation

traversaro
Copy link
Contributor

@traversaro traversaro commented Apr 13, 2024

🦟 Bug fix

Fixes compilation of simple_demo_qml on Windows.

Summary

This is not particularly useful as it is, as it crashes with error:

D:\src\pixi_gazebodistro\ionic_ws\src\gz-rendering\examples\simple_demo_qml\build>pixi run simple_demo_qml.exe --help
[Msg] Loading plugin [gz-rendering-ogre2]
[Err] [D:\src\pixi_gazebodistro\ionic_ws\src\gz-rendering\ogre2\src\Ogre2RenderEngine.cc:1285]  Unable to create the rendering window: OGRE EXCEPTION(3:RenderingAPIException): wglMakeCurrent failed: The pixel format is invalid.
 in Win32Window::create at D:\bld\ogre-next_1712610228408\work\RenderSystems\GL3Plus\src\windowing\win32\OgreWin32Window.cpp (line 624)
[Err] [D:\src\pixi_gazebodistro\ionic_ws\src\gz-rendering\ogre2\src\Ogre2RenderEngine.cc:1285]  Unable to create the rendering window: OGRE EXCEPTION(3:RenderingAPIException): currentGLContext was specified with no current GL context in Win32Window::create at D:\bld\ogre-next_1712610228408\work\RenderSystems\GL3Plus\src\windowing\win32\OgreWin32Window.cpp (line 230)
[Err] [D:\src\pixi_gazebodistro\ionic_ws\src\gz-rendering\ogre2\src\Ogre2RenderEngine.cc:1285]  Unable to create the rendering window: OGRE EXCEPTION(3:RenderingAPIException): currentGLContext was specified with no current GL context in Win32Window::create at D:\bld\ogre-next_1712610228408\work\RenderSystems\GL3Plus\src\windowing\win32\OgreWin32Window.cpp (line 230)
[Err] [D:\src\pixi_gazebodistro\ionic_ws\src\gz-rendering\ogre2\src\Ogre2RenderEngine.cc:1285]  Unable to create the rendering window: OGRE EXCEPTION(3:RenderingAPIException): currentGLContext was specified with no current GL context in Win32Window::create at D:\bld\ogre-next_1712610228408\work\RenderSystems\GL3Plus\src\windowing\win32\OgreWin32Window.cpp (line 230)
[Err] [D:\src\pixi_gazebodistro\ionic_ws\src\gz-rendering\ogre2\src\Ogre2RenderEngine.cc:1285]  Unable to create the rendering window: OGRE EXCEPTION(3:RenderingAPIException): currentGLContext was specified with no current GL context in Win32Window::create at D:\bld\ogre-next_1712610228408\work\RenderSystems\GL3Plus\src\windowing\win32\OgreWin32Window.cpp (line 230)
[Err] [D:\src\pixi_gazebodistro\ionic_ws\src\gz-rendering\ogre2\src\Ogre2RenderEngine.cc:1285]  Unable to create the rendering window: OGRE EXCEPTION(3:RenderingAPIException): currentGLContext was specified with no current GL context in Win32Window::create at D:\bld\ogre-next_1712610228408\work\RenderSystems\GL3Plus\src\windowing\win32\OgreWin32Window.cpp (line 230)
[Err] [D:\src\pixi_gazebodistro\ionic_ws\src\gz-rendering\ogre2\src\Ogre2RenderEngine.cc:1285]  Unable to create the rendering window: OGRE EXCEPTION(3:RenderingAPIException): currentGLContext was specified with no current GL context in Win32Window::create at D:\bld\ogre-next_1712610228408\work\RenderSystems\GL3Plus\src\windowing\win32\OgreWin32Window.cpp (line 230)
[Err] [D:\src\pixi_gazebodistro\ionic_ws\src\gz-rendering\ogre2\src\Ogre2RenderEngine.cc:1285]  Unable to create the rendering window: OGRE EXCEPTION(3:RenderingAPIException): currentGLContext was specified with no current GL context in Win32Window::create at D:\bld\ogre-next_1712610228408\work\RenderSystems\GL3Plus\src\windowing\win32\OgreWin32Window.cpp (line 230)
[Err] [D:\src\pixi_gazebodistro\ionic_ws\src\gz-rendering\ogre2\src\Ogre2RenderEngine.cc:1285]  Unable to create the rendering window: OGRE EXCEPTION(3:RenderingAPIException): currentGLContext was specified with no current GL context in Win32Window::create at D:\bld\ogre-next_1712610228408\work\RenderSystems\GL3Plus\src\windowing\win32\OgreWin32Window.cpp (line 230)
[Err] [D:\src\pixi_gazebodistro\ionic_ws\src\gz-rendering\ogre2\src\Ogre2RenderEngine.cc:1285]  Unable to create the rendering window: OGRE EXCEPTION(3:RenderingAPIException): currentGLContext was specified with no current GL context in Win32Window::create at D:\bld\ogre-next_1712610228408\work\RenderSystems\GL3Plus\src\windowing\win32\OgreWin32Window.cpp (line 230)
[Err] [D:\src\pixi_gazebodistro\ionic_ws\src\gz-rendering\ogre2\src\Ogre2RenderEngine.cc:1293] Unable to create the rendering window after [11] attempts.
[Err] [D:\src\pixi_gazebodistro\ionic_ws\src\gz-rendering\ogre2\src\Ogre2RenderEngine.cc:1191] Failed to create dummy render window.
[Err] [D:\src\pixi_gazebodistro\ionic_ws\src\gz-rendering\ogre2\src\Ogre2RenderEngine.cc:1192] Please see the troubleshooting page for possible fixes: https://gazebosim.org/docs/fortress/troubleshooting

However, as this it is the same crash of gazebosim/gz-sim#2089, it is quite useful to debug that problem.

Checklist

  • Signed all commits for DCO
  • Added tests
  • Updated documentation (as needed)
  • Updated migration guide (as needed)
  • Consider updating Python bindings (if the library has them)
  • codecheck passed (See contributing)
  • All tests passed (See test coverage)
  • While waiting for a review on your PR, please help review another open pull request to support the maintainers

Note to maintainers: Remember to use Squash-Merge and edit the commit message to match the pull request summary while retaining Signed-off-by messages.

@traversaro traversaro requested a review from iche033 as a code owner April 13, 2024 13:43
@github-actions github-actions bot added the 🏛️ ionic Gazebo Ionic label Apr 13, 2024
Copy link

codecov bot commented Apr 13, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 75.79%. Comparing base (f6ad8a8) to head (6e334ea).
Report is 1 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##             main     #986   +/-   ##
=======================================
  Coverage   75.79%   75.79%           
=======================================
  Files         177      177           
  Lines       16961    16961           
=======================================
+ Hits        12855    12856    +1     
+ Misses       4106     4105    -1     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@traversaro traversaro mentioned this pull request Apr 13, 2024
8 tasks
@ahcorde ahcorde enabled auto-merge (squash) April 15, 2024 07:17
@azeey azeey disabled auto-merge April 15, 2024 14:19
@azeey azeey merged commit 38baca4 into gazebosim:main Apr 15, 2024
7 of 9 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🏛️ ionic Gazebo Ionic
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

3 participants