can't start a solo game: connection to server has been lost

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

Message
Author
User avatar
adrian_broher
Programmer
Posts: 1156
Joined: Fri Mar 01, 2013 9:52 am
Location: Germany

Re: can't start a solo game: connection to server has been l

#16 Post by adrian_broher »

Hello yohann,

could you please check if commit 7007 and ongoing does fix this error for you?

I had the issue and reverted the offending commit.
Resident code gremlin
Attached patches are released under GPL 2.0 or later.
Git author: Marcel Metz

kreuzfeld00
Space Krill
Posts: 4
Joined: Wed Feb 10, 2016 11:31 pm

Re: can't start a solo game: connection to server has been l

#17 Post by kreuzfeld00 »

I encounter the same problem on Ubuntu 14.04: "connection to server has been lost," whenever the program tries to begin a single player game. Any thoughts or insight?

freeorion.log:
2016-02-10 16:27:17.986674 [debug] Client : ClientNetworking::ConnectToServer : starting networking thread
2016-02-10 16:27:17.986745 [debug] Client : HumanClientApp::NewSinglePlayerGame : Connected to server
2016-02-10 16:27:17.986841 [debug] Client : (HumanClientFSM) IntroMenu.HostSPGameRequested
2016-02-10 16:27:17.986869 [debug] Client : (HumanClientFSM) ~IntroMenu
2016-02-10 16:27:17.986881 [debug] Client : (HumanClientFSM) WaitingForSPHostAck
2016-02-10 16:27:18.001303 [debug] Client : (HumanClientFSM) WaitingForSPHostAck.HostSPGame
2016-02-10 16:27:18.001441 [debug] Client : ClientNetworking::SetPlayerID: player id set to: 1
2016-02-10 16:27:18.016184 [debug] Client : DesignWnd::MainPanel::ReregisterDesigns
2016-02-10 16:27:18.016221 [debug] Client : (HumanClientFSM) ~WaitingForSPHostAck
2016-02-10 16:27:18.016234 [debug] Client : (HumanClientFSM) PlayingGame
2016-02-10 16:27:18.016247 [debug] Client : (HumanClientFSM) WaitingForGameStart
2016-02-10 16:27:18.022505 [debug] Client : (HumanClientFSM) PlayingGame.TurnProgress
2016-02-10 16:27:23.000668 [debug] Client : (HumanClientFSM) PlayingGame.TurnProgress
2016-02-10 16:27:24.773759 [debug] Client : ClientNetworking::NetworkingThread() : Networking thread will be terminated due to disconnect exception "End of file"
2016-02-10 16:27:24.779452 [debug] Client : HumanClientApp::DisconnectedFromServer
2016-02-10 16:27:24.779555 [debug] Client : (HumanClientFSM) PlayingGame.Disconnection
2016-02-10 16:27:24.779567 [debug] Client : HumanClientApp::EndGame
2016-02-10 16:27:24.779578 [debug] Client : HumanClientApp::EndGame Terminated server process.
2016-02-10 16:27:24.779591 [debug] Client : Process::Impl::Kill calling kill(m_process_id, SIGKILL)
2016-02-10 16:27:24.779695 [debug] Client : Process::Impl::Kill calling waitpid(m_process_id, &status, 0)
2016-02-10 16:27:24.786050 [debug] Client : Process::Impl::Kill done
2016-02-10 16:27:24.786129 [debug] Client : ClientNetworking::SetPlayerID: player id set to: -1
2016-02-10 16:27:24.801120 [debug] Client : DesignWnd::MainPanel::ReregisterDesigns
2016-02-10 16:27:26.732798 [debug] Client : ClientNetworking::SetPlayerID: player id set to: -1
2016-02-10 16:27:26.732883 [debug] Client : (HumanClientFSM) ~WaitingForGameStart
2016-02-10 16:27:26.732896 [debug] Client : (HumanClientFSM) ~PlayingGame
2016-02-10 16:27:26.732907 [debug] Client : (HumanClientFSM) IntroMenu
2016-02-10 16:27:26.732917 [debug] Client : HumanClientApp::KillServer()
2016-02-10 16:27:26.732928 [debug] Client : Process::Kill
2016-02-10 16:27:26.732951 [debug] Client : Process::Kill found no m_impl
2016-02-10 16:27:26.732962 [debug] Client : Process::Kill calling RequestTermination()
2016-02-10 16:27:26.732973 [debug] Client : ClientNetworking::SetPlayerID: player id set to: -1
2016-02-10 16:27:27.968328 [debug] Client : (HumanClientFSM) ~IntroMenu
freeoriond.log:
...
2016-02-10 16:27:13.500100 [error] Server : /home/ianc/python/planets.py:74: RuntimeWarning: invalid value encountered in divide
2016-02-10 16:27:13.500167 [error] Server : tau = abs(r-r[0])/abs((vx-vx[0])+1j*(vy-vy[0]))
2016-02-10 16:27:16.423911 [error] Server : Unable to import universe generator script
2016-02-10 16:27:16.423993 [error] Server : Traceback (most recent call last):
2016-02-10 16:27:16.424015 [error] Server : File "/home/ianc/Downloads/fob/default/python/universe_generation/universe_generator.py", line 5, in <module>
2016-02-10 16:27:16.424073 [error] Server : from starnames import name_star_systems
2016-02-10 16:27:16.424101 [error] Server : File "/home/ianc/Downloads/fob/default/python/universe_generation/starnames.py", line 3, in <module>
2016-02-10 16:27:16.424131 [error] Server : import options
2016-02-10 16:27:16.424151 [error] Server : File "/home/ianc/Downloads/fob/default/python/universe_generation/options.py", line 2, in <module>
2016-02-10 16:27:16.424178 [error] Server : from planets import planet_types_real, planet_sizes_real
2016-02-10 16:27:16.424203 [error] Server : ImportError: cannot import name planet_types_real
...
2016-02-10 16:27:23.718644 [error] Server : Exception AttributeError: "'NoneType' object has no attribute 'create_universe'" in <module 'threading' from '/home/ianc/anaconda2/lib/python2.7/threading.pyc'> ignored
...

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

