[Freeciv-Dev] [bug #16775] lot of errors of type 'get_defender bug'

2010-10-13 Thread pepeto

Update of bug #16775 (project freeciv):

  Status:  Ready For Test = Fixed  
 Open/Closed:Open = Closed 


___

Reply to this item at:

  http://gna.org/bugs/?16775

___
  Message posté via/par Gna!
  http://gna.org/


___
Freeciv-dev mailing list
Freeciv-dev@gna.org
https://mail.gna.org/listinfo/freeciv-dev


[Freeciv-Dev] [bug #16775] lot of errors of type 'get_defender bug'

2010-10-10 Thread pepeto

Follow-up Comment #9, bug #16775 (project freeciv):

Third patch attached:
* Removed the assertion at the end of get_defender(), as it is normal to
return NULL if no defender has been found.
* Removed COULD_OCCUPY macro, replaced by unit_can_take_over().
* Fixed a FIXME in server/unithand.c
* Moved the definition of 'enum unit_move_result'.

 I think this part is wrong. By letting victim stay as NULL, this
 allows the move to proceed. But this is the case where an
 explorer is trying to move into an enemy tile which should not
 be allowed. I think the move needs to be denied with a return
 call, as happens in a lot of places higher up in that function.

This is actually checked after, so it's not wrong.


(file #10699)
___

Additional Item Attachment:

File name: trunk_get_defender3.diff   Size:24 KB


___

Reply to this item at:

  http://gna.org/bugs/?16775

___
  Message posté via/par Gna!
  http://gna.org/


___
Freeciv-dev mailing list
Freeciv-dev@gna.org
https://mail.gna.org/listinfo/freeciv-dev


[Freeciv-Dev] [bug #16775] lot of errors of type 'get_defender bug'

2010-10-09 Thread pepeto

Follow-up Comment #7, bug #16775 (project freeciv):

New patch attached which would solve this problem.


(file #10680)
___

Additional Item Attachment:

File name: trunk_get_defender2.diff   Size:12 KB


___

Reply to this item at:

  http://gna.org/bugs/?16775

___
  Message posté via/par Gna!
  http://gna.org/


___
Freeciv-dev mailing list
Freeciv-dev@gna.org
https://mail.gna.org/listinfo/freeciv-dev


[Freeciv-Dev] [bug #16775] lot of errors of type 'get_defender bug'

2010-10-09 Thread pepeto

Update of bug #16775 (project freeciv):

  Status: In Progress = Ready For Test 


___

Reply to this item at:

  http://gna.org/bugs/?16775

___
  Message posté via/par Gna!
  http://gna.org/


___
Freeciv-dev mailing list
Freeciv-dev@gna.org
https://mail.gna.org/listinfo/freeciv-dev


[Freeciv-Dev] [bug #16775] lot of errors of type 'get_defender bug'

2010-10-09 Thread Jason Dorje Short

Follow-up Comment #8, bug #16775 (project freeciv):

--- server/unithand.c   (revision 18197)
+++ server/unithand.c   (working copy)
@@ -1409,7 +1409,9 @@
 }
 
 /* The attack is legal wrt the alliances */
-victim = get_defender(punit, pdesttile);
+if (is_attack_unit(punit)) {
+  victim = get_defender(punit, pdesttile);
+}

I think this part is wrong.  By letting victim stay as NULL, this allows the
move to proceed.  But this is the case where an explorer is trying to move
into an enemy tile which should not be allowed.  I think the move needs to be
denied with a return call, as happens in a lot of places higher up in that
function.

-jason

___

Reply to this item at:

  http://gna.org/bugs/?16775

___
  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 #16775] lot of errors of type 'get_defender bug'

2010-10-08 Thread pepeto

Update of bug #16775 (project freeciv):

  Status:  Ready For Test = In Progress
 Assigned to:None = pepeto 


___

Reply to this item at:

  http://gna.org/bugs/?16775

___
  Message posté via/par Gna!
  http://gna.org/


___
Freeciv-dev mailing list
Freeciv-dev@gna.org
https://mail.gna.org/listinfo/freeciv-dev


[Freeciv-Dev] [bug #16775] lot of errors of type 'get_defender bug'

2010-10-06 Thread Matthias Pfafferodt

Follow-up Comment #6, bug #16775 (project freeciv):

I got the following core dump after applying the patch; savegame attached. It
crashs in turn 306.


#0  0x7f5c8f5eb645 in raise () from /lib64/libc.so.6
No symbol table info available.
#1  0x0058513f in fc_assert_fail (file=0x5f7f18 combat.c,
function=0x5f801d get_defender,
line=662, assertion=value optimized out,
message=0x5f7f90 get_defender bug: %s %s vs %s %s (total %d units) on
\%s\ at (%d, %d).)
at log.c:476
level = LOG_FATAL
#2  0x004e8711 in get_defender (attacker=0x1f508e0, ptile=0x21da8f0)
at combat.c:651
bestdef = (struct unit *) 0x0
bestvalue = -99
best_cost = 0
rating_of_best = 0
__FUNCTION__ = get_defender
#3  0x004aeb59 in unit_move_handling (punit=0x1f508e0,
pdesttile=0x21da8f0, igzoc=false,
move_diplomat_city=false) at unithand.c:1412
victim = value optimized out
pplayer = (struct player *) 0x1fb6df0
pcity = (struct city *) 0x1fb0c30
__FUNCTION__ = unit_move_handling
#4  0x0043190a in ai_unit_attack (punit=0x1f508e0, ptile=0x21da8f0)
at aitools.c:928
bodyguard = (struct unit *) 0x0
sanity = 249
alive = value optimized out
__FUNCTION__ = ai_unit_attack
#5  0x0043d9ba in adv_unit_execute_path (punit=0x1f508e0,
path=0x1f49620) at advgoto.c:100
plr = value optimized out
ptile = (struct tile *) 0x21da8f0
id = 249
is_ai = true
i = 4
__FUNCTION__ = adv_unit_execute_path
#6  0x0043dd50 in adv_follow_path (punit=0x1f508e0, path=0x1f49620,
ptile=value optimized out)
at advgoto.c:57
old_tile = (struct tile *) 0x21da8f0
activity = ACTIVITY_IDLE
alive = true
#7  0x00428b90 in ai_amphibious_goto_constrained (ferry=0x1f508e0,
passenger=0x1f4b660,
ptile=0x21da8f0, parameter=0x7fffd8945ed0) at aiferry.c:577
alive = value optimized out
pplayer = value optimized out
pfm = (struct pf_map *) 0x1f6c980
path = value optimized out
__FUNCTION__ = ai_amphibious_goto_constrained
#8  0x00428f80 in aiferry_goto_amphibious (ferry=0x1f508e0,
passenger=0x1f4b660, ptile=0x21da8f0)
at aiferry.c:646
parameter = {land = {start_tile = 0x21e08d8, moves_left_initially =
3, fuel_left_initially = 1,
move_rate = 3, fuel = 1, owner = 0x1fb6df0, uclass = 0xa397e0, unit_flags
= {
  vec = \000\b\000\000\000\001\000}, omniscience = true, get_MC =
0x59d6a0 normal_move_unit,
unknown_MC = 6, get_TB = 0x59cbd0 no_intermediate_fights, get_EC =
0x4320f0 prefer_short_stacks,
can_invade_tile = 0x574940 player_can_invade_tile, get_zoc = 0x582180
is_my_zoc,
is_pos_dangerous = 0, get_moves_left_req = 0, get_costs = 0, data =
0x7fffd8946090}, sea = {
start_tile = 0x21e08d8, moves_left_initially = 15, fuel_left_initially =
1, move_rate = 15,
fuel = 1, owner = 0x1fb6df0, uclass = 0xa398a0, unit_flags = {vec =
\000\000\000\000\b\001\000},
omniscience = true, get_MC = 0x59d5c0 sea_overlap_move, unknown_MC =
6,
get_TB = 0x59cc30 no_fights, get_EC = 0x4320f0 prefer_short_stacks,
can_invade_tile = 0x574940 player_can_invade_tile, get_zoc = 0,
is_pos_dangerous = 0,
get_moves_left_req = 0, get_costs = 0, data = 0x7fffd8946070}, land_scale
= 15, sea_scale = 3,
  combined = {start_tile = 0x21e08d8, moves_left_initially = 45,
fuel_left_initially = 1,
move_rate = 45, fuel = 1, owner = 0x1fb6df0, uclass = 0xa398a0,
unit_flags = {
  vec = \000\000\000\000\000\000\000}, omniscience = true, get_MC =
0x59c220 amphibious_move,
unknown_MC = 6, get_TB = 0x59c170 amphibious_behaviour, get_EC =
0x59c0b0 amphibious_extra_cost,
can_invade_tile = 0x574940 player_can_invade_tile, get_zoc = 0,
is_pos_dangerous = 0x59c010 amphibious_is_pos_dangerous,
get_moves_left_req = 0, get_costs = 0,
data = 0x7fffd8945ed0}}
land_risk_cost = {base_value = 60, fearfulness = 1820.3,
enemy_zoc_cost = 1310720}
sea_risk_cost = {base_value = 50, fearfulness = 364.08889,
enemy_zoc_cost = 1310720}
#9  0x0042ae1a in aiferry_gobyboat (pplayer=0x1fb6df0,
punit=0x1f4b660, dest_tile=0x21da8f0)
at aiferry.c:771
bodyguard = (struct unit *) 0x0
ferryboat = (struct unit *) 0x1f508e0
__FUNCTION__ = aiferry_gobyboat
#10 0x0043319b in ai_gothere (pplayer=0x1fb6df0, punit=0x1f4b660,
dest_tile=0x21da8f0)
at aitools.c:285
__FUNCTION__ = ai_gothere
#11 0x004b7337 in ai_military_attack (pplayer=0x1fb6df0,
punit=0x1f4b660) at aiunit.c:1820
dest_tile = (struct tile *) 0x21da8f0
id = 7104
ct = 10
pcity = value optimized out
start_tile = (struct tile *) 0x21e08d8
__FUNCTION__ = ai_military_attack
#12 0x004b8bb7 in ai_manage_military (pplayer=0x1fb6df0,
punit=0x1f4b660) at aiunit.c:2145
id = 7104

