[Freeciv-Dev] [bug #19804] Citizen Governor inaccurate surplus limits
Follow-up Comment #2, bug #19804 (project freeciv): hmm.. read through all the comments, i don't know about any extra taxmen, but it does seem the 2 issues are related, smewhere, the cma is messing up the gold calculations. ___ Reply to this item at: http://gna.org/bugs/?19804 ___ Message sent via/by Gna! http://gna.org/ ___ Freeciv-dev mailing list Freeciv-dev@gna.org https://mail.gna.org/listinfo/freeciv-dev
[Freeciv-Dev] [bug #19800] Server crash after reading multiplayer.serv or civ.serv
Follow-up Comment #3, bug #19800 (project freeciv): Revision: 21191 ; This is valgrind backtrace : ==32115== Memcheck, a memory error detector ==32115== Copyright (C) 2002-2011, and GNU GPL'd, by Julian Seward et al. ==32115== Using Valgrind-3.7.0 and LibVEX; rerun with -h for copyright info ==32115== Command: server/freeciv-server ==32115== This is the server for Freeciv version 2.3.2+ You can learn a lot about Freeciv at http://www.freeciv.org/ 2: Loading rulesets. ==32115== Conditional jump or move depends on uninitialised value(s) ==32115==at 0x4057DD8: inflateReset2 (in /lib/i386-linux-gnu/libz.so.1.2.3.4) ==32115==by 0x4057EC7: inflateInit2_ (in /lib/i386-linux-gnu/libz.so.1.2.3.4) ==32115==by 0xFFFE: ??? ==32115== ==32115== Conditional jump or move depends on uninitialised value(s) ==32115==at 0x4057DD8: inflateReset2 (in /lib/i386-linux-gnu/libz.so.1.2.3.4) ==32115==by 0x4057EC7: inflateInit2_ (in /lib/i386-linux-gnu/libz.so.1.2.3.4) ==32115==by 0x4F462FDF: ??? ==32115== ==32115== Conditional jump or move depends on uninitialised value(s) ==32115==at 0x4057DD8: inflateReset2 (in /lib/i386-linux-gnu/libz.so.1.2.3.4) ==32115==by 0x4057EC7: inflateInit2_ (in /lib/i386-linux-gnu/libz.so.1.2.3.4) ==32115==by 0x4FDB0A0A: ??? ==32115== 2: ai_data_init(): 0x68d63f0 nb 0 noname 2: AI*1 has been added as Easy level AI-controlled player. 2: ai_data_init(): 0x68ea540 nb 1 noname 2: AI*2 has been added as Easy level AI-controlled player. 2: ai_data_init(): 0x68fe7d0 nb 2 noname 2: AI*3 has been added as Easy level AI-controlled player. 2: ai_data_init(): 0x6912ba0 nb 3 noname 2: AI*4 has been added as Easy level AI-controlled player. 2: ai_data_init(): 0x69270b0 nb 4 noname 2: AI*5 has been added as Easy level AI-controlled player. 2: Now accepting new client connections. For introductory help, type 'help'. 2: Connection request from pepeto from localhost 2: c1 has client version 2.3.2+ 2: pepeto has connected from localhost. ==32115== Conditional jump or move depends on uninitialised value(s) ==32115==at 0x4057DD8: inflateReset2 (in /lib/i386-linux-gnu/libz.so.1.2.3.4) ==32115==by 0x4057EC7: inflateInit2_ (in /lib/i386-linux-gnu/libz.so.1.2.3.4) ==32115==by 0x4FDB0EB1: ??? ==32115== pepeto: '/read multiplayer' 2: Loading script file 'data/multiplayer.serv'. pepeto: '# Server commands to make multiplayer Freeciv rules ' pepeto: '# ' pepeto: ' ' pepeto: 'rulesetdir multiplayer ' 2: Ruleset directory set to multiplayer 2: Loading rulesets. ==32115== Invalid read of size 4 ==32115==at 0x8125F88: government_number (government.c:93) ==32115==by 0x80B779F: package_player_info (plrhand.c:872) ==32115==by 0x80B7EE7: send_player_info_c_real (plrhand.c:717) ==32115==by 0x80B8010: send_player_info_c (plrhand.c:690) ==32115==by 0x80C7A7B: load_rulesets (ruleset.c:3968) ==32115==by 0x80571FE: set_rulesetdir (stdinhand.c:3694) ==32115==by 0x805CF1F: handle_stdin_input_real.part.15 (stdinhand.c:4124) ==32115==by 0x805F04F: read_init_script_real (stdinhand.c:1196) ==32115==by 0x805C578: handle_stdin_input_real.part.15 (stdinhand.c:1113) ==32115==by 0x8101147: handle_chat_msg_req (handchat.c:343) ==32115==by 0x80B1E9E: server_handle_packet (hand_gen.c:40) ==32115==by 0x804FEC1: server_packet_input (srv_main.c:1498) ==32115== Address 0x43391a0 is 0 bytes inside a block of size 1,344 free'd ==32115==at 0x402B06C: free (in /usr/lib/valgrind/vgpreload_memcheck-x86-linux.so) ==32115==by 0x8126B7C: governments_free (government.c:536) ==32115==by 0x8125731: game_ruleset_free (game.c:493) ==32115==by 0x80C7A54: load_rulesets (ruleset.c:3983) ==32115==by 0x80571FE: set_rulesetdir (stdinhand.c:3694) ==32115==by 0x805CF1F: handle_stdin_input_real.part.15 (stdinhand.c:4124) ==32115==by 0x805F04F: read_init_script_real (stdinhand.c:1196) ==32115==by 0x805C578: handle_stdin_input_real.part.15 (stdinhand.c:1113) ==32115==by 0x8101147: handle_chat_msg_req (handchat.c:343) ==32115==by 0x80B1E9E: server_handle_packet (hand_gen.c:40) ==32115==by 0x804FEC1: server_packet_input (srv_main.c:1498) ==32115==by 0x80DF00D: server_sniff_all_input (sernet.c:448) ==32115== 2: Ruleset: 'generator' has been set to Island-based (ISLAND). 2: Ruleset: 'topology' has been set to Wrap East-West and Wrap North-South (WRAPX|WRAPY). 2: Ruleset: 'startpos' has been set to One player per continent (SINGLE). 2: Ruleset: 'alltemperate' has been set to enabled. 2: Ruleset: 'separatepoles' has been set to disabled. 2: Ruleset: 'huts' has been set to 0. 2: Ruleset: 'aifill' has been set to 0. 2: Ruleset: 'diplomacy' has been set to Disabled for everyone (DISABLED). 2: Ruleset: 'contactturns' has been set to 0. 2: Ruleset: 'revolen' has been set to 2. 2: Ruleset: 'barbarians' has been set to No barbarians (DISABLED). 2: Ruleset: 'techpenalty' has been set to 0. 2: Ruleset: 'startunits' has been set to cccwww.
[Freeciv-Dev] [bug #19814] Free'd ruleset structures accessed when changing ruleset
URL: http://gna.org/bugs/?19814 Summary: Free'd ruleset structures accessed when changing ruleset Project: Freeciv Submitted by: jtn Submitted on: Fri Jun 15 20:39:30 2012 Category: None Severity: 3 - Normal Priority: 5 - Normal Status: None Assigned to: None Originator Email: Open/Closed: Open Release: S2_3 r21191 Discussion Lock: Any Operating System: Any Planned Release: ___ Details: Spotted by pepeto's valgrind in bug #19800: load_rulesets() calls game_ruleset_free(), which frees ruleset structures, and shortly afterwards calls reset_player_nations(), which eventually calls package_player_info(), which as part of its work calls government_number(), which follows pointers from the player structure to the previously freed government structures. (package_player_info() also calls all sorts of other game functions which I fear might try to access freed ruleset structures, although I didn't spot any.) The obvious fix is to swap the order of the two calls made by load_rulesets(). However, I'm not sure how worried to be about those dangling government pointers left in player structures over the ruleset reload -- does something clear them down? Here's the relevant bit of the Valgrind log from bug #19800: pepeto: 'rulesetdir multiplayer ' 2: Ruleset directory set to multiplayer 2: Loading rulesets. ==32115== Invalid read of size 4 ==32115==at 0x8125F88: government_number (government.c:93) ==32115==by 0x80B779F: package_player_info (plrhand.c:872) ==32115==by 0x80B7EE7: send_player_info_c_real (plrhand.c:717) ==32115==by 0x80B8010: send_player_info_c (plrhand.c:690) ==32115==by 0x80C7A7B: load_rulesets (ruleset.c:3968) ==32115==by 0x80571FE: set_rulesetdir (stdinhand.c:3694) ==32115==by 0x805CF1F: handle_stdin_input_real.part.15 (stdinhand.c:4124) ==32115==by 0x805F04F: read_init_script_real (stdinhand.c:1196) ==32115==by 0x805C578: handle_stdin_input_real.part.15 (stdinhand.c:1113) ==32115==by 0x8101147: handle_chat_msg_req (handchat.c:343) ==32115==by 0x80B1E9E: server_handle_packet (hand_gen.c:40) ==32115==by 0x804FEC1: server_packet_input (srv_main.c:1498) ==32115== Address 0x43391a0 is 0 bytes inside a block of size 1,344 free'd ==32115==at 0x402B06C: free (in /usr/lib/valgrind/vgpreload_memcheck-x86-linux.so) ==32115==by 0x8126B7C: governments_free (government.c:536) ==32115==by 0x8125731: game_ruleset_free (game.c:493) ==32115==by 0x80C7A54: load_rulesets (ruleset.c:3983) ==32115==by 0x80571FE: set_rulesetdir (stdinhand.c:3694) ==32115==by 0x805CF1F: handle_stdin_input_real.part.15 (stdinhand.c:4124) ==32115==by 0x805F04F: read_init_script_real (stdinhand.c:1196) ==32115==by 0x805C578: handle_stdin_input_real.part.15 (stdinhand.c:1113) ==32115==by 0x8101147: handle_chat_msg_req (handchat.c:343) ==32115==by 0x80B1E9E: server_handle_packet (hand_gen.c:40) ==32115==by 0x804FEC1: server_packet_input (srv_main.c:1498) ==32115==by 0x80DF00D: server_sniff_all_input (sernet.c:448) ==32115== 2: Ruleset: 'generator' has been set to Island-based (ISLAND). ___ Reply to this item at: http://gna.org/bugs/?19814 ___ Message sent via/by Gna! http://gna.org/ ___ Freeciv-dev mailing list Freeciv-dev@gna.org https://mail.gna.org/listinfo/freeciv-dev
[Freeciv-Dev] [bug #19800] Server crash after reading multiplayer.serv or civ2.serv
Update of bug #19800 (project freeciv): Summary: Server crash after reading multiplayer.serv or civ.serv = Server crash after reading multiplayer.serv or civ2.serv ___ Follow-up Comment #4: The calls to ai_data_init() and ai_data_close() look balanced. However, the second significant valgrind error (Invalid write of size 4) is relevant, I think. When ai_data_init() is called for a player, it allocates ai-government_want according to the government_count() in force at the time. It looks like ai_data_init() is only called when a player is first created. I'm guessing the problem is that if a player exists over a ruleset reload, that player's government_want remains sized for the old ruleset. It looks like ai_data_default() is called to reinitialise the player on ruleset reload, but that doesn't reallocate ai-government_want. However it does memset it, based on the *new* government_count(). Since the civ2 and multiplayer rulesets have an extra government compared to the classic ruleset (Fundamentalism), that memset will overrun. Is the fix simply to reallocate government_want in ai_data_default() rather than ai_data_init()? I'll leave this for someone else... (The other valgrind error looks unrelated -- although player data applicable to long-gone rulesets is also implicated -- so I've raised it as bug #19814.) ___ Reply to this item at: http://gna.org/bugs/?19800 ___ Message sent via/by Gna! http://gna.org/ ___ Freeciv-dev mailing list Freeciv-dev@gna.org https://mail.gna.org/listinfo/freeciv-dev
[Freeciv-Dev] [bug #19778] National border dashed line of colour green gets confused with grassland tile in trident tileset
Follow-up Comment #1, bug #19778 (project freeciv): White is fairly high up the list and gets confused with glaciers, too. I had a go at fixing this once before -- patch #1386 -- but I think it got supplanted by another colour scheme. I might have another go. See also patch #2069, which restricts the overview map to greeny/bluey colours (implying that players get more non-greeny/bluey colours). ___ Reply to this item at: http://gna.org/bugs/?19778 ___ Message sent via/by Gna! http://gna.org/ ___ Freeciv-dev mailing list Freeciv-dev@gna.org https://mail.gna.org/listinfo/freeciv-dev
[Freeciv-Dev] [patch #3301] xz compressed tarballs
Follow-up Comment #10, patch #3301 (project freeciv): there's always .zip as a fallback. We have .zip? Do we have some extra hops in release process to produce one, since I don't see it in automake options? Yup. See manual steps at http://freeciv.wikia.com/wiki/Release#Upload_source_archives. ___ Reply to this item at: http://gna.org/patch/?3301 ___ Message sent via/by Gna! http://gna.org/ ___ Freeciv-dev mailing list Freeciv-dev@gna.org https://mail.gna.org/listinfo/freeciv-dev
[Freeciv-Dev] [bug #19801] Loading of Fortresses Airbases from pre-2.2 savegames broken
Update of bug #19801 (project freeciv): Status: Ready For Test = Fixed Assigned to:None = cazfi Open/Closed:Open = Closed ___ Reply to this item at: http://gna.org/bugs/?19801 ___ Message sent via/by Gna! http://gna.org/ ___ Freeciv-dev mailing list Freeciv-dev@gna.org https://mail.gna.org/listinfo/freeciv-dev
[Freeciv-Dev] [patch #3286] Running the GTK version under W2000
Follow-up Comment #3, patch #3286 (project freeciv): Some Googling suggests Glib versions 2.20.5 x 2.22.5 are affected by this Win2K issue. I haven't checked what Glib versions our recent Windows installers have shipped with (I think Glib version numbers != Gtk ones). ___ Reply to this item at: http://gna.org/patch/?3286 ___ Message sent via/by Gna! http://gna.org/ ___ Freeciv-dev mailing list Freeciv-dev@gna.org https://mail.gna.org/listinfo/freeciv-dev
[Freeciv-Dev] [bug #19802] Start position goodness calculation tries to use road compatibility specials
Update of bug #19802 (project freeciv): Status: Ready For Test = In Progress ___ Follow-up Comment #1: Passing NULL unit type to road requirement check means that very typical requirement of unit type flag Settlers results in unfulfilled requirements. This in turn means that startposition evaluation does not consider benefits of any roads for any tiles. ___ Reply to this item at: http://gna.org/bugs/?19802 ___ Message sent via/by Gna! http://gna.org/ ___ Freeciv-dev mailing list Freeciv-dev@gna.org https://mail.gna.org/listinfo/freeciv-dev
[Freeciv-Dev] [patch #3286] Running the GTK version under W2000
Follow-up Comment #4, patch #3286 (project freeciv): (I think Glib version numbers != Gtk ones). True. Only relation between them is that given gtk+ version depends on some minimum glib version. Latest glib version is 2.32 and latest gtk3 is 3.4. ___ Reply to this item at: http://gna.org/patch/?3286 ___ Message sent via/by Gna! http://gna.org/ ___ Freeciv-dev mailing list Freeciv-dev@gna.org https://mail.gna.org/listinfo/freeciv-dev
[Freeciv-Dev] [patch #3320] Add ai type argument to Lua create_player()
URL: http://gna.org/patch/?3320 Summary: Add ai type argument to Lua create_player() Project: Freeciv Submitted by: jtn Submitted on: Fri Jun 15 23:32:30 2012 Category: None Priority: 3 - Low Status: None Privacy: Public Assigned to: None Originator Email: Open/Closed: Open Discussion Lock: Any Planned Release: 2.5.0 ___ Details: Currently, the only way to create a player with a non-default AI type in S2_4 is with the /create server command. This is probably sufficient for the design goal of making it possible to run games with different AIs competing. However, it should be pretty easy to extend the Lua script function create_player() to accept an AI type argument too. It could have a default value and thus not break (hypothetical) scripts created since the 2.4 file format freeze. Would be nice for 2.4.0, but not a blocker. ___ Reply to this item at: http://gna.org/patch/?3320 ___ Message sent via/by Gna! http://gna.org/ ___ Freeciv-dev mailing list Freeciv-dev@gna.org https://mail.gna.org/listinfo/freeciv-dev
[Freeciv-Dev] [patch #3321] Server option to change default AI type
URL: http://gna.org/patch/?3321 Summary: Server option to change default AI type Project: Freeciv Submitted by: jtn Submitted on: Fri Jun 15 23:39:04 2012 Category: None Priority: 5 - Normal Status: None Privacy: Public Assigned to: None Originator Email: Open/Closed: Open Discussion Lock: Any Planned Release: 2.4.0,2.5.0 ___ Details: Currently, most ways of creating new players on S2_4 are hardcoded to use the classic AI type: * barbarians * civil war * aifill * aitoggle'd human players (I think?) The only way to create a non-classic AI is an explicit /create. People testing new AI types might reasonably want to switch all AIs over to their new one at some point in testing. Obviously they can hack the source, but it feels like there should be a server command which changes what default_ai_type_name() returns. (Perhaps in future one might want fine-grained control e.g. a specific AI type for barbarians, but that can wait IMO.) ___ Reply to this item at: http://gna.org/patch/?3321 ___ Message sent via/by Gna! http://gna.org/ ___ Freeciv-dev mailing list Freeciv-dev@gna.org https://mail.gna.org/listinfo/freeciv-dev
[Freeciv-Dev] [patch #3320] Add ai type argument to Lua create_player()
Follow-up Comment #1, patch #3320 (project freeciv): Would be nice for 2.4.0, but not a blocker. Definitely not a blocker considering how unlikely it is that anyone implements alternative (to default one) ai type for 2.4. I'm not aware of any such project, and if one starts now, will it be finished before 2.4 gets obsolete? That is not to say that *stable* S2_4 ai module interface would not be good platform to start developing new ai type which then can be ported to newer version. ___ Reply to this item at: http://gna.org/patch/?3320 ___ Message sent via/by Gna! http://gna.org/ ___ Freeciv-dev mailing list Freeciv-dev@gna.org https://mail.gna.org/listinfo/freeciv-dev
[Freeciv-Dev] [patch #3321] Server option to change default AI type
Follow-up Comment #1, patch #3321 (project freeciv): Obviously they can hack the source, but it feels like there should be a server command which changes what default_ai_type_name() returns. Maybe, maybe not. So far the (partly implemented) plan has been to make default AI configure option. At least when new ai type is part of freeciv tree, you are reconfiguring to build it anyway. ___ Reply to this item at: http://gna.org/patch/?3321 ___ Message sent via/by Gna! http://gna.org/ ___ Freeciv-dev mailing list Freeciv-dev@gna.org https://mail.gna.org/listinfo/freeciv-dev
[Freeciv-Dev] [patch #3321] Server option to change default AI type
Follow-up Comment #3, patch #3321 (project freeciv): I'm not sure it's possible to change type after player creation It's not possible as there's ai type specific structures about players, cities, and units. It's assumed (and that's hard to reliably change) that values for *current* ai type are correct. That's not true if data about another ai type, and not current one, has been maintained. Arbitrary example: AI type wants to track how reliable other players are so it stores information to its private player structure about any pacts broken by other players. This works when player is under its control (note that this does not mean that player must be under ai control, just that player has this ai type assigned) from beginning to the end, but player cannot switch to this ai type mid-game as it would have no history information. ___ Reply to this item at: http://gna.org/patch/?3321 ___ Message sent via/by Gna! http://gna.org/ ___ Freeciv-dev mailing list Freeciv-dev@gna.org https://mail.gna.org/listinfo/freeciv-dev
Re: [Freeciv-Dev] [Freeciv-i18n] S2_4 nation updates
Adding freeciv-dev list too as more than just translations are affected. On 16 June 2012 02:51, Michael Bauer f...@akerbeltz.org wrote: 4) Cut down the number of existing nations (number to be established), One thing to consider here is whether we ever want to support truly massive games. Further increases to max number of players have been requested and there's some unfinished patches to make it 512. Each player would need separate (and presumably even non-conflicting) nation. I personally am skeptic about increasing max number to that high. To host so many players also map should be relatively big, and to store big Fog of War map for each of the 512 players, all the 512*512 = 262144 player relations, and delta network protocol buffers (presumably we would want to support at least one simultaneous connection / player) would require insane amount of server resources. Increase of max number would probably somewhat affect also games where number is set to lower value (at least ai sometimes allocates memory based on max number of slots and not current player count because allocated structures would live over possible player additions). It's already hard enough to make good freeciv ports to embedded devices. - ML ___ Freeciv-dev mailing list Freeciv-dev@gna.org https://mail.gna.org/listinfo/freeciv-dev