Re: can't start a solo game: connection to server has been l

#18 Post by Geoff the Medio »

kreuzfeld00 wrote:Any thoughts or insight?
What version are you playing?

kreuzfeld00
Space Krill
Posts: 4
Joined: Wed Feb 10, 2016 11:31 pm

Re: can't start a solo game: connection to server has been l

#19 Post by kreuzfeld00 »

I'm running v0.4.5, build 2015-09-01.f203162

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

Re: can't start a solo game: connection to server has been l

#20 Post by Geoff the Medio »

post the whole freeoriond.log?

kreuzfeld00
Space Krill
Posts: 4
Joined: Wed Feb 10, 2016 11:31 pm

Re: can't start a solo game: connection to server has been l

#21 Post by kreuzfeld00 »

2016-02-10 16:27:13.288113 [debug] Server : Logger initialized
2016-02-10 16:27:13.288270 [debug] Server : v0.4.5 [build 2015-09-01.f203162] CMake
2016-02-10 16:27:13.288292 [debug] Server : (ServerFSM) Idle
2016-02-10 16:27:13.288315 [debug] Server : Initializing server Python interface
2016-02-10 16:27:13.296826 [debug] Server : Python initialized
2016-02-10 16:27:13.296875 [debug] Server : Python version: 2.7.6 (default, Jun 22 2015, 18:01:27)
[GCC 4.8.2]
2016-02-10 16:27:13.296892 [debug] Server : Python prefix: /home/ianc/anaconda2
2016-02-10 16:27:13.296907 [debug] Server : Python module search path: /home/ianc/python/util:/home/ianc/python:/home/ianc/anaconda2/lib/python2.7/site-packages/:/home/ianc/anaconda2/lib/python2.7/:/home/ianc/anaconda2/lib/python2.7/plat-x86_64-linux-gnu:/home/ianc/anaconda2/lib/python2.7/lib-tk:/home/ianc/anaconda2/lib/python2.7/lib-old:/home/ianc/anaconda2/lib/python2.7/lib-dynload
2016-02-10 16:27:13.296919 [debug] Server : Initializing C++ interfaces for Python
2016-02-10 16:27:13.297794 [debug] Server : Python stdout and stderr redirected
2016-02-10 16:27:13.500100 [error] Server : /home/ianc/python/planets.py:74: RuntimeWarning: invalid value encountered in divide
2016-02-10 16:27:13.500167 [error] Server : tau = abs(r-r[0])/abs((vx-vx[0])+1j*(vy-vy[0]))
2016-02-10 16:27:16.423911 [error] Server : Unable to import universe generator script
2016-02-10 16:27:16.423993 [error] Server : Traceback (most recent call last):
2016-02-10 16:27:16.424015 [error] Server : File "/home/ianc/Downloads/fob/default/python/universe_generation/universe_generator.py", line 5, in <module>
2016-02-10 16:27:16.424073 [error] Server : from starnames import name_star_systems
2016-02-10 16:27:16.424101 [error] Server : File "/home/ianc/Downloads/fob/default/python/universe_generation/starnames.py", line 3, in <module>
2016-02-10 16:27:16.424131 [error] Server : import options
2016-02-10 16:27:16.424151 [error] Server : File "/home/ianc/Downloads/fob/default/python/universe_generation/options.py", line 2, in <module>
2016-02-10 16:27:16.424178 [error] Server : from planets import planet_types_real, planet_sizes_real
2016-02-10 16:27:16.424203 [error] Server : ImportError: cannot import name planet_types_real
2016-02-10 16:27:16.424225 [debug] Server : FreeOrion server waiting for network events
2016-02-10 16:27:17.986648 [debug] Server : ServerNetworking::AcceptConnection : connected to new player
2016-02-10 16:27:17.986912 [debug] Server : Server received message from player id: -1 of type Host SP Game and size 393
2016-02-10 16:27:17.986964 [debug] Server : (ServerFSM) Idle.HostSPGame
2016-02-10 16:27:17.987033 [debug] Server : PlayerConnection(@ 0xbdafa0)::EstablishPlayer(1, Ian, 1)
2016-02-10 16:27:17.987080 [debug] Server : (ServerFSM) ~Idle
2016-02-10 16:27:17.987096 [debug] Server : (ServerFSM) WaitingForSPGameJoiners
2016-02-10 16:27:17.987109 [debug] Server : ServerApp::CreateAIClients: 6 player (maybe not all AIs) at max aggression: 3
2016-02-10 16:27:17.987155 [debug] Server : ServerApp::CleanupAIs() telling AIs game is ending
2016-02-10 16:27:17.987180 [debug] Server : ServerApp::CleanupAIs() killing 0 AI clients.
2016-02-10 16:27:17.987228 [debug] Server : starting /home/ianc/Downloads/fob/freeorionca with GameSetup.ai-aggression set to 3
2016-02-10 16:27:17.987242 [debug] Server : ai-path set to 'AI'
2016-02-10 16:27:17.987254 [debug] Server : ai-config not set.
2016-02-10 16:27:18.989414 [debug] Server : done starting /home/ianc/Downloads/fob/freeorionca
2016-02-10 16:27:18.989525 [debug] Server : starting /home/ianc/Downloads/fob/freeorionca with GameSetup.ai-aggression set to 3
2016-02-10 16:27:18.989545 [debug] Server : ai-path set to 'AI'
2016-02-10 16:27:18.989561 [debug] Server : ai-config not set.
2016-02-10 16:27:19.991602 [debug] Server : done starting /home/ianc/Downloads/fob/freeorionca
2016-02-10 16:27:19.991707 [debug] Server : starting /home/ianc/Downloads/fob/freeorionca with GameSetup.ai-aggression set to 3
2016-02-10 16:27:19.991727 [debug] Server : ai-path set to 'AI'
2016-02-10 16:27:19.991760 [debug] Server : ai-config not set.
2016-02-10 16:27:20.993765 [debug] Server : done starting /home/ianc/Downloads/fob/freeorionca
2016-02-10 16:27:20.993877 [debug] Server : starting /home/ianc/Downloads/fob/freeorionca with GameSetup.ai-aggression set to 3
2016-02-10 16:27:20.993897 [debug] Server : ai-path set to 'AI'
2016-02-10 16:27:20.993925 [debug] Server : ai-config not set.
2016-02-10 16:27:21.995982 [debug] Server : done starting /home/ianc/Downloads/fob/freeorionca
2016-02-10 16:27:21.996091 [debug] Server : starting /home/ianc/Downloads/fob/freeorionca with GameSetup.ai-aggression set to 3
2016-02-10 16:27:21.996109 [debug] Server : ai-path set to 'AI'
2016-02-10 16:27:21.996127 [debug] Server : ai-config not set.
2016-02-10 16:27:22.997750 [debug] Server : done starting /home/ianc/Downloads/fob/freeorionca
2016-02-10 16:27:22.997905 [debug] Server : (ServerFSM) WaitingForSPGameJoiners.CheckStartConditions
2016-02-10 16:27:22.997950 [debug] Server : ServerNetworking::AcceptConnection : connected to new player
2016-02-10 16:27:22.997990 [debug] Server : ServerNetworking::AcceptConnection : connected to new player
2016-02-10 16:27:22.998017 [debug] Server : Server received message from player id: -1 of type Join Game and size 56
2016-02-10 16:27:22.998045 [debug] Server : (ServerFSM) WaitingForSPGameJoiners.JoinGame
2016-02-10 16:27:22.998062 [debug] Server : ExtractMessageData() from Default_Player_Name_in_WaitingForSPGameJoiners::react(const JoinGame& msg) client type -1
2016-02-10 16:27:22.998111 [debug] Server : PlayerConnection(@ 0xcb54e0)::EstablishPlayer(2, AI_1, 0)
2016-02-10 16:27:22.998239 [debug] Server : (ServerFSM) WaitingForSPGameJoiners.CheckStartConditions
2016-02-10 16:27:22.998275 [debug] Server : ServerNetworking::AcceptConnection : connected to new player
2016-02-10 16:27:22.998297 [debug] Server : Server received message from player id: -1 of type Join Game and size 56
2016-02-10 16:27:22.998327 [debug] Server : (ServerFSM) WaitingForSPGameJoiners.JoinGame
2016-02-10 16:27:22.998351 [debug] Server : ExtractMessageData() from Default_Player_Name_in_WaitingForSPGameJoiners::react(const JoinGame& msg) client type -1
2016-02-10 16:27:22.998372 [debug] Server : PlayerConnection(@ 0xd27690)::EstablishPlayer(3, AI_2, 0)
2016-02-10 16:27:22.998415 [debug] Server : (ServerFSM) WaitingForSPGameJoiners.CheckStartConditions
2016-02-10 16:27:22.998439 [debug] Server : ServerNetworking::AcceptConnection : connected to new player
2016-02-10 16:27:22.998469 [debug] Server : Server received message from player id: -1 of type Join Game and size 56
2016-02-10 16:27:22.998488 [debug] Server : (ServerFSM) WaitingForSPGameJoiners.JoinGame
2016-02-10 16:27:22.998501 [debug] Server : ExtractMessageData() from Default_Player_Name_in_WaitingForSPGameJoiners::react(const JoinGame& msg) client type -1
2016-02-10 16:27:22.998521 [debug] Server : PlayerConnection(@ 0x266b980)::EstablishPlayer(4, AI_3, 0)
2016-02-10 16:27:22.998561 [debug] Server : (ServerFSM) WaitingForSPGameJoiners.CheckStartConditions
2016-02-10 16:27:22.998584 [debug] Server : ServerNetworking::AcceptConnection : connected to new player
2016-02-10 16:27:22.998613 [debug] Server : Server received message from player id: -1 of type Join Game and size 56
2016-02-10 16:27:22.998631 [debug] Server : (ServerFSM) WaitingForSPGameJoiners.JoinGame
2016-02-10 16:27:22.998645 [debug] Server : ExtractMessageData() from Default_Player_Name_in_WaitingForSPGameJoiners::react(const JoinGame& msg) client type -1
2016-02-10 16:27:22.998664 [debug] Server : PlayerConnection(@ 0x1ce4650)::EstablishPlayer(5, AI_4, 0)
2016-02-10 16:27:22.998703 [debug] Server : (ServerFSM) WaitingForSPGameJoiners.CheckStartConditions
2016-02-10 16:27:22.998723 [debug] Server : Server received message from player id: -1 of type Join Game and size 56
2016-02-10 16:27:22.998749 [debug] Server : (ServerFSM) WaitingForSPGameJoiners.JoinGame
2016-02-10 16:27:22.998763 [debug] Server : ExtractMessageData() from Default_Player_Name_in_WaitingForSPGameJoiners::react(const JoinGame& msg) client type -1
2016-02-10 16:27:22.998800 [debug] Server : PlayerConnection(@ 0x25d9e90)::EstablishPlayer(6, AI_5, 0)
2016-02-10 16:27:22.998841 [debug] Server : (ServerFSM) WaitingForSPGameJoiners.CheckStartConditions
2016-02-10 16:27:22.998862 [debug] Server : ServerApp::NewGameInit
2016-02-10 16:27:22.998888 [debug] Server : ServerApp::NewGameInit: Creating Universe
2016-02-10 16:27:22.998990 [debug] Server : GenerateUniverse with seed: 0
2016-02-10 16:27:23.436913 [debug] Server : Initializing PredefinedShipDesignManager
2016-02-10 16:27:23.717736 [debug] Server : Initializing 6 empires
2016-02-10 16:27:23.717949 [debug] Server : Universe::InitEmpires creating new empire with ID: 1 for player: Ian (with player id: 1)
2016-02-10 16:27:23.717987 [debug] Server : Empire::Empire(Empire1, Ian, 1, colour)
2016-02-10 16:27:23.718025 [debug] Server : Universe::InitEmpires creating new empire with ID: 2 for player: AI_1 (with player id: 2)
2016-02-10 16:27:23.718042 [debug] Server : Empire::Empire(Empire2, AI_1, 2, colour)
2016-02-10 16:27:23.718069 [debug] Server : Universe::InitEmpires creating new empire with ID: 3 for player: AI_2 (with player id: 3)
2016-02-10 16:27:23.718085 [debug] Server : Empire::Empire(Empire3, AI_2, 3, colour)
2016-02-10 16:27:23.718111 [debug] Server : Universe::InitEmpires creating new empire with ID: 4 for player: AI_3 (with player id: 4)
2016-02-10 16:27:23.718137 [debug] Server : Empire::Empire(Empire4, AI_3, 4, colour)
2016-02-10 16:27:23.718172 [debug] Server : Universe::InitEmpires creating new empire with ID: 5 for player: AI_4 (with player id: 5)
2016-02-10 16:27:23.718187 [debug] Server : Empire::Empire(Empire5, AI_4, 5, colour)
2016-02-10 16:27:23.718212 [debug] Server : Universe::InitEmpires creating new empire with ID: 6 for player: AI_5 (with player id: 6)
2016-02-10 16:27:23.718226 [debug] Server : Empire::Empire(Empire6, AI_5, 6, colour)
2016-02-10 16:27:23.718424 [debug] Server : Python current directory set to /home/ianc/Downloads/src-tarball/default/python/universe_generation
2016-02-10 16:27:23.718510 [debug] Server : (ServerFSM) ~WaitingForSPGameJoiners
2016-02-10 16:27:23.718539 [debug] Server : ServerApp::~ServerApp
2016-02-10 16:27:23.718644 [error] Server : Exception AttributeError: "'NoneType' object has no attribute 'create_universe'" in <module 'threading' from '/home/ianc/anaconda2/lib/python2.7/threading.pyc'> ignored
2016-02-10 16:27:23.771061 [debug] Server : Cleaned up server Python interface
2016-02-10 16:27:23.771131 [debug] Server : ServerApp::CleanupAIs() telling AIs game is ending
2016-02-10 16:27:23.771425 [debug] Server : ServerApp::CleanupAIs() waiting 1 second for AI processes to clean up...
2016-02-10 16:27:24.771624 [debug] Server : ServerApp::CleanupAIs() killing 5 AI clients.
2016-02-10 16:27:24.771724 [debug] Server : Process::Kill
2016-02-10 16:27:24.771747 [debug] Server : Process::Kill calling m_impl->Kill()
2016-02-10 16:27:24.771778 [debug] Server : Process::Impl::Kill calling kill(m_process_id, SIGKILL)
2016-02-10 16:27:24.771823 [debug] Server : Process::Impl::Kill calling waitpid(m_process_id, &status, 0)
2016-02-10 16:27:24.771867 [debug] Server : Process::Impl::Kill done
2016-02-10 16:27:24.771908 [debug] Server : Process::Kill calling RequestTermination()
2016-02-10 16:27:24.771926 [debug] Server : Process::Impl::Kill calling kill(m_process_id, SIGKILL)
2016-02-10 16:27:24.771942 [debug] Server : Process::Impl::Kill calling waitpid(m_process_id, &status, 0)
2016-02-10 16:27:24.771955 [debug] Server : Process::Impl::Kill done
2016-02-10 16:27:24.771969 [debug] Server : Process::Kill
2016-02-10 16:27:24.771982 [debug] Server : Process::Kill calling m_impl->Kill()
2016-02-10 16:27:24.771995 [debug] Server : Process::Impl::Kill calling kill(m_process_id, SIGKILL)
2016-02-10 16:27:24.772010 [debug] Server : Process::Impl::Kill calling waitpid(m_process_id, &status, 0)
2016-02-10 16:27:24.772030 [debug] Server : Process::Impl::Kill done
2016-02-10 16:27:24.772043 [debug] Server : Process::Kill calling RequestTermination()
2016-02-10 16:27:24.773238 [debug] Server : Process::Impl::Kill calling kill(m_process_id, SIGKILL)
2016-02-10 16:27:24.773260 [debug] Server : Process::Impl::Kill calling waitpid(m_process_id, &status, 0)
2016-02-10 16:27:24.773272 [debug] Server : Process::Impl::Kill done
2016-02-10 16:27:24.773283 [debug] Server : Process::Kill
2016-02-10 16:27:24.773294 [debug] Server : Process::Kill calling m_impl->Kill()
2016-02-10 16:27:24.773305 [debug] Server : Process::Impl::Kill calling kill(m_process_id, SIGKILL)
2016-02-10 16:27:24.773316 [debug] Server : Process::Impl::Kill calling waitpid(m_process_id, &status, 0)
2016-02-10 16:27:24.773334 [debug] Server : Process::Impl::Kill done
2016-02-10 16:27:24.773346 [debug] Server : Process::Kill calling RequestTermination()
2016-02-10 16:27:24.773357 [debug] Server : Process::Impl::Kill calling kill(m_process_id, SIGKILL)
2016-02-10 16:27:24.773367 [debug] Server : Process::Impl::Kill calling waitpid(m_process_id, &status, 0)
2016-02-10 16:27:24.773378 [debug] Server : Process::Impl::Kill done
2016-02-10 16:27:24.773388 [debug] Server : Process::Kill
2016-02-10 16:27:24.773399 [debug] Server : Process::Kill calling m_impl->Kill()
2016-02-10 16:27:24.773409 [debug] Server : Process::Impl::Kill calling kill(m_process_id, SIGKILL)
2016-02-10 16:27:24.773420 [debug] Server : Process::Impl::Kill calling waitpid(m_process_id, &status, 0)
2016-02-10 16:27:24.773435 [debug] Server : Process::Impl::Kill done
2016-02-10 16:27:24.773446 [debug] Server : Process::Kill calling RequestTermination()
2016-02-10 16:27:24.773456 [debug] Server : Process::Impl::Kill calling kill(m_process_id, SIGKILL)
2016-02-10 16:27:24.773466 [debug] Server : Process::Impl::Kill calling waitpid(m_process_id, &status, 0)
2016-02-10 16:27:24.773477 [debug] Server : Process::Impl::Kill done
2016-02-10 16:27:24.773487 [debug] Server : Process::Kill
2016-02-10 16:27:24.773497 [debug] Server : Process::Kill calling m_impl->Kill()
2016-02-10 16:27:24.773508 [debug] Server : Process::Impl::Kill calling kill(m_process_id, SIGKILL)
2016-02-10 16:27:24.773519 [debug] Server : Process::Impl::Kill calling waitpid(m_process_id, &status, 0)
2016-02-10 16:27:24.773532 [debug] Server : Process::Impl::Kill done
2016-02-10 16:27:24.773543 [debug] Server : Process::Kill calling RequestTermination()
2016-02-10 16:27:24.773554 [debug] Server : Process::Impl::Kill calling kill(m_process_id, SIGKILL)
2016-02-10 16:27:24.773564 [debug] Server : Process::Impl::Kill calling waitpid(m_process_id, &status, 0)
2016-02-10 16:27:24.773575 [debug] Server : Process::Impl::Kill done

