ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange
Ask Your Question

How to run rviz with OGRE_RTT_MODE set to "Copy" or "FBO"

asked 2011-11-29 03:51:19 -0600

tom gravatar image

updated 2011-11-29 03:52:24 -0600

I'm having a "Segmentation fault" problem when trying to run rviz on ros-electric on Ubuntu 10.04, as described in other posts, too. I'll quote what the program's output is for completeness (I'm not on a virtual machine, as here:

user@comp:~$ rosrun rviz rviz 
[ INFO] [1322588816.011412205]: rviz revision number 1.6.7
[ INFO] [1322588816.011513335]: ogre_tools revision number 1.6.2
[ INFO] [1322588816.011530446]: compiled against OGRE version 1.7.3 (Cthugha)
[ INFO] [1322588816.289107972]: Loading general config from [/home/user/.rviz/config]
[ INFO] [1322588816.289233896]: Loading display config from [/home/user/.rviz/display_config]
[ INFO] [1322588816.301575130]: RTT Preferred Mode is PBuffer.
The program 'rviz' received an X Window System error.
This probably reflects a bug in the program.
The error was 'BadDrawable (invalid Pixmap or Window parameter)'.
  (Details: serial 22 error_code 9 request_code 136 minor_code 3)
  (Note to programmers: normally, X errors are reported asynchronously;
   that is, you will receive the error a while after causing it.
   To debug your program, run it with the --sync command line
   option to change this behavior. You can then get a meaningful
   backtrace from your debugger if you break on the gdk_x_error() function.)

I was just reading -> 3.4. It says one could try running rviz with OGRE_RTT_MODE set to "Copy" or "FBO", instead of the default "PBuffer", but I don't know how. I've already tried everything else I could find on ROS answers. glxinfo | grep version returns (checked it against what rviz was compiled against, looks ok):

server glx version string: 1.2
client glx version string: 1.4
GLX version: 1.2
OpenGL version string: 2.1 Mesa 7.7.1
OpenGL shading language version string: 1.20

Any other clues?

edit retag flag offensive close merge delete

3 Answers

Sort by ยป oldest newest most voted

answered 2011-12-02 03:01:22 -0600

Pi Robot gravatar image

Check out my answer to the similar question here. This will show you how to test the different OGRE_RTT_MODE values and then add the one that works for you to your .bashrc file.

Also, I often find that I will get the same error you do on the first or second launch of RViz on any given occasion, but if I just keep trying, it usually comes up by the third attempt.


edit flag offensive delete link more


Thanks, didn't find it before.
tom gravatar image tom  ( 2011-12-04 20:36:22 -0600 )edit

answered 2011-12-02 14:03:31 -0600

jbohren gravatar image

I added a bit on the wiki showing what to do specifically: rviz/Troubleshooting#Segfault_during_startup, but if you're still trying to figure it out, OGRE_RTT_MODE is just an environment variable, which you can set from the command-line like so:

export OGRE_RTT_MODE=Copy


edit flag offensive delete link more


Thanks, I'm sure adding this to Wiki will help a couple users more in the future.
tom gravatar image tom  ( 2011-12-04 20:37:25 -0600 )edit
Thanks again, sorry for my late reply - setting OGRE_RTT_MODE = Copy solved my problem. Couldn't test it earlier as I temporarily switched back to Diamondback.
tom gravatar image tom  ( 2011-12-14 23:46:24 -0600 )edit

answered 2011-12-02 02:30:47 -0600

Roman Burdakov gravatar image

What drivers do you use? I've got similar problem and combination of removing nvidia drivers and changing mode did the trick for me. I'm also not 100% sure, but last time I've installed and tested ogre before I installed ROS. I've got this idea after I noticed that different png-libraries are used and I've decided to give it a try.

You can also take a look into /var/log/Xorg.0.log file to see what modules have been loaded and whether or not you have any problems. It could be that your xorg conf is pointing to the wrong location. This is from my log:

(II) Loading extension DOUBLE-BUFFER
(II) LoadModule: "glx"
(II) Loading /usr/lib/xorg/modules/extensions/
(II) Module glx: vendor="X.Org Foundation"
        compiled for 1.7.6, module version = 1.0.0
        ABI class: X.Org Server Extension, version 2.0
(==) AIGLX enabled
(II) Loading extension GLX
edit flag offensive delete link more

Question Tools


Asked: 2011-11-29 03:51:19 -0600

Seen: 2,437 times

Last updated: Dec 02 '11