# rviz crashing at startup with BadDrawable

I'm attenting to use the MIT hand_interaction demo. I get the following error from rviz on startup. This problem is not unique to the hand_interaction demo, however. I get it anytime I try to use rviz. Any insight would be appreciated.

Paul.

\$: rosrun rviz rviz -d 'rospack find hand_interactin'/config/handdetection.vcg 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.)

edit retag close merge delete

Sort by » oldest newest most voted

I think this is a fairly common occurrence (I get it a fair bit too) and Navam's suggestion to try a few times tends to work for me also. But, check out this RViz troubleshooting page and specifically section 3.4 "Segfault during startup". I find that setting the environment variable OGRE_RTT_MODE to Copy in my .bashrc file instead of the default PBuffer gives me many fewer crashes. You can also try the "FBO" mode. To test the Copy mode in the current terminal, run:

export OGRE_RTT_MODE=Copy


then fire up RViz. If this doesn't help, try the FBO mode. If you find one that works, put the corresponding export line in your .bashrc file.

--patrick

more

This is good information generally, but I believe it is relevant to a different startup crash, not the BadDrawable one. Also, the latest nvidia drivers (290.10) seem to have fixed this RTT_MODE bug.

( 2012-02-24 08:14:15 -0500 )edit

hi,

i get this problem a lot ( yah my graphic drivers are kind of unstable) so what i do is -

1. rosrun rviz rviz --sync ( add the --sync it even says in the error message)
2. dont give up even with sync it will fail .... try it 2-3 times
3. if it still fails do rosmake rviz rviz and repeat step 1 :P

if it works for you , your welcome and if it doesnt well hopefully someone else here has another way :D

Navam

more

The --sync argument is interpreted by wxWidgets. In the Fuerte version rviz uses Qt instead, and for Qt the option only has one "-", so it is "rosrun rviz rviz -sync". I don't know that rebuilding rviz will change anything with respect to this error.

( 2012-02-24 08:11:28 -0500 )edit

if the export OGRE_RTT_MODE=Copy and using --sync does not work, try removing ~/.rviz, works for me (from time to time)

more

I can confirm that repeated attempts to launch rviz eventually works fine. I did not have to change the OGRE_RTT_MODE setting.

more