User avatar
adrian_broher
Programmer
Posts: 1156
Joined: Fri Mar 01, 2013 9:52 am
Location: Germany

Re: can't start a solo game: connection to server has been l

#22 Post by adrian_broher »

2016-02-10 16:27:13.500100 [error] Server : /home/ianc/python/planets.py:74: RuntimeWarning: invalid value encountered in divide
This file is no part of the freeorion project. Care to elaborate? I assume the server picks up whatever it finds first in the search path as listed:
Python module search path: /home/ianc/python/util:/home/ianc/python:/home/ianc/anaconda2/lib/python2.7/site-packages/:/home/ianc/anaconda2/lib/python2.7/:/home/ianc/anaconda2/lib/python2.7/plat-x86_64-linux-gnu:/home/ianc/anaconda2/lib/python2.7/lib-tk:/home/ianc/anaconda2/lib/python2.7/lib-old:/home/ianc/anaconda2/lib/python2.7/lib-dynload
There are quite a lot of /home directories in that one. Is there a reason why you don't use the system python installation?
Resident code gremlin
Attached patches are released under GPL 2.0 or later.
Git author: Marcel Metz

kreuzfeld00
Space Krill
Posts: 4
Joined: Wed Feb 10, 2016 11:31 pm

Re: can't start a solo game: connection to server has been l

