Open varunagrawal opened 3 years ago
I thought this was this problem: https://github.com/ros2/rviz/issues/383, but it is actually a different issue. This is the problem line (I think):
[ERROR] [1630011723.594029953] [rviz2]: rviz::RenderSystem: error creating render window: basic_string::_M_construct null not valid
I haven't seen that myself, so maybe we need to set a break point there and see why that string is being given a nullptr (apparently).
Here is where that error is coming from, you could possible catch it there and backtrace on that exception to find its origin:
I've been trying to build RViz and I get some compilation errors which I am not sure what the root cause is since I have tf2_geometry_msgs
under /opt/ros/galactic/include
Starting >>> rviz_assimp_vendor
Starting >>> rviz_ogre_vendor
Finished <<< rviz_assimp_vendor [0.16s]
Finished <<< rviz_ogre_vendor [0.16s]
Starting >>> rviz_rendering
Finished <<< rviz_rendering [0.23s]
Starting >>> rviz_common
Starting >>> rviz_rendering_tests
Finished <<< rviz_rendering_tests [0.12s]
Finished <<< rviz_common [0.78s]
Starting >>> rviz_visual_testing_framework
Finished <<< rviz_visual_testing_framework [0.14s]
Starting >>> rviz_default_plugins
--- stderr: rviz_default_plugins
In file included from /home/varun/projects/ros/build/rviz_default_plugins/include/rviz_default_plugins/transformation/../../../../../src/rviz/rviz_default_plugins/include/rviz_default_plugins/transformation/transformer_guard.hpp:43,
from /home/varun/projects/ros/build/rviz_default_plugins/include/rviz_default_plugins/transformation/moc_transformer_guard.cpp:9:
/home/varun/projects/ros/src/rviz/rviz_default_plugins/include/rviz_default_plugins/transformation/tf_wrapper.hpp:40:10: fatal error: tf2_geometry_msgs/tf2_geometry_msgs.hpp: No such file or directory
40 | #include "tf2_geometry_msgs/tf2_geometry_msgs.hpp"
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
compilation terminated.
make[2]: *** [CMakeFiles/rviz_default_plugins.dir/build.make:414: CMakeFiles/rviz_default_plugins.dir/include/rviz_default_plugins/transformation/moc_transformer_guard.cpp.o] Error 1
make[2]: *** Waiting for unfinished jobs....
In file included from /home/varun/projects/ros/src/rviz/rviz_default_plugins/include/rviz_default_plugins/transformation/transformer_guard.hpp:43,
from /home/varun/projects/ros/build/rviz_default_plugins/include/rviz_default_plugins/displays/robot_model/../../../../../../src/rviz/rviz_default_plugins/include/rviz_default_plugins/displays/robot_model/robot_model_display.hpp:43,
from /home/varun/projects/ros/build/rviz_default_plugins/include/rviz_default_plugins/displays/robot_model/moc_robot_model_display.cpp:9:
/home/varun/projects/ros/src/rviz/rviz_default_plugins/include/rviz_default_plugins/transformation/tf_wrapper.hpp:40:10: fatal error: tf2_geometry_msgs/tf2_geometry_msgs.hpp: No such file or directory
40 | #include "tf2_geometry_msgs/tf2_geometry_msgs.hpp"
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
compilation terminated.
make[2]: *** [CMakeFiles/rviz_default_plugins.dir/build.make:666: CMakeFiles/rviz_default_plugins.dir/include/rviz_default_plugins/displays/robot_model/moc_robot_model_display.cpp.o] Error 1
In file included from /home/varun/projects/ros/src/rviz/rviz_default_plugins/include/rviz_default_plugins/transformation/transformer_guard.hpp:43,
from /home/varun/projects/ros/build/rviz_default_plugins/include/rviz_default_plugins/displays/laser_scan/../../../../../../src/rviz/rviz_default_plugins/include/rviz_default_plugins/displays/laser_scan/laser_scan_display.hpp:45,
from /home/varun/projects/ros/build/rviz_default_plugins/include/rviz_default_plugins/displays/laser_scan/moc_laser_scan_display.cpp:9:
/home/varun/projects/ros/src/rviz/rviz_default_plugins/include/rviz_default_plugins/transformation/tf_wrapper.hpp:40:10: fatal error: tf2_geometry_msgs/tf2_geometry_msgs.hpp: No such file or directory
40 | #include "tf2_geometry_msgs/tf2_geometry_msgs.hpp"
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
compilation terminated.
make[2]: *** [CMakeFiles/rviz_default_plugins.dir/build.make:358: CMakeFiles/rviz_default_plugins.dir/include/rviz_default_plugins/displays/laser_scan/moc_laser_scan_display.cpp.o] Error 1
make[1]: *** [CMakeFiles/Makefile2:290: CMakeFiles/rviz_default_plugins.dir/all] Error 2
make: *** [Makefile:146: all] Error 2
---
Failed <<< rviz_default_plugins [12.6s, exited with code 2]
Summary: 6 packages finished [14.0s]
1 package failed: rviz_default_plugins
1 package had stderr output: rviz_default_plugins
1 package not processed
I've been trying to build RViz and I get some compilation errors which I am not sure what the root cause is since I have
tf2_geometry_msgs
under/opt/ros/galactic/include
Most likely you have checked out the ros2
branch, and are trying to build from that. But that won't work with Galactic; that is the latest development version. You need to checkout the galactic
branch and try building that instead.
Hi there, regarding the first error message: I don't know if this helps you for finding out where the issue lies but I run into this error myself using docker, where rviz was not built from source. It was caused by different versions of openGL apparently? See https://github.com/athackst/vscode_ros2_workspace/issues/18
I'm having this issue too, maybe the Xlib error can give some extra context?
I'm running a quite old laptop and installed ROS Galactic via the Robostack project (to isolate several versions of ROS) so this might not be affecting mainstream apt-
installations.
Xlib: sequence lost (0x10047 > 0x49) in reply type 0x0!
[ERROR] [1654549463.999134322] [rviz2]: rviz::RenderSystem: error creating render window: basic_string::_M_construct null not valid
[ERROR] [1654549463.999808722] [rviz2]: rviz::RenderSystem: error creating render window: InvalidParametersException: Window with name 'OgreWindow(0)' already exists in _createRenderWindow at /home/conda/feedstock_root/build_artifacts/ogre_1649548175237/work/OgreMain/src/OgreRenderSystem.cpp (line 327)
Will update if I find a solution.
Edit: Output of rviz2 -l
:
same as @danzimmerman
@mhubii Are you also using Robostack? I haven't found a solution there yet, but on my machine, ROS2 Galactic and rviz2
natively installed via apt
binaries work fine.
I found this issue
https://github.com/RoboStack/ros-galactic/issues/101
but I don't think it's directly relevant because my Robostack installation is not failing at the DRI loading stage.
With LIBGL_DEBUG
enabled, I see
libGL: MESA-LOADER: dlopen(/usr/lib/x86_64-linux-gnu/dri/i965_dri.so)
<snip>
libGL: Using DRI3 for screen 0
in both cases (apt
and robostack
)
It seems something fails later... the last difference noted right before it fails is GL_VERSION
, which is 3.0.0.0
in the apt
-installation and 4.2.0.0
in Robostack.
Native apt
-installed (successful):
Robostack-installed (fails):
I am forced to run Ubuntu 18.04 here, so I was trying to install ros2 galactic through robostack
. Thanks for the hints, might try to install through apt
I should state for clarity in this thread that I'm currently having this problem with Robostack but I also had this problem previously on the same (old) machine when I installed proprietary NVIDIA drivers and tried to use it with natively-apt
-installed Rviz2.
I am using the Nvidia drivers which come bundled with cuda_11.7.0_515.43.04_linux.run
. Maybe @danzimmerman and I faced the same issue?
Funny thing is that this only affects Rviz2. I'm still using Rviz1 without issues.
Have the same problem inside the galactic docker image (osrf/ros:galactic-desktop
) and foxy as well (osrf/ros:foxy-desktop
). But if I switch to humble (osrf/ros:humble-desktop
), it'll be okay.
Ubuntu 22
I had the same issue with rviz2 in foxy container. I don't know how but I solved it by switching to X11.
Hi
Had exactly the same issue when trying to launch rviz2.
I sumbeled upon this article and by
running this comand in terminal export QT_QPA_PLATFORM=xcb rviz2
solved the issue.
Hi Had exactly the same issue when trying to launch rviz2. I sumbeled upon this article and by running this comand in terminal
export QT_QPA_PLATFORM=xcb rviz2
solved the issue.
thank you very much,i try it,this is can fix not open issue, running by: Raspberry 5,Ubuntu 24.04,Jazzy
export QT_QPA_PLATFORM=xcb rviz2
wow this worked for me too! I was getting the window aborted error since quite a while (3 weeks!)! thanks . I am working with ubuntu 24 , ros2 jazzy
Hi Had exactly the same issue when trying to launch rviz2. I sumbeled upon this article and by running this comand in terminal
export QT_QPA_PLATFORM=xcb rviz2
solved the issue.
this solved my error screen. (ubuntu 24.04, ros2 jazzy)
I've been trying to run Rviz but keep getting the error below.
I've tried both reinstalling ROS2 (using Galactic), reinstalling my nvidia and cuda drivers, and have perused through a lot of forums for the last 2 days, so I am hoping one of you fine people can help me out. :slightly_smiling_face:
I am using Ubuntu 20.04 with ROS Galactic and Nvidia driver v470. Output of
rviz2 -l