When I try to use rviz ,I got the error "Segmentation fault (core dumped)".And the details are shown below. I use two graphics cards now, one GTX-750, and the other K40, I'm not sure if this is what causes the problem below, as well as how to solve it.
czhang@kaffe:~$ rosrun rviz rviz -l
[ INFO] [1465022465.168948335]: rviz version 1.11.14
[ INFO] [1465022465.169027675]: compiled against Qt version 4.8.6
[ INFO] [1465022465.169046113]: compiled against OGRE version 1.8.1 (Byatis)
[ INFO] [1465022465.324312645]: Creating resource group General
[ INFO] [1465022465.324429908]: Creating resource group Internal
[ INFO] [1465022465.324496607]: Creating resource group Autodetect
[ INFO] [1465022465.324629864]: SceneManagerFactory for type 'DefaultSceneManager' registered.
[ INFO] [1465022465.324883178]: Registering ResourceManager for type Material
[ INFO] [1465022465.324940378]: Registering ResourceManager for type Mesh
[ INFO] [1465022465.324987032]: Registering ResourceManager for type Skeleton
[ INFO] [1465022465.325053591]: MovableObjectFactory for type 'ParticleSystem' registered.
[ INFO] [1465022465.325103877]: OverlayElementFactory for type Panel registered.
[ INFO] [1465022465.325142848]: OverlayElementFactory for type BorderPanel registered.
[ INFO] [1465022465.325179725]: OverlayElementFactory for type TextArea registered.
[ INFO] [1465022465.325225052]: Registering ResourceManager for type Font
[ INFO] [1465022465.325272474]: ArchiveFactory for archive type FileSystem registered.
[ INFO] [1465022465.325308163]: ArchiveFactory for archive type Zip registered.
[ INFO] [1465022465.325345667]: ArchiveFactory for archive type EmbeddedZip registered.
[ INFO] [1465022465.325379959]: DDS codec registering
[ INFO] [1465022465.325428150]: FreeImage version: 3.15.4
[ INFO] [1465022465.325464467]: This program uses FreeImage, a free, open source image library supporting all common bitmap formats. See http://freeimage.sourceforge.net for details
[ INFO] [1465022465.325678042]: Supported formats: bmp,ico,jpg,jif,jpeg,jpe,jng,koa,iff,lbm,mng,pbm,pbm,pcd,pcx,pgm,pgm,png,ppm,ppm,ras,tga,targa,tif,tiff,wap,wbmp,wbm,psd,cut,xbm,xpm,gif,hdr,g3,sgi,exr,j2k,j2c,jp2,pfm,pct,pict,pic,3fr,arw,bay,bmq,cap,cine,cr2,crw,cs1,dc2,dcr,drf,dsc,dng,erf,fff,ia,iiq,k25,kc2,kdc,mdc,mef,mos,mrw,nef,nrw,orf,pef,ptx,pxn,qtk,raf,raw,rdc,rw2,rwl,rwz,sr2,srf,srw,sti
[ INFO] [1465022465.325735871]: Registering ResourceManager for type HighLevelGpuProgram
[ INFO] [1465022465.325787693]: Registering ResourceManager for type Compositor
[ INFO] [1465022465.326052531]: MovableObjectFactory for type 'Entity' registered.
[ INFO] [1465022465.326105890]: MovableObjectFactory for type 'Light' registered.
[ INFO] [1465022465.326143255]: MovableObjectFactory for type 'BillboardSet' registered.
[ INFO] [1465022465.326182366]: MovableObjectFactory for type 'ManualObject' registered.
[ INFO] [1465022465.326236493]: MovableObjectFactory for type 'BillboardChain' registered.
[ INFO] [1465022465.326289991]: MovableObjectFactory for type 'RibbonTrail' registered.
[ INFO] [1465022465.326421572]: *-*-* OGRE Initialising
[ INFO] [1465022465.326473744]: *-*-* Version 1.8.1 (Byatis)
[ INFO] [1465022465.326532760]: Loading library /usr/lib/x86_64-linux-gnu/OGRE-1.8.0/RenderSystem_GL
[ INFO] [1465022465.329155160]: Installing plugin: GL RenderSystem
[ INFO] [1465022465.329216970]: OpenGL Rendering Subsystem created.
[ INFO] [1465022465.337273651]: Plugin successfully installed
[ INFO] [1465022465.337361511]: Loading library /usr/lib/x86_64-linux-gnu/OGRE-1.8.0/Plugin_OctreeSceneManager
[ INFO] [1465022465.338621448]: Installing plugin: Octree Scene Manager
[ INFO] [1465022465.338670756]: Plugin successfully installed
[ INFO] [1465022465.338705118]: Loading library /usr/lib/x86_64-linux-gnu/OGRE-1.8.0/Plugin_ParticleFX
[ INFO] [1465022465.340275569]: Installing plugin: ParticleFX
[ INFO] [1465022465.340333816]: Particle Emitter Type 'Point' registered
[ INFO] [1465022465.340369435]: Particle Emitter Type 'Box' registered
[ INFO] [1465022465.340403169]: Particle Emitter Type 'Ellipsoid' registered
[ INFO] [1465022465.340455829]: Particle Emitter Type 'Cylinder' registered
[ INFO] [1465022465.340488375]: Particle Emitter Type 'Ring' registered
[ INFO] [1465022465.340527067]: Particle Emitter Type 'HollowEllipsoid' registered
[ INFO] [1465022465.340564223]: Particle Affector Type 'LinearForce' registered
[ INFO] [1465022465.340608572]: Particle Affector Type 'ColourFader' registered
[ INFO] [1465022465.340643143]: Particle Affector Type 'ColourFader2' registered
[ INFO] [1465022465.340681835]: Particle Affector Type 'ColourImage' registered
[ INFO] [1465022465.340714102]: Particle Affector Type 'ColourInterpolator' registered
[ INFO] [1465022465.340749023]: Particle Affector Type 'Scaler' registered
[ INFO] [1465022465.340788204]: Particle Affector Type 'Rotator' registered
[ INFO] [1465022465.340822985]: Particle Affector Type 'DirectionRandomiser' registered
[ INFO] [1465022465.340856509]: Particle Affector Type 'DeflectorPlane' registered
[ INFO] [1465022465.340892197]: Plugin successfully installed
[ INFO] [1465022465.340944159]: CPU Identifier & Features
[ INFO] [1465022465.340975797]: -------------------------
[ INFO] [1465022465.341024966]: * CPU ID: GenuineIntel: Intel(R) Xeon(R) CPU E5-2620 v3 @ 2.40GHz
[ INFO] [1465022465.341055626]: * SSE: yes
[ INFO] [1465022465.341088102]: * SSE2: yes
[ INFO] [1465022465.341115061]: * SSE3: yes
[ INFO] [1465022465.341142159]: * MMX: yes
[ INFO] [1465022465.341169188]: * MMXEXT: yes
[ INFO] [1465022465.341198382]: * 3DNOW: no
[ INFO] [1465022465.341225271]: * 3DNOWEXT: no
[ INFO] [1465022465.341252090]: * CMOV: yes
[ INFO] [1465022465.341279817]: * TSC: yes
[ INFO] [1465022465.341307055]: * FPU: yes
[ INFO] [1465022465.341335899]: * PRO: yes
[ INFO] [1465022465.341365232]: * HT: no
[ INFO] [1465022465.341394426]: -------------------------
[ INFO] [1465022465.341426693]: ******************************
*** Starting GLX Subsystem ***
******************************
[ INFO] [1465022465.341480959]: Registering ResourceManager for type Texture
[ INFO] [1465022465.341578667]: GLRenderSystem::_createRenderWindow "OgreWindow(0)", 1x1 windowed miscParams: FSAA=4 externalGLControl= macAPI=carbon parentWindowHandle=56623105
Segmentation fault (core dumped)
And when I run gdb, actually I know little about this, I got the result below.
Starting program: /opt/ros/indigo/lib/rviz/rviz
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib/x86_64-linux-gnu/libthread_db.so.1".
[ INFO] [1465023839.514368832]: rviz version 1.11.14
[ INFO] [1465023839.514489727]: compiled against Qt version 4.8.6
[ INFO] [1465023839.514521295]: compiled against OGRE version 1.8.1 (Byatis)
[New Thread 0x7fffdf758700 (LWP 22754)]
[New Thread 0x7fffdef57700 (LWP 22755)]
[New Thread 0x7fffde756700 (LWP 22756)]
[New Thread 0x7fffddf55700 (LWP 22761)]
Program received signal SIGSEGV, Segmentation fault.
0x0000000000000000 in ?? ()
(gdb)
What can I do ? I have tried the approach about changing OGRE_RTT_MODE to Copy or FBO, and still
Checking RVIZ :
the default suggestion will be using RVIZ with no parameters,
$ rosrun rviz rviz
If that dosen't work either, it's maybe because of a bad config file. So, delete ~/.rviz folder
and start over again. I once had the same issue and this solved it.
Also, if you have recently updated your ROS distro, you may have to update your graphic cards as well. If not,give a shot for the solutions in RVIZ troubleshouting page.
Checking Ogre :
In a terminal, run the following commands :
$ glxgears
this is a good test to see if OpenGL is working for you at the system/driver level. (you'll get a pretty window with mechanical stuff going)
Also
$ glxinfo | grep 'OpenGL renderer'
should not say 'software rasterizer', it should be the model of your graphics card.
If those don't work, that means you have an outdated graphic card and Ogre is not working. (which makes it independant from Rviz).