#23 Post by kreuzfeld00 »

Ha! Thanks for catching that.

I'm an astronomer and have a Python routine called "planets.py" that I use for my research. After fixing the paths, FreeOrion no longer mistakes that file for the desired one, and the game starts up.

Many thanks for your help in tracking down such a simple issue!

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

Re: can't start a solo game: connection to server has been l

#24 Post by Geoff the Medio »

kreuzfeld00 wrote:...such a simple issue!
Yet an endlessly recurring one... Hence those debug messages in the log.

User avatar
Vezzra
Release Manager, Design
Posts: 6095
Joined: Wed Nov 16, 2011 12:56 pm
Location: Sol III

Re: can't start a solo game: connection to server has been l

#25 Post by Vezzra »

That's the problem when not using a completely self-contained scripting engine that ships with the application. On Windows and OSX we finally got the game to use its own Python runtime environment and only that, to avoid collisions like this.

On Linux we don't/can't do that, we have to rely on the system Python installation, and that of course will always be prone to these kind of issues. However, as long as one doesn't mess with the system Python installation, everything should be fine. I wonder if there's a way to make sure FO uses only system Python paths on Linux...

User avatar
adrian_broher
Programmer
Posts: 1156
Joined: Fri Mar 01, 2013 9:52 am
Location: Germany

