Segfault on running FreeOrion in linux

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

Moderators: Oberlus, Oberlus

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

Segfault on running FreeOrion in linux

#1 Post by kroddn » Fri Mar 13, 2009 7:24 pm

Soon after starting the application, just after the main window appears (it keeps black), it crashes.

I found out that receiving the mouse focus leads to that crash. I ran FreeOrion on a console (ALT+CTRL+F1) in gdb and set DISPLAY=:0. The game runs fine until I switch to graphical display (ALT+CTRL+F7) and click on the main window.

The backtrace reads:

Code: Select all

Program received signal SIGSEGV, Segmentation fault.
[Switching to Thread 0xb6ab66c0 (LWP 7352)]
0x000010d1 in ?? ()
(gdb) bt
#0  0x000010d1 in ?? ()
#1  0x084fc429 in HumanClientApp::Enter2DMode (this=0xbff84f78)
    at client/human/HumanClientApp.cpp:415
#2  0xb7c5acd3 in GG::GUI::Render (this=0xbff851c0) at src/GUI.cpp:975
#3  0xb77d8cd0 in GG::OgreGUI::postRenderTargetUpdate (this=0xbff851c0, 
    [email protected]) at src/Ogre/OgreGUI.cpp:232
#4  0xb75ca4c4 in Ogre::RenderTarget::firePostUpdate (this=0xb69b8a30)
    at OgreRenderTarget.cpp:339
#5  0xb75cadb7 in Ogre::RenderTarget::updateImpl (this=0xb69b8a30)
    at OgreRenderTarget.cpp:121
#6  0xb75ca6ac in Ogre::RenderTarget::update (this=0xb69b8a30, swap=false)
    at OgreRenderTarget.cpp:501
#7  0xb75b4211 in Ogre::RenderSystem::_updateAllRenderTargets (
    this=0xb69b7f58, swapBuffers=false) at OgreRenderSystem.cpp:112
#8  0xb75e7b73 in Ogre::Root::_updateAllRenderTargets (this=0xb69b6260)
    at OgreRoot.cpp:1132
#9  0xb75e7d00 in Ogre::Root::renderOneFrame (this=0xb69b6260)
    at OgreRoot.cpp:839
#10 0xb77d96d7 in operator() (this=0xbff84e14) at src/Ogre/OgreGUI.cpp:59
#11 0xb77d9789 in GG::OgreGUI::Run (this=0xbff851c0)
    at src/Ogre/OgreGUI.cpp:128
#12 0xb7c593a6 in GG::GUI::operator() (this=0xbff851c0) at src/GUI.cpp:580
#13 0x08514f4f in main (argc=1, argv=0xbff857f4) at client/human/chmain.cpp:145

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

Re: Segfault on running FreeOrion in linux

#2 Post by OndrejR » Fri Mar 13, 2009 8:18 pm

Is it problem only with static version? What is in ogre.log?

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

Re: Segfault on running FreeOrion in linux

#3 Post by kroddn » Fri Mar 13, 2009 8:24 pm

I never compiled a dynamical version, because my compilation is done on a root server. So I don't know if its related to a static version.

Ogre Log added. I don't thing those information will help.
Attachments
ogre.log.zip
(3.25 KiB) Downloaded 73 times

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

Re: Segfault on running FreeOrion in linux

#4 Post by kroddn » Fri Mar 13, 2009 9:09 pm

I tested it on another machine - same result, segfault.

I'll try to compile a dynamic version on my system at home.

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

Re: Segfault on running FreeOrion in linux

#5 Post by OndrejR » Fri Mar 13, 2009 9:09 pm

It is the same problem as francys has in this thread. Problem is that I think that FreeOrion was never tested with ati graphic card on linux. You have also ati as francys and also in ogre log there are the same differencies as with my ogre log on nvidia:

your with ati:

Code: Select all

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

Code: Select all

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

Code: Select all

Vertex texture fetch: no
my with nvidia

Code: Select all

Vertex texture fetch: yes
23:13:30:    - Max vertex textures: 4
23:13:30:    - Vertex textures shared: yes
I don't know what does it mean. I also remember that in some old thread there was some problem with nvidia and ogre but I don't know anything about these things and how to solve them. And I also don't know if nvidia-cg-toolkit is required dependency to run FreeOrion and if the answer to this question is yes, if there are problems with this with ATI. Maybe tzlaine can answer to this questions.

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

Re: Segfault on running FreeOrion in linux

#6 Post by kroddn » Fri Mar 13, 2009 9:34 pm

I also tested on a system using an nvidia chipset. This system sais:

Code: Select all

 * Texture Compression: yes
   - DXT: yes
   - VTC: yes
but:

Code: Select all

 * Vertex texture fetch: no
 * Render to Vertex Buffer : no
I have NOT built the nvidia plugin for ogre.

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

Re: Segfault on running FreeOrion in linux

#7 Post by OndrejR » Sat Mar 14, 2009 11:41 am

According this bug in ubuntu, ogre plugin Plugin_CgProgramManager.so requires nvidia-cg-toolkit when compiling Ogre. And this plugin is used in FreeOrion configuration file ogre_plugins.cfg.

It seems that FreeOrion requires nvidia-cg-toolkit to be compiled with Ogre. If this plugin can be run on ATI is unknown to me.

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

Re: Segfault on running FreeOrion in linux

#8 Post by kroddn » Sat Mar 14, 2009 12:48 pm

