"The connection to the 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

Post Reply
Message
Author
CFV
Space Krill
Posts: 4
Joined: Mon Dec 14, 2020 5:23 am

"The connection to the server has been lost."

#1 Post by CFV »

Hello, first time here.
I discovered this a while back and have tried to play it but every time I try to start (normally or with quick start) I get the "The connection to the server has been lost." message, haven't been able to start a game even a single time.
Attached are the log files.
I have seen this is a common error but haven't been able to find any solution :(
Attachments
freeoriond.log
(38.61 KiB) Downloaded 180 times
freeorion.log
(53.98 KiB) Downloaded 129 times

CFV
Space Krill
Posts: 4
Joined: Mon Dec 14, 2020 5:23 am

Re: "The connection to the server has been lost."

#2 Post by CFV »

sorry for the repeat with the system info is as follows
windows 10 64bit
freeorion 0.4.10

User avatar
Oberlus
Cosmic Dragon
Posts: 5713
Joined: Mon Apr 10, 2017 4:25 pm

Re: "The connection to the server has been lost."

#3 Post by Oberlus »

I see the server seems to crash unexpectedly. There is not enough info on the log about the reason.
Do you see any messages in the window where the executable is ran?
Maybe you'll have to wait for a developer to take care of this and give you advice. For that, it would be better if you post your issue in https://github.com/freeorion/freeorion/issues

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

Re: "The connection to the server has been lost."

#4 Post by Geoff the Medio »

What language is the system set to that you're running FreeOrion on? The client log has something slightly suggestive:

Code: Select all

22:45:45.799136 {0x00001ef4} [error] client : process.cpp:169 : Process::Impl::Kill : Error terminating process: アクセスが拒否されました。

CFV
Space Krill
Posts: 4
Joined: Mon Dec 14, 2020 5:23 am

Re: "The connection to the server has been lost."

#5 Post by CFV »

The system is in Japanese, with Japanese windows

User avatar
Oberlus
Cosmic Dragon
Posts: 5713
Joined: Mon Apr 10, 2017 4:25 pm

Re: "The connection to the server has been lost."

#6 Post by Oberlus »

Geoff the Medio wrote: Mon Dec 14, 2020 10:00 pmアクセスが拒否されました。
Google says this means "access denied".

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

Re: "The connection to the server has been lost."

#7 Post by Geoff the Medio »

CFV wrote: Tue Dec 15, 2020 12:31 amThe system is in Japanese, with Japanese windows
Are you able to run programs from the command line? All I can think to suggest is to have you run freeoriond.exe from the windows command prompt and see if it starts up, then in a separate command prompt window, run "freeorion --network.server.external.force 1" and quickstart a game and check if there is anything outpout to the freeoriond console... It might show some error that isn't getting logged for some reason before it crashes...

CFV
Space Krill
Posts: 4
Joined: Mon Dec 14, 2020 5:23 am

Re: "The connection to the server has been lost."

#8 Post by CFV »

Geoff the Medio wrote: Tue Dec 15, 2020 10:33 pm
CFV wrote: Tue Dec 15, 2020 12:31 amThe system is in Japanese, with Japanese windows
Are you able to run programs from the command line? All I can think to suggest is to have you run freeoriond.exe from the windows command prompt and see if it starts up, then in a separate command prompt window, run "freeorion --network.server.external.force 1" and quickstart a game and check if there is anything outpout to the freeoriond console... It might show some error that isn't getting logged for some reason before it crashes...
I got the following message in the freeoriond
Fatal Python error: Py_Initialize: can't initialize sys standard streams
LookupError: unknown encoding: cp932

Current thread 0x00003f60 (most recent call first):

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

Re: "The connection to the server has been lost."

#9 Post by Geoff the Medio »

CFV wrote: Thu Dec 17, 2020 12:03 pm
Fatal Python error: Py_Initialize: can't initialize sys standard streams
LookupError: unknown encoding: cp932

Current thread 0x00003f60 (most recent call first):
Googling the error gave this: https://stackoverflow.com/questions/510 ... ms-lookupe


Edit: Also: From: https://youtrack.jetbrains.com/issue/PY-17458
I could avoid this problem by adding
Code

-Dfile.encoding=UTF-8

to "bin\pycharm.exe.vmoptions".
Is that something we can pass or set somehow when launching the Python interpreter?

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

Re: "The connection to the server has been lost."

#10 Post by Geoff the Medio »

Geoff the Medio wrote: Thu Dec 17, 2020 1:42 pm
I could avoid this problem by adding
Code

-Dfile.encoding=UTF-8

to "bin\pycharm.exe.vmoptions".
Is that something we can pass or set somehow when launching the Python interpreter?
Probably can be done with Py_SetStandardStreamEncoding but I'm not sure what valid parameter values would be.

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

Re: "The connection to the server has been lost."

#11 Post by Geoff the Medio »

CFV, are you able to compile FreeOrion from source?

Possibly adding

Code: Select all

#if defined(MS_WINDOWS)
        // forces stream encoding to UTF8, which will hopefully fix issues on windows with non-english locale settings
        const std::string ENCODING{"UTF-8"};
        auto encoding_result = Py_SetStandardStreamEncoding(ENCODING.c_str(), ENCODING.c_str());
        DebugLogger() << "Python standard stream encoding set to: " << ENCODING << " with result: " << encoding_result;
#endif
before

Code: Select all

        Py_Initialize();
here: https://github.com/freeorion/freeorion/ ... rk.cpp#L56
could help...

Post Reply