Re: can't start a solo game: connection to server has been l

#26 Post by adrian_broher »

Vezzra wrote:That's the problem when not using a completely self-contained scripting engine that ships with the application. On Windows and OSX we finally got the game to use its own Python runtime environment and only that, to avoid collisions like this.
That's not the problem. The problem is that we don't have a namespace exclusive to freeorion. A python 'freeorion' package, that would introduce such namespace when exposing the C++ Python binding. Something in the spirit of:

Code: Select all

from freeorion.universe import Planet
from freeorion.ai import AIStrategy
The problem here is the missing encapsulation.
Vezzra wrote:On Linux we don't/can't do that, we have to rely on the system Python installation, and that of course will always be prone to these kind of issues.
I don't even WANT to do that. The system installation is fine and why don't use it?
Resident code gremlin
Attached patches are released under GPL 2.0 or later.
Git author: Marcel Metz

User avatar
Vezzra
Release Manager, Design
Posts: 6095
Joined: Wed Nov 16, 2011 12:56 pm
Location: Sol III

Re: can't start a solo game: connection to server has been l

#27 Post by Vezzra »

adrian_broher wrote:The problem is that we don't have a namespace exclusive to freeorion. A python 'freeorion' package, that would introduce such namespace when exposing the C++ Python binding.
Yep, that's definitely something we need to do at some point, and will certainly prevent a lot of potential issues. I'm revising the Python interface already (very slowly, but still), so I probably should incorporate this fix too.
The system installation is fine and why don't use it?
Well, the moment you don't use your own ("internal") scripting engine, but rely on an "external" one (e.g. provided by the system), you open the can of worms "Will our scripts really be 100% compatible with the external scripting environment?". Of course, with Python on Linux that almost never should be an issue - unless someone makes some changes to his system that kind of "messes" with the system Python installation. Like kreuzfeld00 obviously did on his system: judging by the Python module search path setting reported in his log files he installed the "Anaconda" package. In this case the only issue triggered by that was that FO got the wrong planet.py module, but what if the Python installation of the Anaconda package didn't work with FOs Python scripts because of some incompatibilities?