[Freeciv-Dev] [bug #16775] lot of errors of type 'get_defender bug'

2010-10-02 Thread pepeto

Update of bug #16775 (project freeciv):

Category:None = ai 
  Status:None = Ready For Test 

___

Follow-up Comment #5:

Fix attached. It probably needs more tests.


(file #10561)
___

Additional Item Attachment:

File name: trunk_get_defender.diffSize:12 KB


___

Reply to this item at:

  http://gna.org/bugs/?16775

___
  Message posté via/par Gna!
  http://gna.org/


___
Freeciv-dev mailing list
Freeciv-dev@gna.org
https://mail.gna.org/listinfo/freeciv-dev


[Freeciv-Dev] [bug #16775] lot of errors of type 'get_defender bug'

2010-09-27 Thread Matthias Pfafferodt

URL:
  http://gna.org/bugs/?16775

 Summary: lot of errors of type 'get_defender bug'
 Project: Freeciv
Submitted by: syntron
Submitted on: Montag 27.09.2010 um 22:41
Category: None
Severity: 3 - Normal
Priority: 5 - Normal
  Status: None
 Assigned to: None
Originator Email: 
 Open/Closed: Open
 Release: trunk
 Discussion Lock: Any
Operating System: None
 Planned Release: 2.3.0

___

Details:


1: get_defender bug: Argentine Explorer vs Argentine Workers (total 1 units)
on Hills at (4,20).


could this be related to patch #1850 (svn revision 18086)?




___

Reply to this item at:

  http://gna.org/bugs/?16775

___
  Nachricht geschickt von/durch Gna!
  http://gna.org/


___
Freeciv-dev mailing list
Freeciv-dev@gna.org
https://mail.gna.org/listinfo/freeciv-dev


[Freeciv-Dev] [bug #16775] lot of errors of type 'get_defender bug'

2010-09-27 Thread pepeto

Follow-up Comment #1, bug #16775 (project freeciv):

Probably. Do you use a special ruleset? Do you have a savegame to reproduce?


___

Reply to this item at:

  http://gna.org/bugs/?16775

___
  Message posté via/par Gna!
  http://gna.org/


___
Freeciv-dev mailing list
Freeciv-dev@gna.org
https://mail.gna.org/listinfo/freeciv-dev


[Freeciv-Dev] [bug #16775] lot of errors of type 'get_defender bug'

2010-09-27 Thread Matthias Pfafferodt

Follow-up Comment #2, bug #16775 (project freeciv):

to reproduce use the attached script (some techs are needed to get some
combats ...)

(file #10480)
___

Additional Item Attachment:

File name: defender.serv  Size:0 KB


___

Reply to this item at:

  http://gna.org/bugs/?16775

___
  Nachricht geschickt von/durch Gna!
  http://gna.org/


___
Freeciv-dev mailing list
Freeciv-dev@gna.org
https://mail.gna.org/listinfo/freeciv-dev


[Freeciv-Dev] [bug #16775] lot of errors of type 'get_defender bug'

2010-09-27 Thread pepeto

Follow-up Comment #3, bug #16775 (project freeciv):

This is my mistake. I tested the human possibility of the patch, but not the
AI. Attaching a patch to transform the error message in assertion. It would
help to investigate.


(file #10481)
___

Additional Item Attachment:

File name: trunk_get_defender_assert.diff Size:1 KB


___

Reply to this item at:

  http://gna.org/bugs/?16775

___
  Message posté via/par Gna!
  http://gna.org/


___
Freeciv-dev mailing list
Freeciv-dev@gna.org
https://mail.gna.org/listinfo/freeciv-dev