Page 1 of 2

error #10054

Posted: Sun Dec 16, 2018 8:07 pm
by The Silent One
I've freshly compiled freeorion from source, but the game hangs on galaxy creation if I insert AIs. freeoriond-log reads:

Code: Select all

20:57:33.933442 [error] network : servernetworking.cpp:337 : Spurious network error on startup of client. player id = -1.  Retrying read...
20:57:33.933442 [error] network : servernetworking.cpp:329 : PlayerConnection::HandleMessageHeaderRead(): new connection error #10054 "Eine vorhandene Verbindung wurde vom Remotehost geschlossen" waiting for 0.5s
I've tried googling the issue, but can't find solutions that seem to match it - any ideas?

Re: error #10054

Posted: Sun Dec 16, 2018 8:50 pm
by Dilvish
To help me try to make sense of that I translated it to English, and get "An existing connection was closed by the remote host", which sounds like the kind of message the server might give if one of the AI's crashes (which makes sense given the context you describe). If you ran with multiple AI's, I'd suggest running with a single AI so that we can be sure the error would be in AI_1.log. Then post AI_1.log here (and of course feel free to search for the error message in it yourself, but it might still be good to post the whole log file).

Re: error #10054

Posted: Sun Dec 16, 2018 9:38 pm
by The Silent One
Ran the game with 1 AI, it exits with "player no longer connected to server". Logs attached (didn't see anything conspicuous in the AI log).

Re: error #10054

Posted: Mon Dec 17, 2018 2:15 am
by Dilvish
Hmm, not many hints so far. Could you also attach the human client log?

I take it that's some further work you're trying on your blockade UI? If you'll push to an alternate branch on your github fork I'll try it out on my machine (probably best to not push this to the branch linked to your PR right now since this is crashing).

Re: error #10054

Posted: Mon Dec 17, 2018 12:53 pm
by The Silent One
I'm certain that this issue isn't due to any code-change of mine, it also occurs with a fresh compile from master. My guess is that it could be some firewall issue with my system, although I have put freeorionD.exe on the firewall's whitelist and also disabled the firewall to no avail. The human client log is attached.

Re: error #10054

Posted: Mon Dec 17, 2018 6:29 pm
by Dilvish
The Silent One wrote: Mon Dec 17, 2018 12:53 pm My guess is that it could be some firewall issue with my system, although I have put freeorionD.exe on the firewall's whitelist and also disabled the firewall to no avail.
If you are putting entries into your whitelist via text entry rather than selecting from a list of applications, I am pretty sure that on Windows you'll need to make sure you have that capitalized: "FreeOrionD.exe". Also make sure you have both the human client FreeOrion.exe and the AI client FreeOrionCA listed as well. (and shouldn't the firewall make a log of when it is blocking apps?)

If that doesn't clear up the problem, then perhaps we might get a little more info if you set your language to English (in freeorion-- settting main stringtable to en.txt) and re-run and then post that AI log file again. Right now it just abruptly ends with a string of debug messages about how it's having to fall back to the default stringtable, and I wonder if we are perhaps missing out on more informative messages due to its write buffer being filled to capacity with these stringtable messages.

Re: error #10054

Posted: Mon Dec 17, 2018 7:39 pm
by The Silent One
Dilvish wrote: Mon Dec 17, 2018 6:29 pmIf you are putting entries into your whitelist via text entry rather than selecting from a list of applications, I am pretty sure that on Windows you'll need to make sure you have that capitalized: "FreeOrionD.exe". Also make sure you have both the human client FreeOrion.exe and the AI client FreeOrionCA listed as well. (and shouldn't the firewall make a log of when it is blocking apps?)
I put all the .exes on the whitelist (correctly spelled ofc), unfortunately this didn't solve it. And you're right, the firewall does not report to have blocked anything, so maybe it is something else.
English logs are attached.

Re: error #10054

Posted: Tue Dec 18, 2018 11:34 am
by Oberlus
Compiled from master (pulled last week), I've created a multiplayer game, added a single AI, and I was able to play, no crashes nor errors.

Re: error #10054

Posted: Tue Dec 18, 2018 12:08 pm
by The Silent One
Oberlus wrote: Tue Dec 18, 2018 11:34 am Compiled from master (pulled last week), I've created a multiplayer game, added a single AI, and I was able to play, no crashes nor errors.
I don't think the issue lies within the source code, it must be something with my system preventing communication between host and client.

Re: error #10054

Posted: Tue Dec 18, 2018 12:26 pm
by Geoff the Medio
My guess is that this is a Python issue in the AIs. After detecting language, the log just stops. It should continue to have a log line about Python being successfully initialized, something like:

Code: Select all