On OSX we de facto did run into issues when FO (for whatever reason) used the system Python installation instead of the bundled one, and on Windows you can't rely on any installed Python environments at all.

On Linux using the system Python installation actually works so well (and the exceptions to that are so rare), that doing so is of course the preferred way.

User avatar
adrian_broher
Programmer
Posts: 1156
Joined: Fri Mar 01, 2013 9:52 am
Location: Germany

Re: can't start a solo game: connection to server has been l

#28 Post by adrian_broher »

Vezzra wrote:Well, the moment you don't use your own ("internal") scripting engine, but rely on an "external" one (e.g. provided by the system), you open the can of worms "Will our scripts really be 100% compatible with the external scripting environment?". Of course, with Python on Linux that almost never should be an issue - unless someone makes some changes to his system that kind of "messes" with the system Python installation.
This argument is opening a can of worms. Can we rely on the OpenGL implementation? Obviously not every time, just see the issues with broken font rendering on Intel systems. Should we bundle an OpenGL implementation then? Following your argument: Yes, definitely. However I think the time bundle and maintaining any (!) additional software beside the actual fo code is just a waste of precious time.
Vezzra wrote:Like kreuzfeld00 obviously did on his system: judging by the Python module search path setting reported in his log files he installed the "Anaconda" package. In this case the only issue triggered by that was that FO got the wrong planet.py module, but what if the Python installation of the Anaconda package didn't work with FOs Python scripts because of some incompatibilities?
But that's wrong. The implementation worked as expected and selected whatever script files was found in the search path first. We are the ones that have wrong assumptions. For python that would be at least:
  • [-]It's a python 2.7.x implementation.[/-]
    [-]The search path doesn't contain any name conflicts.[/-]
