[Freeciv-Dev] [bug #21019] Segmentation fault in tile_get_known at tile.c:480
URL: http://gna.org/bugs/?21019 Summary: Segmentation fault in tile_get_known at tile.c:480 Project: Freeciv Submitted by: andreasr Submitted on: Mon 12 Aug 2013 06:25:05 AM GMT Category: freeciv-web Severity: 3 - Normal Priority: 5 - Normal Status: None Assigned to: None Originator Email: Open/Closed: Open Release: Discussion Lock: Any Operating System: GNU/Linux Planned Release: ___ Details: I get a Segmentation fault in the Freeciv server sometimes, on the Freeciv-web servers running on http://play.freeciv.org/ The segmentation fault happens while the AI is moving one of their units, in a part of the code which isn't modified to be Freeciv-web specific in any way. I therefore think this is a bug which is general to all Freeciv servers of this revision. As can be seen from the backtrace, the pplayer parameter is null. I also have a core dump if you need more info. Any help fixing it? This is on Freeciv trunk revision 23091. Program terminated with signal 11, Segmentation fault. #0 dbv_isset (pdbv=pdbv@entry=0xaa4, bit=3217) at bitvector.c:120 bt full #0 dbv_isset (pdbv=pdbv@entry=0xaa4, bit=3217) at bitvector.c:120 No locals. #1 0x0819d537 in tile_get_known (ptile=ptile@entry=0x8e21e90, pplayer=pplayer@entry=0x0) at tile.c:480 No locals. #2 0x08193157 in can_player_see_unit_at (pplayer=pplayer@entry=0x0, punit=punit@entry=0x8f9fe48, ptile=ptile@entry=0x8e21e90) at player.c:857 pcity = optimized out #3 0x0806514b in remove_unit_gone_out_of_sight (punit=punit@entry=0x8f9fe48, old_tile=old_tile@entry=0x8e21e90, dest=optimized out) at unittools.c:2381 pplayer = 0x0 pconn_iter = 0x0 pconn = 0x8287b38 connections+1720 #4 0x0806871f in unit_move (punit=punit@entry=0x8f9fe48, pdesttile=pdesttile@entry=0x8e22d60, move_cost=3) at unittools.c:3475 pplayer = 0x8caa820 psrctile = 0x8e21e90 pcity = optimized out ptransporter = optimized out old_vision = optimized out new_vision = optimized out pcargo_units = 0x8f9ff00 saved_id = 131 unit_lives = true adj = optimized out facing = DIR8_SOUTHEAST bowner = optimized out radius_sq = {2, 2} #5 0x080dcc5e in unit_move_handling (punit=punit@entry=0x8f9fe48, pdesttile=pdesttile@entry=0x8e22d60, igzoc=igzoc@entry=false, move_diplomat_city=move_diplomat_city@entry=false) at unithand.c:1762 move_cost = optimized out pplayer = 0x8caa820 pcity = optimized out __FUNCTION__ = unit_move_handling #6 0x0811a954 in dai_unit_attack (ait=0x82f30c0 ai_types, punit=0x8f9fe48, ptile=0x8e22d60) at aitools.c:914 bodyguard = 0x0 sanity = 131 alive = optimized out #7 0x0811aa06 in dai_unit_move_or_attack (ait=0x82f30c0 ai_types, punit=punit@entry=0x8f9fe48, ptile=ptile@entry=0x8e22d60, path=path@entry=0x9f8a498, step=step@entry=1) at aitools.c:934 No locals. #8 0x080df810 in cai_unit_move_or_attack (punit=0x8f9fe48, ptile=0x8e22d60, path=0x9f8a498, step=1) at classicai.c:284 No locals. #9 0x08070d86 in adv_unit_execute_path (punit=punit@entry=0x8f9fe48, path=path@entry=0x9f8a498) at advgoto.c:102 _plr_ = optimized out ptile = 0x8e22d60 id = 131 is_ai = true i = optimized out __FUNCTION__ = adv_unit_execute_path #10 0x0807114c in adv_follow_path (punit=punit@entry=0x8f9fe48, path=path@entry=0x9f8a498, ptile=ptile@entry=0x8e22d60) at advgoto.c:59 old_tile = 0x0 activity = ACTIVITY_IDLE alive = optimized out #11 0x08074913 in auto_settler_setup_work (completion_time=1, best_target=0xbfb575c8, best_act=ACTIVITY_GEN_ROAD, best_tile=0x8e22d60, path=0x9f8a498, recursion=0, state=0x912de48, punit=0x8f9fe48, pplayer=0x8caa820) at autosettlers.c:845 alive = optimized out pfm = optimized out parameter = {start_tile = 0x81b6c37 timer_stop+39, moves_left_initially = 3, fuel_left_initially = 1, move_rate = 3, fuel = 1, owner = 0x8caa820, uclass = 0x8432b88 unit_classes+136, unit_flags = {vec = \b\004\000\004\020\000\000}, omniscience = true, get_MC = 0x81c1c80 normal_move_unit, unknown_MC = 6, get_TB = 0x0, get_EC = 0x0, can_invade_tile = 0x80722b0 autosettler_enter_territory, get_zoc = 0x81a0a10 is_my_zoc, is_pos_dangerous = 0x0, get_moves_left_req = 0x0, get_costs = 0x0, data = 0x0} displaced = 0x0 #12 auto_settler_setup_work (pplayer=pplayer@entry=0x8caa820, punit=punit@entry=0x8f9fe48, state=state@entry=0x912de48, recursion=0, recursion@entry=1, path=0x9f8a498, best_tile=0x8e22d60,
[Freeciv-Dev] [bug #21019] Segmentation fault in tile_get_known at tile.c:480
Follow-up Comment #1, bug #21019 (project freeciv): This would seem like bug #20837, except that it was fixed in r23091 already. Seems like there would be a connection that is neither global observer nor attached to player. ___ Reply to this item at: http://gna.org/bugs/?21019 ___ 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 #4085] Check that targeted irrigation/mine target is of appropriate type
URL: http://gna.org/patch/?4085 Summary: Check that targeted irrigation/mine target is of appropriate type Project: Freeciv Submitted by: cazfi Submitted on: Mon 12 Aug 2013 09:54:24 AM EEST Category: general Priority: 5 - Normal Status: Ready For Test Privacy: Public Assigned to: None Originator Email: Open/Closed: Open Discussion Lock: Any Planned Release: 2.6.0 ___ Details: Check that target given for ACTIVITY_IRRIGATION or ACTIVITY_MINE is legal one for the activity. ___ File Attachments: --- Date: Mon 12 Aug 2013 09:54:24 AM EEST Name: CheckTargeted.patch Size: 842B By: cazfi http://gna.org/patch/download.php?file_id=18669 ___ Reply to this item at: http://gna.org/patch/?4085 ___ 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 #21019] Segmentation fault in tile_get_known at tile.c:480
Follow-up Comment #2, bug #21019 (project freeciv): Yes, this crash is related to bug #20837. Just before the crash, I think a user just connected. This is from the server logs: 2: Connection request from KingdomofPortugal from localhost 2: c16 has client version 2.4.99-dev 2: KingdomofPortugal has connected from localhost. Segmentation fault (core dumped) So one problem could be a new connection that is neither global observer nor attached to player. When an observer initially connects to a game, the user gets a connection to the server, but it would take some seconds before the /observe command is then sent from the client and handled by the server correctly. In this time period, the user would have a connection, but not be a global observer yet. ___ Reply to this item at: http://gna.org/bugs/?21019 ___ 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 #21019] Segmentation fault in tile_get_known at tile.c:480
Follow-up Comment #3, bug #21019 (project freeciv): This patch resolves this crash for me: https://github.com/freeciv/freeciv-web/blob/9ae8944573c4efa280858116cf95e4f94094f7bd/freeciv/patches/observer_fix.patch Without this patch, the server will always crash when moving units when a user has connected but not issued /observe command yet. ___ Reply to this item at: http://gna.org/bugs/?21019 ___ 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 #21021] Irrigation/Mine target gets overridden when loading old savegame
URL: http://gna.org/bugs/?21021 Summary: Irrigation/Mine target gets overridden when loading old savegame Project: Freeciv Submitted by: cazfi Submitted on: Mon 12 Aug 2013 11:41:45 AM EEST Category: general Severity: 3 - Normal Priority: 5 - Normal Status: Ready For Test Assigned to: None Originator Email: Open/Closed: Open Release: Discussion Lock: Any Operating System: None Planned Release: 2.6.0 ___ Details: When loading old savegame in savegame2.c, Irrigation and Mine targets get correctly set, but later set_unit_activity() makes it NULL again. Fix attached ___ File Attachments: --- Date: Mon 12 Aug 2013 11:41:45 AM EEST Name: TargetedLoadFix.patch Size: 3kB By: cazfi http://gna.org/bugs/download.php?file_id=18670 ___ Reply to this item at: http://gna.org/bugs/?21021 ___ 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 2.4.0 first release candidate: source code released
Translation stats: fr: 100%: 7117 translated. pl: 100%: 7117 translated. en_GB: 100%: 7117 translated. ca: 100%: 7117 translated. es: 99.1%: 7056 translated, 37 fuzzy, 24 untranslated. gd: 95%: 6743 translated, 219 fuzzy, 155 untranslated. de: 91%: 6494 translated, 196 fuzzy, 427 untranslated. ja: 85%: 6025 translated, 683 fuzzy, 409 untranslated. fi: 84%: 5955 translated, 641 fuzzy, 521 untranslated. da: 80%: 5712 translated, 880 fuzzy, 525 untranslated. uk: 69%: 4929 translated, 1160 fuzzy, 1028 untranslated. nl: 68%: 4852 translated, 1338 fuzzy, 927 untranslated. it: 62%: translated, 1728 fuzzy, 945 untranslated. pt_BR: 59%: 4206 translated, 1968 fuzzy, 943 untranslated. ru: 58%: 4143 translated, 1932 fuzzy, 1042 untranslated. ga: 54%: 3875 translated, 31 fuzzy, 3211 untranslated. id: 52%: 3680 translated, 127 fuzzy, 3310 untranslated. sv: 51%: 3604 translated, 1979 fuzzy, 1534 untranslated. tr: 40%: 2878 translated, 2480 fuzzy, 1759 untranslated. et: 40%: 2849 translated, 2603 fuzzy, 1665 untranslated. zh_TW: 40%: 2838 translated, 12 fuzzy, 4267 untranslated. cs: 40%: 2820 translated, 2702 fuzzy, 1595 untranslated. eo: 39%: 2741 translated, 2033 fuzzy, 2343 untranslated. lt: 37%: 2654 translated, 2180 fuzzy, 2283 untranslated. ro: 35%: 2475 translated, 2746 fuzzy, 1896 untranslated. zh_CN: 34%: 2437 translated, 2864 fuzzy, 1816 untranslated. ar: 34%: 2387 translated, 3124 fuzzy, 1606 untranslated. no: 33%: 2381 translated, 3002 fuzzy, 1734 untranslated. nb: 33%: 2381 translated, 3002 fuzzy, 1734 untranslated. ko: 29%: 2062 translated, 1923 fuzzy, 3132 untranslated. sr: 29%: 2049 translated, 1522 fuzzy, 3546 untranslated. el: 28%: 2008 translated, 2356 fuzzy, 2753 untranslated. bg: 27%: 1935 translated, 284 fuzzy, 4898 untranslated. hu: 26%: 1851 translated, 3232 fuzzy, 2034 untranslated. pt: 24%: 1679 translated, 3252 fuzzy, 2186 untranslated. fa: 23%: 1644 translated, 2134 fuzzy, 3339 untranslated. he: 23%: 1640 translated, 1904 fuzzy, 3573 untranslated. ___ Freeciv-dev mailing list Freeciv-dev@gna.org https://mail.gna.org/listinfo/freeciv-dev
[Freeciv-Dev] [patch #4086] Targeted pollution/fallout cleaning
URL: http://gna.org/patch/?4086 Summary: Targeted pollution/fallout cleaning Project: Freeciv Submitted by: cazfi Submitted on: Mon 12 Aug 2013 12:25:42 PM EEST Category: general Priority: 5 - Normal Status: Ready For Test Privacy: Public Assigned to: None Originator Email: Open/Closed: Open Discussion Lock: Any Planned Release: 2.6.0 ___ Details: Set target extra for ACTIVITY_POLLUTION and ACTIVITY_FALLOUT. Clients send activities with target, and target is assigned when loading old savegames without one. Autosettlers still rely on untargeted version to work. This, like earlier Irrigation and Mining changes, is still a bit partial implementation. Some parts of the code are still hardcoded to assume certain target instead of using set target. ___ File Attachments: --- Date: Mon 12 Aug 2013 12:25:42 PM EEST Name: TargetedCleaning.patch Size: 18kB By: cazfi http://gna.org/patch/download.php?file_id=18671 ___ Reply to this item at: http://gna.org/patch/?4086 ___ 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 #20932] Mined city center getting irrigation bonus
Follow-up Comment #6, bug #20932 (project freeciv): Oh, you're right if old behavior is something people have started to expect. I myself had always expected the new bheavior and avoided mining the city center to not lose irrigation bonus... Feel free to revert this from S2_3 ___ Reply to this item at: http://gna.org/bugs/?20932 ___ 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 #21022] Problems in determining move_type for units native to roads
URL: http://gna.org/bugs/?21022 Summary: Problems in determining move_type for units native to roads Project: Freeciv Submitted by: cazfi Submitted on: Mon 12 Aug 2013 06:50:06 PM EEST Category: general Severity: 3 - Normal Priority: 5 - Normal Status: None Assigned to: None Originator Email: Open/Closed: Open Release: Discussion Lock: Any Operating System: None Planned Release: ___ Details: After gen-roads (that is: S2_5 being affected) code that sets unit move_type based on native terrains and roadshas several problems. It assumes that roads are always on land. It both determines that unit native to any road must be able to land travel via that road (not true if road itself is not native to any land terrain) and forbids sea moving units from being native to any road (roads native to sea terrains only should be ok). Another problem that affects even S2_4 is that nativity provided by bases is not considered at all like that provided by roads. ___ Reply to this item at: http://gna.org/bugs/?21022 ___ 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 #21022] Problems in determining move_type for units native to roads
Follow-up Comment #1, bug #21022 (project freeciv): Also, any native road is considered to make also tile native while on should check road's NativeTile -flag. ___ Reply to this item at: http://gna.org/bugs/?21022 ___ 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 #4087] Use activity_type_iterate() in concat_tile_activity_text()
URL: http://gna.org/patch/?4087 Summary: Use activity_type_iterate() in concat_tile_activity_text() Project: Freeciv Submitted by: cazfi Submitted on: Mon 12 Aug 2013 10:16:33 PM EEST Category: client Priority: 5 - Normal Status: Ready For Test Privacy: Public Assigned to: None Originator Email: Open/Closed: Open Discussion Lock: Any Planned Release: 2.5.0, 2.6.0 ___ Details: Split from patch #4080 (or rather; this one will probably be committed to S2_5 only, while patch #4080 takes care of TRUNK) Use activity_type_iterate() instead of for-loop going through all, also illegal, activities up to ACTIVITY_LAST in concat_tile_activity_text(). ___ File Attachments: --- Date: Mon 12 Aug 2013 10:16:33 PM EEST Name: ConcatActIterate.patch Size: 822B By: cazfi http://gna.org/patch/download.php?file_id=18673 ___ Reply to this item at: http://gna.org/patch/?4087 ___ 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 #4081] Allow untargeted activities in set_unit_activity_targeted()
Update of patch #4081 (project freeciv): Status: Ready For Test = Done Assigned to:None = cazfi Open/Closed:Open = Closed ___ Reply to this item at: http://gna.org/patch/?4081 ___ 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 #4082] 300 tilesperplayer in alien ruleset
Update of patch #4082 (project freeciv): Status: Ready For Test = Done Assigned to:None = cazfi Open/Closed:Open = Closed ___ Reply to this item at: http://gna.org/patch/?4082 ___ 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 #4038] Achievement requirement
Update of patch #4038 (project freeciv): Status: Ready For Test = Done Assigned to:None = cazfi Open/Closed:Open = Closed ___ Reply to this item at: http://gna.org/patch/?4038 ___ 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 #4051] Diplomatic relation requirement type
Follow-up Comment #1, patch #4051 (project freeciv): No longer just a request for comments. Applies on top of trunk SVN revision 23201. Among the changes are the addition of the relation real embassy (to/from) and renaming of the requirement type from DiplRelation to DiplRel. (file #18674) ___ Additional Item Attachment: File name: diplrel.patch Size:16 KB ___ Reply to this item at: http://gna.org/patch/?4051 ___ 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 #4078] read the action enablers from the rule set (and send them to the client)
Follow-up Comment #1, patch #4078 (project freeciv): Updated to apply on top of trunk svn revision 16510 and patch #4077. (file #18675) ___ Additional Item Attachment: File name: action_enablers_ruleset_2.patch Size:19 KB ___ Reply to this item at: http://gna.org/patch/?4078 ___ Message sent via/by Gna! http://gna.org/ ___ Freeciv-dev mailing list Freeciv-dev@gna.org https://mail.gna.org/listinfo/freeciv-dev