20:42:54.975693 [debug] python : FreeOrionAI.py:56 : Path to folder for user specific data: C:/Users/Geoff/AppData/Roaming/FreeOrion
20:42:54.976694 [debug] python : FreeOrionAI.py:57 : Python paths ['C:\\Users\\Geoff\\Desktop\\FreeOrionSDK9\\FreeOrion\\python27.zip', 'C:\\Users\\Geoff\\Desktop\\FreeOrionSDK9\\FreeOrion', 'C:\\Users\\Geoff\\Desktop\\FreeOrionSDK9\\FreeOrion\\Lib\\python27', 'C:\\Users\\Geoff\\Desktop\\FreeOrionSDK9\\FreeOrion\\Lib\\python27\\lib-dynload', 'C:\\Users\\Geoff\\Desktop\\FreeOrionSDK9\\FreeOrion\\Lib\\python27\\lib-dynload\\RelWithDebInfo', 'C:\\Users\\Geoff\\Desktop\\FreeOrionSDK9\\FreeOrion\\Lib\\python27\\plat-win32', 'C:/Users/Geoff/Desktop/FreeOrionSDK9/FreeOrion/default/python', 'C:/Users\\Geoff\\Desktop\\FreeOrionSDK9\\FreeOrion\\default\\python\\AI']
20:42:54.976694 [debug] ai : AIFramework.cpp:134 : AI Python modules successfully initialized!
20:42:54.976694 [debug] ai : CommonFramework.cpp:102 : FreeOrion Python interface successfully initialized!

Re: error #10054

Posted: Tue Dec 18, 2018 5:05 pm
by Dilvish
I am able to sort of replicate this error, or something like it, by starting the 'host a multiplayer game' process, then launching an AI from a terminal. My original motivation was just to verify my recollection of the process, so that perhaps theSilentOne could do that and see if he got more error messages from the AI client via the terminal. The AI connects to the multiplayer lobby just fine, but then when I try to launch the game the AI disconnects and the log has a similar abrupt ending as the logs here. And unfortunately the terminal output was not particularly helpful, seeming to indicate simply that the AI client considered itself to have terminated cleanly.

Geoff, could you give that a go and see if you get the same results?

Re: error #10054

Posted: Tue Dec 18, 2018 7:43 pm
by The Silent One
Dilvish wrote: Tue Dec 18, 2018 5:05 pm..., then launching an AI from a terminal. My original motivation was just to verify my recollection of the process, so that perhaps theSilentOne could do that and see if he got more error messages from the AI client via the terminal.
Not sure how to do that, starting freeorionCA.exe from a terminal gives me an error message telling me "The AI client should not be executed directly!".

Re: error #10054

Posted: Tue Dec 18, 2018 9:16 pm
by Dilvish
The Silent One wrote: Tue Dec 18, 2018 7:43 pm Not sure how to do that, starting freeorionCA.exe from a terminal gives me an error message telling me "The AI client should not be executed directly!".
You have to give it at least two arguments to avoide that message -- the first is a string for its player name, can be anything, and the second is a number 1-5 for the max aggression

(And we should probably get around to changing that error message)

Re: error #10054

Posted: Wed Dec 19, 2018 12:44 pm
by The Silent One
Opening multiplayer setup, then typing "freeorionca.exe hello 1" in a console does, after a short pause, nothing apparent. hello.log looks like the AI logs before, terminating after:

Code: Select all

13:40:23.130547 [info] log : logger.cpp:330 : Setting "python" logger threshold to "debug".
13:40:23.130547 [info] log : logger.cpp:198 : Added logger named "python"
13:40:23.130547 [info] log : logger.cpp:330 : Setting "python" logger threshold to "debug".
13:40:23.130547 [debug] log : loggerwithoptionsdb.cpp:105 : Configure log source "python" from optionsDB using threshold debug
13:40:23.130547 [debug] python : configure_logging.py:208 : Python stdout and stderr are redirected to ai process.
13:40:23.130547 [info] python : configure_logging.py:223 : The python logger is initialized with a log level of DEBUG
13:40:23.147411 [debug] ai : i18n.cpp:35 : Detected language: Previously specified C:\Users\Martin\Documents\FreeOrion SDK\FreeOrion\default\stringtables\en.txt

Re: error #10054

Posted: Wed Dec 19, 2018 4:38 pm
by Dilvish
The Silent One wrote: Wed Dec 19, 2018 12:44 pm Opening multiplayer setup, then typing "freeorionca.exe hello 1" in a console does, after a short pause, nothing apparent.
If you do that (launch the AI) during the galaxy setup phase of hosting a multiplayer game, then the AI should automatically get added to the list of players in the game (so if you did nothing else it would just be you and them). Then you can launch the game and verify if the AI is actively playing. That used to work fine for me, though currently it gives me the problem I describe above.