libGiGiOgre segmentation fault

Problems and solutions for installing or running FreeOrion, including discussion of bugs if needed before posting a bug report on GitHub. For problems building from source, post in Compile.

Moderator: Oberlus

Post Reply
Message
Author
User avatar
francys
Space Squid
Posts: 54
Joined: Sat Oct 25, 2008 8:53 pm
Location: Victoria, BC

libGiGiOgre segmentation fault

#1 Post by francys »

As requested by kroddn, I am creating this topic to discuss the segmentation fault I get every time I run FO. The discussion started here: viewtopic.php?f=24&t=2466&st=0&sk=t&sd=a&start=15 .

I tried running the OGRE samples and applied a patch ( http://www.ogre3d.org/forums/viewtopic. ... 15#p326715 ) that fixed some rendering problems, but never did I encounter a segfault. I ran other applications that make use of openGL and 3D acceleration and those worked fine too.

GG tutorials run fine, without problems, but FO still segfaults.

Now I managed to run gdb without getting keyboard and mouse hooked up, and this is the backtrace:

Code: Select all

Program received signal SIGSEGV, Segmentation fault.
[Switching to Thread 0x7f58e53d5700 (LWP 5682)]
0x00000000000021a1 in ?? ()
(gdb) bt
#0  0x00000000000021a1 in ?? ()
#1  0x00007f58e4e08917 in GG::OgreGUI::Enter2DMode () from /usr/local/lib/libGiGiOgre.so
#2  0x000000000068ac7b in HumanClientApp::Enter2DMode ()
#3  0x00007f58e4aad72e in GG::GUI::Render () from /usr/local/lib/libGiGi.so
#4  0x00007f58e4e08503 in GG::OgreGUI::postRenderTargetUpdate () from /usr/local/lib/libGiGiOgre.so
#5  0x00007f58e2f53cf8 in Ogre::RenderTarget::firePostUpdate () from /usr/local/lib/libOgreMain-1.6.1.so
#6  0x00007f58e2f54609 in Ogre::RenderTarget::updateImpl () from /usr/local/lib/libOgreMain-1.6.1.so
#7  0x00007f58e2f53ebc in Ogre::RenderTarget::update () from /usr/local/lib/libOgreMain-1.6.1.so
#8  0x00007f58e2f4061f in Ogre::RenderSystem::_updateAllRenderTargets () from /usr/local/lib/libOgreMain-1.6.1.so
#9  0x00007f58e2f6f525 in Ogre::Root::_updateAllRenderTargets () from /usr/local/lib/libOgreMain-1.6.1.so
#10 0x00007f58e2f6f655 in Ogre::Root::renderOneFrame () from /usr/local/lib/libOgreMain-1.6.1.so
#11 0x00007f58e4e08bf8 in GG::OgreGUI::Run () from /usr/local/lib/libGiGiOgre.so
#12 0x000000000069bca0 in main ()
freeorion.log

Code: Select all

2009-03-03 13:30:06,640 DEBUG Client : OpenAL initialized. Version 1.1Renderer OpenAL SoftVendor OpenAL Community
Extensions: AL_EXT_EXPONENT_DISTANCE AL_EXT_FLOAT32 AL_EXT_IMA4 AL_EXT_LINEAR_DISTANCE AL_EXT_MCFORMATS AL_EXT_OFFSET AL_LOKI_quadriphonic

2009-03-03 13:30:07,233 DEBUG Client : Limited FPS to 60
2009-03-03 13:30:07,579 DEBUG Client : (HumanClientFSM) IntroMenu
2009-03-03 13:30:07,579 DEBUG Client : (HumanClientFSM) IntroMenuIdle
I use the ATI fglrx 8.12 driver with Debian Lenny on an amd64 architecture. The video card is an ATI Radeon Xpress 200M.
gcc and g++ are both 4.3.2. Revisions are 2912 for FO and 711 for GG.

User avatar
OndrejR
Space Dragon
Posts: 339
Joined: Thu Oct 02, 2008 11:00 pm
Location: Slovakia

Re: libGiGiOgre segmentation fault

#2 Post by OndrejR »

Same system and architecture, but nvidia graphic card. But in your ogre.log I found some differencies although I don't know what does it mean(your OpenGL version is also in version 2)

your:

Code: Select all

Texture Compression: yes
12:02:43:    - DXT: yes
12:02:43:    - VTC: no
my:

Code: Select all

Texture Compression: yes
23:13:30:    - DXT: yes
23:13:30:    - VTC: yes
your:

Code: Select all

Vertex texture fetch: no
my

Code: Select all

Vertex texture fetch: yes
23:13:30:    - Max vertex textures: 4
23:13:30:    - Vertex textures shared: yes
Try also turn off glow in combat options menu

User avatar
francys
Space Squid
Posts: 54
Joined: Sat Oct 25, 2008 8:53 pm
Location: Victoria, BC

Re: libGiGiOgre segmentation fault

#3 Post by francys »

Try also turn off glow in combat options menu
If I could reach it... the segfault happens as I launch the applications. I can only see the window and the black background, then it crashes.

User avatar
kroddn
Static Linker
Posts: 347
Joined: Thu Jun 28, 2007 10:28 am

Re: libGiGiOgre segmentation fault

#4 Post by kroddn »

As far as I remember the line in GG::OgreGUI::Enter2DMode () calls OGRE::Enter2DMode(). To deeper debug the problem a debug version of Ogre is needed at that point.

tzlaine
Programming Lead Emeritus
Posts: 1092
Joined: Thu Jun 26, 2003 1:33 pm

Re: libGiGiOgre segmentation fault

#5 Post by tzlaine »

kroddn wrote:As far as I remember the line in GG::OgreGUI::Enter2DMode () calls OGRE::Enter2DMode(). To deeper debug the problem a debug version of Ogre is needed at that point.
No. There is no OGRE::Enter2DMode(). GG::OgreGUI::Enter2DMode() makes a bunch of OpenGL calls and calls to Ogre's RenderSystem.

User avatar
kroddn
Static Linker
Posts: 347
Joined: Thu Jun 28, 2007 10:28 am

Re: libGiGiOgre segmentation fault

#6 Post by kroddn »

The crash happens INDISE OgreGUI::Enter2DMode(). Those openGL calls are never executed at all.

tzlaine
Programming Lead Emeritus
Posts: 1092
Joined: Thu Jun 26, 2003 1:33 pm

Re: libGiGiOgre segmentation fault

#7 Post by tzlaine »

I'm confused. The OpenGL calls are inside OgreGUI::Enter2DMode(). In fact, the very first line of OgreGUI::Enter2DMode() is a GL call. If the crash happens inside OgreGUI::Enter2DMode(), at least one GL call is being executed. Also, I was saying above that there is no such function as OGRE::Enter2DMode(), which is sounded like you wanted to debug.

User avatar
kroddn
Static Linker
Posts: 347
Joined: Thu Jun 28, 2007 10:28 am

Re: libGiGiOgre segmentation fault

#8 Post by kroddn »

I said "as far as I remember"...

I did not know that this code is located at GG, I thought it was Ogre itself. I wonder why my current version does not have debugging symbols in GiGiOgre...

/Edit: and as I stated in another thread, I am not able to debug effectively, because FreeOrion fetches the mouse and is never releasing it.

User avatar
Geoff the Medio
Programming, Design, Admin
Posts: 12802
Joined: Wed Oct 08, 2003 1:33 am
Location: Munich

Re: libGiGiOgre segmentation fault

#9 Post by Geoff the Medio »

kroddn wrote:I am not able to debug effectively, because FreeOrion fetches the mouse and is never releasing it.
For Windows, there is a line in OISInput.cfg that prevents the program from grabbing the mouse exclusively...

Code: Select all

w32_mouse=DISCL_NONEXCLUSIVE
There might be an equilvalent for Linux... maybe try adding

Code: Select all

x11_mouse=DISCL_NONEXCLUSIVE
?

Post Reply