gtk3.22 client loses connection to server it starts
Reply To jdlh
from master branch
...
This is the server for Freeciv version 2.6.4
I tested this by running freeciv compiled from master branch, from the repo directory. I have a current freeciv-gtk3.22 client and current freeciv-server there. However, I have a version 2.6.4 freeciv-server, installed by MacPorts, at /opt/local/bin/freeciv-server.
% ./client/freeciv-gtk3.22 --version Freeciv version 3.1.90.2-dev gui-gtk-3.22 % ./server/freeciv-server --version Freeciv version 3.1.90.2-dev % which freeciv-server /opt/local/bin/freeciv-server % /opt/local/bin/freeciv-server --version Freeciv version 2.6.4
How does the client specify which freeciv-server it runs? Does it just give the file name, with no path, and let the OS pick the first server on the path?
Normally client runs server by the installation path; i.e., depends on what you gave as --prefix for the configure.
By default client does *not* look for server under current directory (for security reasons; we don't want to run server found from an arbitrary location where an attacker may have put their own binary). That restriction is lifted for --enable-debug builds, i.e, if you want client to find server from build directory, you have to configure with --enable-debug.
When running from build directory, you usually want to use './fcgui' and './fcser' wrapper scripts instead of running binaries directly. Those scripts set up paths and environment suitable for running from the build directory.
Problem does not occur for me when I 1) configure the project with --enable-debug, and 2) run the gtk3.22 client from the build directory using ./fcgui. When run this way, the "Start New Game" button ends as expected.
The underlying problem is that the interaction between the client and server is a little complex. As a novice, reading just enough of the instructions to complete the next step, I didn't appreciate what I needed to do. The instructions at https://freeciv.fandom.com/wiki/Build-MacOSX tell part of the story, but not all.
Problem also does not occur for me when I 1) build the S2_6 branch, 2) do make install to a private location, 3) put that private location on my path, 4) run freeciv-gtk3.22 from a separate directory.
In other words, I think the original symptoms reported were a result of user error, not understanding how to get the client to invoke the server properly. I now think this report is invalid. It may be closed.
Running gtk3.22 client from master branch on macOS X 10.13.6 High Sierra, on the initial window, when I press the button "Start New Game", the client appears to start a server, but then loses connection to it.
How to reproduce:
1. Run gtk3.22 client, using command ./client/freeciv-gtk3.22 --log fc.log --debug 3. The initial window appears. 2. On the initial window, press the button "Start New Game" 3. Client displays message, "starting local server..." at the bottom of the initial window 4. Client starts a server process.
Expected behaviour:
1. Client connects to the server process successfully. 2. The "More Game Options" button appears in the top left of the initial window 3. No error messages about "list connection"
Actual behaviour:
1. Message "Lost connection to server (read error)!" appears at the bottom of the initial window. 2. No "More Game Options" button appears. 3. Log contains reference to "port 5557", and "lost connection" as shown below.
Contents of fc.log: