ITADN

RViz gives runtime errors without mesa in LD_LIBRARY_PATH

#838OpenAmronos 创建于 2026-04-26
A
Amronoscommented
RViz recently started giving me the following errors: ```console $ rviz2 qt.glx: qglx_findConfig: Failed to finding matching FBConfig for QSurfaceFormat(version 2.0, options QFlags<QSurfaceFormat::FormatOption>(), depthBufferSize -1, redBufferSize 1, greenBufferSize 1, blueBufferSize 1, alphaBufferSize -1, stencilBufferSize -1, samples -1, swapBehavior QSurfaceFormat::SingleBuffer, swapInterval 1, colorSpace QSurfaceFormat::DefaultColorSpace, profile QSurfaceFormat::NoProfile) Unable to create glx visual [ERROR] [1777179037.715245094] [rviz2]: rviz::RenderSystem: error creating render window: RenderingAPIException: Invalid parentWindowHandle (wrong server or screen) in GLXWindow::create at /build/rviz-release-release-kilted-rviz_ogre_vendor-15.0.12-1/build/ogre_vendor-prefix/src/ogre_vendor/RenderSystems/GLSupport/src/GLX/OgreGLXWindow.cpp (line 246) terminate called after throwing an instance of 'std::runtime_error' what(): Unable to create the rendering window after 100 tries Aborted (core dumped) rviz2 ``` I fixed it by adding the following to my Nix shell: ```nix LD_LIBRARY_PATH = pkgs.lib.makeLibraryPath [ pkgs.mesa ]; ``` Is there a better way to solve this issue? Can it be solved at the `nix-ros-overlay` level?
1 条评论