Linux: Crash After Ending Turn on Second or Later Game

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

Post Reply
Message
Author
ojii
Space Krill
Posts: 4
Joined: Mon May 31, 2010 5:00 pm

Linux: Crash After Ending Turn on Second or Later Game

#1 Post by ojii » Mon May 31, 2010 5:44 pm

Hi everyone.

FreeOrion looks like a cool game, but unfortunately I cannot play the game since it crashes whenever I try to end the turn. I can just start the game and click 'quick start' and then immediately hit 'turn 1' and I'll get "the connection to the server has been lost". After clicking "ok" the game crashes. This happens every time I try it (although it worked the first time I played it after the installation). It also happens if I start a game via "single player".

I run revision 3576 on a 64bit Ubuntu 10.04 installation. I downloaded the tarball from sourceforge and ran the setup.sh script. I have a Nvidia GeForce 8600M GT with the 195.36.15 (binary) drivers. I do not use compiz or other alternative window managers.

Python 2.4(.6) is installed. I have GLX 1.4.

I uploaded the logs to http://files2.ojii.ch/freeorion/

Let me know if you need more information to help solve this problem or tell me what I did wrong if this is no problem at all and just a misconfiguration of my system.

-ojii

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

Re: FreeOrion crashes when I want to end the turn (r3576)

#2 Post by Geoff the Medio » Mon May 31, 2010 6:06 pm

Can you check file ownership and directory write permissions? In particular make sure that when you run freeorion, you have write access in ~/.freeorion and ~./freeorion/save

ojii
Space Krill
Posts: 4
Joined: Mon May 31, 2010 5:00 pm

Re: FreeOrion crashes when I want to end the turn (r3576)

#3 Post by ojii » Mon May 31, 2010 6:50 pm

changing the permissions fixed the issue. thanks a lot.

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

Re: Linux: Crash After Ending Turn on Second or Later Game

#4 Post by Geoff the Medio » Mon May 31, 2010 7:12 pm

Great (or at least less bad)...

If anyone can suggest how to fix these write-access-related crashes, ideally be falling back to no logging or saving when the files can't be written, rather than crashes, and perhaps with an error popup to the user knows the logs won't be valid, I'd like to hear it.

I've made a relevant sourceforge bug report a well.

ojii
Space Krill
Posts: 4
Joined: Mon May 31, 2010 5:00 pm

Re: Linux: Crash After Ending Turn on Second or Later Game

#5 Post by ojii » Mon May 31, 2010 10:10 pm

I think one issue is running the installer as sudo. The installer should still set the write perms for the correct user on .freeorion. Maybe check on startup if that dir is writeable, and if not tell the user how to fix it.

Kinda like:

Code: Select all

TESTFILE = os.path.join(FREEORION_DIR, '.testfile')
try:
    open(TESTFILE, 'w').close()
except OSError:
    # show a nice message to the user
finally:
    if os.path.exists(TESTFILE):
        os.remove(TESTFILE)

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

Re: Linux: Crash After Ending Turn on Second or Later Game

#6 Post by kroddn » Mon May 31, 2010 10:22 pm

It's not that easy at all. sudo is not really a good thing to work with, as it is a mixture of running as root user and having evn vars that the normal user is using.

I will try to extend the wrapper script to never run FO as root (or as sudo with $HOME set to the user dir).
And maybe it's possible to deactivate that run button in the installer.

User avatar
tezeriusz
Space Squid
Posts: 75
Joined: Mon May 24, 2010 10:22 am
Location: Poland

Re: Linux: Crash After Ending Turn on Second or Later Game

#7 Post by tezeriusz » Tue Jun 01, 2010 4:20 pm

Running installer/game as root is totally bad idea. What about quick test, first lets tray to write in user home dir and if thats fail lets tray in game data dir then we can tray global /tmp dir with big fat warning for user?

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

Re: Linux: Crash After Ending Turn on Second or Later Game

#8 Post by kroddn » Tue Jun 01, 2010 5:48 pm

It's standard to write into $HOME. There's no need to change this behaviout. Running an installer to install a program systemwide is a commong thing to. But running a game as root is not, that's my opinion too.

As I said I will work on a solution. The current solution is: do not press the "Run now" button after having installed the game using sudo.

Post Reply