ros-visualization/rviz

Fail to make context current when running rviz2 on Ubuntu 20.04.3

zoneyzhou opened this issue · 2 comments

OS Version: Ubuntu 20.04.3
ROS Distro: ros2/humble

shell:#glxinfo -B
name of display: localhost:10.0
display: localhost:10 screen: 0
direct rendering: Yes
Extended renderer info (GLX_MESA_query_renderer):
Vendor: Mesa/X.org (0xffffffff)
Device: llvmpipe (LLVM 12.0.0, 128 bits) (0xffffffff)
Version: 21.2.6
Accelerated: no
Video memory: 7644MB
Unified memory: no
Preferred profile: core (0x1)
Max core profile version: 4.5
Max compat profile version: 3.1
Max GLES1 profile version: 1.1
Max GLES[23] profile version: 3.2
OpenGL vendor string: Mesa/X.org
OpenGL renderer string: llvmpipe (LLVM 12.0.0, 128 bits)
OpenGL core profile version string: 4.5 (Core Profile) Mesa 21.2.6
OpenGL core profile shading language version string: 4.50
OpenGL core profile context flags: (none)
OpenGL core profile profile mask: core profile

OpenGL version string: 3.1 Mesa 21.2.6
OpenGL shading language version string: 1.40
OpenGL context flags: (none)

OpenGL ES profile version string: OpenGL ES 3.2 Mesa 21.2.6
OpenGL ES profile shading language version string: OpenGL ES GLSL ES 3.20

When i run rviz2 it gives these error outputs:

ros2 run rviz2 rviz2

Got keys from plugin meta data ("xdg-shell")
QFactoryLoader::QFactoryLoader() checking directory path "/root/ros2_humble/build/rviz2/wayland-shell-integration" ...
loaded library "/usr/lib/aarch64-linux-gnu/qt5/plugins/wayland-shell-integration/libxdg-shell.so"
Using the 'xdg-shell' shell integration
QFactoryLoader::QFactoryLoader() checking directory path "/usr/lib/aarch64-linux-gnu/qt5/plugins/accessible" ...
QFactoryLoader::QFactoryLoader() checking directory path "/root/ros2_humble/build/rviz2/accessible" ...
[ERROR] [1704879879.924995612] [rviz2]: RenderingAPIException: Fail to make context current in setCurrent at /root/ros2_humble/build/rviz_ogre_vendor/ogre-v1.12.1-prefix/src/ogre-v1.12.1/RenderSystems/GLSupport/src/EGL/OgreEGLContext.cpp (line 127)
[ERROR] [1704879879.926757517] [rviz2]: rviz::RenderSystem: error creating render window: RenderingAPIException: Fail to make context current in setCurrent at /root/ros2_humble/build/rviz_ogre_vendor/ogre-v1.12.1-prefix/src/ogre-v1.12.1/RenderSystems/GLSupport/src/EGL/OgreEGLContext.cpp (line 127)
...
[ERROR] [1704879882.380341289] [rviz2]: RenderingAPIException: Fail to make context current in setCurrent at /root/ros2_humble/build/rviz_ogre_vendor/ogre-v1.12.1-prefix/src/ogre-v1.12.1/RenderSystems/GLSupport/src/EGL/OgreEGLContext.cpp (line 127)
[ERROR] [1704879882.380459152] [rviz2]: rviz::RenderSystem: error creating render window: RenderingAPIException: Fail to make context current in setCurrent at /root/ros2_humble/build/rviz_ogre_vendor/ogre-v1.12.1-prefix/src/ogre-v1.12.1/RenderSystems/GLSupport/src/EGL/OgreEGLContext.cpp (line 127)
[ERROR] [1704879882.380508891] [rviz2]: Unable to create the rendering window after 100 tries

You describe an issue with rviz2. Please file that issue with the rviz2 project: https://github.com/ros2/rviz

Thanks.