rviz "Caught exception while loading: OGRE EXCEPTION(3:RenderingAPIException)"
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
libGL.so.1 => /usr/lib/mesa/libGL.so.1 (0x01252000)
libGLU.so.1 => /usr/lib/libGLU.so.1 (0x1d630000)
And ls -l /usr/lib/mesa/libGL.so.1
lrwxrwxrwx 1 root root 12 2010-09-15 16:10 /usr/lib/mesa/libGL.so.1 -> libGL.so.1.2
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.