Are you sure that this is a fact? The fact that this module is listed in ogre_plugins.cfg does not automatically mean that it is needed.

Maybe tzlaine can answer this question?

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

Re: Segfault on running FreeOrion in linux

#9 Post by OndrejR » Sat Mar 14, 2009 1:08 pm

kroddn wrote:Are you sure that this is a fact? The fact that this module is listed in ogre_plugins.cfg does not automatically mean that it is needed.
I removed Plugin_CgProgramManager from ogre_plugins.cfg and then freeorion --tech-demo didn't run, but FreeOrion as game run. Therefore this plugin is needed by FreeOrion. This plugin wasn't listed in ogre plugins, but later was added in revision 2883 by tzlaine to enable page geometry.

But relationship between ATI and nvidia-cg-toolkit and FreeOrion is still unclear to me. I don't have ATI and can't test it. And also which shaders model is required to run FreeOrion. My nvidia geforce 6600 gt has shader model in version 3 and I can run FreeOrion. Probably tzlaine can answer this questions.

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

Re: Segfault on running FreeOrion in linux

#10 Post by kroddn » Sat Mar 14, 2009 1:29 pm

Currently I am buildings the plugin. The homepage of Cg Toolkit mentions other OpenGL compatible cards, so maybe it runs on ATI cards too.

The problem ist - which licensing does the nvidia Cg toolkit use? Is freeorion allowed to release versions containing this plugin? Somebody should check that before any further usage of it.

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

Re: Segfault on running FreeOrion in linux

#11 Post by Geoff the Medio » Sat Mar 14, 2009 1:41 pm

The CG compiler code site says there should be a license.txt with the source code.

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

Re: Segfault on running FreeOrion in linux

#12 Post by kroddn » Sat Mar 14, 2009 3:08 pm

Now I tried it on 2 other systems.

One having an ATI graphics card. Nothing changed, the game still crashes.

The system with nvidia graphics card sais:

Code: Select all

GPU Vendor: nvidia
Device Name: GeForce 7600 GS/PCI/SSE2
Driver Version: 1.4.0.0
 * Fixed function pipeline: yes
 * Hardware generation of mipmaps: yes
 * Texture blending: yes
 * Anisotropic texture filtering: yes
 * Dot product texture operation: yes
 * Cube mapping: yes
 * Hardware stencil buffer: yes
   - Stencil depth: 8
   - Two sided stencil support: no
   - Wrap stencil values: yes
 * Hardware vertex / index buffers: no
 * Vertex programs: yes
 * Fragment programs: yes
 * Geometry programs: no
 * Supported Shader Profiles: arbfp1 arbvp1 fp30 fp40 vp30 vp40
 * Texture Compression: yes
   - DXT: yes
   - VTC: yes
 * Scissor Rectangle: yes
 * Hardware Occlusion Query: yes
 * User clip planes: yes
 * VET_UBYTE4 vertex element type: yes
 * Infinite far plane projection: yes
 * Hardware render-to-texture: yes
 * Floating point textures: yes
 * Non-power-of-two textures: yes
 * Volume textures: yes
 * Multiple Render Targets: 1
   - With different bit depths: no
 * Point Sprites: yes
 * Extended point parameters: yes
 * Max Point Size: 63.375
 * Vertex texture fetch: no
 * Render to Vertex Buffer : no
 * GL 1.5 without VBO workaround: no
 * Frame Buffer objects: no
 * Frame Buffer objects (ARB extension): no
 * Frame Buffer objects (ATI extension): no
 * PBuffer suppport: no
 * GL 1.5 without HW-occlusion workaround: no
Again "Vertex texture fetch: no" appears.

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

Re: Segfault on running FreeOrion in linux

#13 Post by OndrejR » Sat Mar 14, 2009 3:15 pm

It is strange. nvidia geforce 6600 upwards support shader 3. And your nvidia 7600 is better and newer than my 6600. I installed nvidia binary driver NVIDIA-Linux-x86_64-180.37-pkg2.run.

my:
Device Name: GeForce 6600 GT/PCI/SSE2
Driver Version: 2.1.2.0

I have OpenGL 2.1

your nvidia:
Device Name: GeForce 7600 GS/PCI/SSE2
Driver Version: 1.4.0.0

In your log there is OpenGL driver version 1.4

OpenGL 2.0 requires SSE, where as OpenGL 1.4 doesn't. This maybe also problem(if you compile it for 386 and not for 686). I compiled FO and Ogre for amd64 platform.

It may be also problem with onboard graphic card(solving by disabling in bios and (in Windows control panel)).

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

Re: Segfault on running FreeOrion in linux

#14 Post by kroddn » Sat Mar 14, 2009 4:31 pm

You were absolutely right - I forgot to install nvidia drivers im my debian lenny chroot enviroment.

The game now runs again - but is still NOT working on ATI graphic cards.

So - maybe now I will be able to release a new statically linked package - although not any more this should be called statically, as I will have to deliver OGRE .so and some other libs with it because the ogre modules depend on them.

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

Re: Segfault on running FreeOrion in linux

#15 Post by Geoff the Medio » Sat Mar 14, 2009 4:40 pm

It was always "mostly statically linked" as far as I was aware... (although this does make it significantly less so...).

Also, I believe tzlaine is aware of the requests about making ogre statically linked, even if he hasn't had time to respond yet.

Post Reply