任务单 #42134

gtk3.22 client loses connection to server it starts

开放日期: 2021-05-02 09:37 最后更新: 2021-11-25 00:16

报告人:
属主:
类型:
状态:
关闭
组件:
里程碑:
(无)
优先:
5 - Medium
严重性:
5 - Medium
处理结果:
Invalid
文件:

Details

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:

This is the server for Freeciv version 2.6.4
You can learn a lot about Freeciv at http://www.freeciv.org/
This freeciv-server program has player authentication support, but it's currently not in use.
3: in log_init() [log.c::231]: log started
3: in server_open_socket() [sernet.c::1119]: Server attempting to listen on localhost:5557
2: in load_rulesetdir() [ruleset.c::7010]: Loading rulesets.
2: Loading rulesets.
3: in valid_ruleset_filename() [ruleset.c::213]: Trying "classic/techs.ruleset".
3: in user_home_dir() [shared.c::737]: HOME is /Users/jdlh
3: in get_data_dirs() [shared.c::952]: Data path component: .
3: in get_data_dirs() [shared.c::952]: Data path component: data
3: in get_data_dirs() [shared.c::952]: Data path component: /Users/jdlh/.freeciv/2.6
3: in get_data_dirs() [shared.c::952]: Data path component: /opt/local/share/freeciv
3: in secfile_from_input_file() [registry_ini.c::299]: Reading registry from "data/classic/techs.ruleset"
3: in valid_ruleset_filename() [ruleset.c::213]: Trying "classic/buildings.ruleset".
3: in secfile_from_input_file() [registry_ini.c::299]: Reading registry from "data/classic/buildings.ruleset"
3: in valid_ruleset_filename() [ruleset.c::213]: Trying "classic/governments.ruleset".
3: in secfile_from_input_file() [registry_ini.c::299]: Reading registry from "data/classic/governments.ruleset"
3: in valid_ruleset_filename() [ruleset.c::213]: Trying "classic/units.ruleset".
3: in secfile_from_input_file() [registry_ini.c::299]: Reading registry from "data/classic/units.ruleset"
3: in valid_ruleset_filename() [ruleset.c::213]: Trying "classic/terrain.ruleset".
3: in secfile_from_input_file() [registry_ini.c::299]: Reading registry from "data/classic/terrain.ruleset"
3: in valid_ruleset_filename() [ruleset.c::213]: Trying "classic/styles.ruleset".
3: in secfile_from_input_file() [registry_ini.c::299]: Reading registry from "data/classic/styles.ruleset"
3: in valid_ruleset_filename() [ruleset.c::213]: Trying "classic/cities.ruleset".
3: in secfile_from_input_file() [registry_ini.c::299]: Reading registry from "data/classic/cities.ruleset"
3: in valid_ruleset_filename() [ruleset.c::213]: Trying "classic/nations.ruleset".
3: in secfile_from_input_file() [registry_ini.c::299]: Reading registry from "data/classic/nations.ruleset"
3: in valid_ruleset_filename() [ruleset.c::213]: Trying "classic/effects.ruleset".
3: in secfile_from_input_file() [registry_ini.c::299]: Reading registry from "data/classic/effects.ruleset"
3: in valid_ruleset_filename() [ruleset.c::213]: Trying "classic/game.ruleset".
3: in secfile_from_input_file() [registry_ini.c::299]: Reading registry from "data/classic/game.ruleset"
3: in load_tech_names() [ruleset.c::1112]: 87 advances (including possibly unused)
3: in load_building_names() [ruleset.c::2043]: 68 improvement types (including possibly unused)
1: in load_unit_names() [ruleset.c::1330]: "data/classic/units.ruleset": Duplicate unit flag name 'Cities'
1: "data/classic/units.ruleset": Duplicate unit flag name 'Cities'
1: in client_conn_close_callback() [clinet.c::136]: Lost connection to server: read error.

任务单历史 (3/7 Histories)

2021-05-02 09:37 Updated by: jdlh
  • New Ticket "gtk3.22 client loses connection to server it starts" created
2021-05-02 09:46 Updated by: cazfi
评论

Reply To jdlh

from master branch

...

This is the server for Freeciv version 2.6.4

What does the client say as its version? Is it master one, or S2_6 one?
You may have S2_6 server installed somewhere where your master client finds it, though there also seem to be even internal problems with that server installation.
2021-05-02 10:23 Updated by: jdlh
评论

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?

2021-05-02 11:39 Updated by: cazfi
评论

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.

2021-05-02 15:50 Updated by: jdlh
评论

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.

2021-05-03 09:39 Updated by: jdlh
评论

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.

2021-11-25 00:16 Updated by: cazfi
  • 状态 Update from 开启 to 关闭
  • 属主 Update from (无) to cazfi
  • 处理结果 Update from to Invalid

Attachment File List

No attachments

编辑

Please login to add comment to this ticket » 登录名