FreeOrion

Forums for the FreeOrion project
It is currently Thu Dec 14, 2017 10:31 pm

All times are UTC


Forum rules


Always mention the exact version of FreeOrion you are testing.

When reporting an issue regarding the AI, if possible provide the relevant AI log file and a save game file that demonstrates the issue.



Post new topic Reply to topic  [ 12 posts ] 
Author Message
PostPosted: Wed Mar 01, 2017 3:58 am 
Offline
Dyson Forest
User avatar

Joined: Sun Jun 08, 2014 1:18 am
Posts: 214
I got today's test build for the Mac.
Whenever I try to load a saved game, I get a server time out.
I tried the build from last week, and got the same problem.
(The last build I had tried before that was 10 months old. I've been away...)
Using Mac OSX 10.11.6 (El Capitan, not Sierra).

In the freeorion.log file, no problem when starting (and playing) a new game:
Quote:
2017-02-28 22:30:39.464001 [debug] Client : HumanClientApp.cpp:374 : HumanClientApp::StartServer: /Users/me/Applic/FreeOrion/FreeOrion.app/Contents/Executables/freeoriond
2017-02-28 22:30:39.464142 [debug] Client : HumanClientApp.cpp:404 : ai-config not set.
2017-02-28 22:30:46.865406 [debug] Client : ClientNetworking.cpp:166 : ClientNetworking::ConnectToServer : attempting to connect to server at 127.0.0.1
2017-02-28 22:30:46.865604 [debug] Client : ClientNetworking.cpp:178 : tcp::resolver::iterator host_name: 127.0.0.1 address: 127.0.0.1 port: 12346
2017-02-28 22:30:46.866036 [debug] Client : ClientNetworking.cpp:196 : ClientNetworking::ConnectToServer : connected to server
2017-02-28 22:30:46.866072 [debug] Client : ClientNetworking.cpp:198 : ClientNetworking::ConnectToServer : this client using binary serialization.
2017-02-28 22:30:46.866120 [debug] Client : ClientNetworking.cpp:203 : ClientNetworking::ConnectToServer : starting networking thread
2017-02-28 22:30:46.866214 [debug] Client : HumanClientApp.cpp:457 : HumanClientApp::NewSinglePlayerGame : Connected to server

... but at some point I need a break. And I'm unable to use the saved game, which has different results:
Quote:
2017-02-28 22:36:44.785759 [debug] Client : HumanClientApp.cpp:651 : HumanClientApp::LoadSinglePlayerGame() Starting server
2017-02-28 22:36:44.785805 [debug] Client : HumanClientApp.cpp:374 : HumanClientApp::StartServer: /Users/me/Applic/FreeOrion/FreeOrion.app/Contents/Executables/freeoriond
2017-02-28 22:36:44.785838 [debug] Client : HumanClientApp.cpp:404 : ai-config not set.
2017-02-28 22:36:44.799227 [debug] Client : HumanClientApp.cpp:653 : HumanClientApp::LoadSinglePlayerGame() Server started
2017-02-28 22:36:44.799476 [debug] Client : HumanClientApp.cpp:658 : HumanClientApp::LoadSinglePlayerGame() Connecting to server
2017-02-28 22:36:44.799503 [debug] Client : ClientNetworking.cpp:166 : ClientNetworking::ConnectToServer : attempting to connect to server at 127.0.0.1
2017-02-28 22:36:44.799600 [debug] Client : ClientNetworking.cpp:178 : tcp::resolver::iterator host_name: 127.0.0.1 address: 127.0.0.1 port: 12346
2017-02-28 22:36:49.800001 [debug] Client : ClientNetworking.cpp:207 : ClientNetworking::ConnectToServer : no connection yet...
2017-02-28 22:36:49.800111 [debug] Client : ClientNetworking.cpp:211 : ClientNetworking::ConnectToServer : failed to connect to server (no exceptions)
2017-02-28 22:36:49.800139 [error] Client : HumanClientApp.cpp:662 : HumanClientApp::LoadSinglePlayerGame() server connecting timed out


Top
 Profile  
 
PostPosted: Wed Mar 01, 2017 4:23 am 
Offline
Creative Contributor
User avatar

Joined: Fri Jun 28, 2013 11:45 pm
Posts: 3291
You won't be able to load ten month old savegames with a current test: basically finish any game before installing a new version, dev progress means that savegames break regularly between versions.

If you want to complete your old games then you'll need to do it with the old version, but if the current version lets you play normally, which is what I think is happening, you're good to go with the new features: several new features are only unlocked at game start or on completing a tech anyway, so even if there was compatibility between versions you'd miss out on a lot of stuff, etc.

_________________
Mat Bowles

Any code or patches in anything posted here is released under the CC and GPL licences in use for the FO project.


Top
 Profile  
 
PostPosted: Wed Mar 01, 2017 4:30 am 
Offline
Dyson Forest
User avatar

Joined: Sun Jun 08, 2014 1:18 am
Posts: 214
That wasn't what I meant.
I removed all traces of the 10 month old version, including saves.

As the log file time stamp indicates, I started a new game with this version, saved it, and then was unable to load it without getting the server time-out.

I only mentioned 10 months to indicate that I don't know when this problem started happening.

There are differences between a "new game" and a "load game", just based on the extra messages being generated by HumanClientApp.cpp in the log file. But since I haven't been up to my neck in the guts of the code like the developers, I don't know what else to try to help diagnose the issue.

EDIT: I'm not sure if I'm looking at the current version of HumanClientApp.cpp,
but it looks like the "New Game" subroutine uses
Quote:
448 while (!m_networking.ConnectToLocalHostServer(boost::posix_time::seconds(2))) {

while the "LoadSinglePlayerGame" subroutine uses
Quote:
660 while (!m_networking.ConnectToLocalHostServer()) {


Hopefully someone else knows what the default arguments are for "ConnectToLocalHostServer", and whether that would make a significant difference.


Top
 Profile  
 
PostPosted: Wed Mar 01, 2017 4:56 am 
Offline
Creative Contributor
User avatar

Joined: Fri Jun 28, 2013 11:45 pm
Posts: 3291
Ah, ok, I misread. I just checked as I'm on my laptop and I've saved, quit and then reloaded the game I was playing that I started earlier, so it's not happening on Windows, beyond that it'll need someone who knows the guts better'n me (and, y'know, with a Mac).

_________________
Mat Bowles

Any code or patches in anything posted here is released under the CC and GPL licences in use for the FO project.


Top
 Profile  
 
PostPosted: Wed Mar 01, 2017 5:48 am 
Offline
Dyson Forest
User avatar

Joined: Sun Jun 08, 2014 1:18 am
Posts: 214
I looked at the freeoriond.log files for "New Game" and for "Load Game".
For both, it took about 1.8 seconds between the "Logger initialized" to "server waiting for network events".

Now I looked at the freeorion.log file.
For the new game, I can see the line "HumanClientApp::StartServer", and about 4 seconds later (2.3 seconds after the server is ready for network events), there is an attempt (successful) to ConnectToServer.


For the load game, there is a message from "HumanClientApp::LoadSinglePlayerGame()" that the server has started, only 10 msec after the "StartServer", and immediately tries to make a connection. This is 2 seconds before the server is actually ready for network events.

If someone can figure out why the "Load Game" isn't waiting 4 seconds like the "New Game" does, that will probably solve the time-out issue.

EDIT: I just tried the "New Game - Quickstart" option. It also tries to make an immediate connection to the server, well before the server is ready. The difference is, after timing out after 2 seconds, it tried a 2nd time to connect, and this time was successful.

EDITEDIT: There is a global variable SERVER_CONNECT_TIMEOUT = 4.5 seconds.
As long as this much time has not elapsed, the game will continue trying to connect to the server.

In the case of "New Game - Quickstart", since it tries every 2 seconds to make a connection, it can fail the first time and still have 2 more cracks at a connection. In the case of "Load Game", it tries every 5 seconds (the default value when no argument is given), so when it fails the first time, there is no 2nd or 3rd try.

MY SUGGESTION: In "HumanClientApp.cpp" change line 660 to be like line 448 (include the "boost::posix_time::seconds(2)" as an argument to the ConnectToLocalHostServer call).


Top
 Profile  
 
PostPosted: Wed Mar 01, 2017 8:38 am 
Offline
Release Manager, Design
User avatar

Joined: Wed Nov 16, 2011 12:56 pm
Posts: 4296
Location: Sol III
@mem359, can you open a github issue about this?


Top
 Profile  
 
PostPosted: Wed Mar 01, 2017 8:43 am 
Offline
Release Manager, Design
User avatar

Joined: Wed Nov 16, 2011 12:56 pm
Posts: 4296
Location: Sol III
Yep, can reproduce the issue on my Mac (OSX 10.10).


Top
 Profile  
 
PostPosted: Wed Mar 01, 2017 1:32 pm 
Offline
Dyson Forest
User avatar

Joined: Sun Jun 08, 2014 1:18 am
Posts: 214
Vezzra wrote:
@mem359, can you open a github issue about this?

https://github.com/freeorion/freeorion/issues/1371

geoffthemedio has already noticed it, and added labels to categorize the problem.


Top
 Profile  
 
PostPosted: Wed Mar 08, 2017 9:19 pm 
Offline
Dyson Forest
User avatar

Joined: Sun Jun 08, 2014 1:18 am
Posts: 214
This issue is still present in the March 7th test build.

(Although it looks like LGM-Doyle committed something a few hours ago to fix this?)


Top
 Profile  
 
PostPosted: Thu Mar 09, 2017 9:17 am 
Offline
Release Manager, Design
User avatar

Joined: Wed Nov 16, 2011 12:56 pm
Posts: 4296
Location: Sol III
We are still working on the fix. LGM-Doyle has already provided a PR, but there is a bug in it we haven't been able to track down yet.


Top
 Profile  
 
PostPosted: Wed Mar 22, 2017 7:24 pm 
Offline
Dyson Forest
User avatar

Joined: Sun Jun 08, 2014 1:18 am
Posts: 214
As expected from recent code changes, the most recent test build (from March 21) no longer has this problem.


Top
 Profile  
 
PostPosted: Thu Mar 23, 2017 1:10 pm 
Offline
Programmer

Joined: Mon Feb 29, 2016 8:37 pm
Posts: 204
mem359, thanks for the feedback confirming the fix.


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 12 posts ] 

All times are UTC


Who is online

Users browsing this forum: No registered users and 1 guest


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB® Forum Software © phpBB Group