However this isn't something we should just assume but enforce and this doesn't mean we should bundle it but check and configuring it to our means before using it. We have the same issue with OpenGL currently. We assume that some features are there (most of the time they are) but we don't check for them and bail out if necessary.
Vezzra wrote:On OSX we de facto did run into issues when FO (for whatever reason) used the system Python installation instead of the bundled one, and on Windows you can't rely on any installed Python environments at all.
I guess we assumed that the python version is 2.7 and actually was 2.6 for snow leopard, right?
Resident code gremlin
Attached patches are released under GPL 2.0 or later.
Git author: Marcel Metz

User avatar
Vezzra
Release Manager, Design
Posts: 6095
Joined: Wed Nov 16, 2011 12:56 pm
Location: Sol III

Re: can't start a solo game: connection to server has been l

#29 Post by Vezzra »

adrian_broher wrote:This argument is opening a can of worms. Can we rely on the OpenGL implementation? Obviously not every time, just see the issues with broken font rendering on Intel systems. Should we bundle an OpenGL implementation then? Following your argument: Yes, definitely.
Well, the problem here is that when it comes to the OpenGL implementation, I don't think you can really compare that to the Python thing. With OpenGL, we're dealing with drivers here, which are hardware dependent - the OpenGL drivers are provided by the graphics card vendors. In this case, we simply can't bundle the implementations we know will work, because we'd need to bundle the drivers for all graphics card we'd want to support - beyond impossible. So, in this case, there is really no choice than to rely on the OpenGL drivers installed on the users systems, and if the drivers on a specific system are not compatible, FO won't run on this system, and there isn't much that we can do about it.

