Ask Your Question

rviz "Caught exception while loading: OGRE EXCEPTION(3:RenderingAPIException)"

asked 2012-04-03 17:57:57 -0500

weiin gravatar image

updated 2012-04-03 18:10:00 -0500

I'm having a weird problem running rviz. It was working perfectly fine until something (I do not know what) happened. Now I'm getting:

[ERROR] [1333511095.207674058]: Caught exception while loading: OGRE EXCEPTION(3:RenderingAPIException): Unable to create a suitable GLXContext in GLXContext::GLXContext at /tmp/buildd/ros-electric-visualization-common-1.6.2/debian/ros-electric-visualization-common/opt/ros/electric/stacks/visualization_common/ogre/build/ogre_src_v1-7-3/RenderSystems/GL/src/GLX/OgreGLXContext.cpp (line 61)

I tried the solution here. This is what I get from glxinfo | grep version

server glx version string: 1.2
client glx version string: 1.4
GLX version: 1.2
OpenGL version string: 1.4 (2.1 Mesa 7.7.1)

And ldd bin/rviz |grep GL => /usr/lib/mesa/ (0x01252000) => /usr/lib/ (0x1d630000)

And ls -l /usr/lib/mesa/

lrwxrwxrwx 1 root root 12 2010-09-15 16:10 /usr/lib/mesa/ ->

The weird thing is, sometimes rviz works after I restart the computer. Sometimes it doesn't. I do remember there is an extra "OpenGL shading version" occasionally when I do glxinfo. I'm not sure if that is the issue?

EDIT: And it gets weirder: I can run rviz in the terminal that shows the "shading version". But not in the terminal that doesn't. Why one terminal would show "shading version" and not the other is something I do not understand as well.

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted

answered 2012-04-03 19:50:40 -0500

weiin gravatar image

Turns out it was caused by compiz. See

Bottomline: Don't use Ctrl-Alt-T to open a new terminal if you need to run rviz. Otherwise you'll need to unset LIBGL_ALWAYS_INDIRECT

edit flag offensive delete link more

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools


Asked: 2012-04-03 17:57:57 -0500

Seen: 2,683 times

Last updated: Apr 03 '12