But Python we can bundle, and it's not that complicated (but still a major PITA, can't deny that).
However I think the time bundle and maintaining any (!) additional software beside the actual fo code is just a waste of precious time.
On Linux, yes, because there practically all distros have package management systems in place which take care of all the dependencies, and are sufficiently reliable.

On Windows and OSX, forget it. Bundle what you can. I wish it wasn't necessary, because bundling dependencies is, as already noted above, a major pain, but not doing it causes even more trouble. And yes, that is a huge flaw of these platforms, but nothing we can do anything about. We've to work with what we've got.
But that's wrong. The implementation worked as expected and selected whatever script files was found in the search path first.
Yeah, in that case, this was the only problem, and one we can fairly easily solve (by making sure to use a proper namespace for our Python modules).

But what if that Anaconde package wasn't compatible? What if it was based on Python 2.6 or 2.5? Or did some other irregular stuff that would have broken compatibility with our scripts? Sure, the fault would lie with Anaconda in that case, but that wouldn't change the fact that FO doesn't work. Anyway, that's a case (assuming we're talking about Linux) where I'd tell the user that the problem is whatever software he had installed that screwed up his system, we can't support fixing that for him, and he needs to clean up his system.
We are the ones that have wrong assumptions. For python that would be at least:
  • [-]It's a python 2.7.x implementation.[/-]
    [-]The search path doesn't contain any name conflicts.[/-]
However this isn't something we should just assume but enforce and this doesn't mean we should bundle it but check and configuring it to our means before using it.
The second point can easily be enforced/ensured, as already mentioned. But how are you going to enforce the first one? On Linux we can probably rely on having a Python 2.7 environment installed (we'll probably still have to make some adjustments to our code to ensure that in case of a parallel Python 3.x installation the 2.7 one is used) for years to come. But I don't know how to do that on OSX, not to speak of Windows (where you can't rely on having Python installed at all).
I guess we assumed that the python version is 2.7 and actually was 2.6 for snow leopard, right?
I don't remember which had been the exact versions that we expected and that were actually installed, but aside from that, yeah, exactly this was the issue. And aside from packaging Python with the FO app and making sure the app actually uses the bundled Python instead of another Python installation it finds on the system (which turned out to be not as easy as I thought), I don't know how to make sure a Python 2.7 installation is present and used.

Post Reply