[CF-Devel] gdb tracings of hit player error message:

Peter Mardahl peterm at tesla.EECS.Berkeley.EDU
Fri Nov 24 14:41:07 CST 2000


victim (arch woodfloor2, name woodfloor2) already dead in hit_player()
(gdb) p *hitter
$17 = {contr = 0x0, next = 0x8106df0, prev = 0x830b440, 
  active_next = 0xbfbff57c, active_prev = 0x8e1d3c8, below = 0x894d5f0, 
  above = 0x0, inv = 0x0, container = 0x0, env = 0x0, more = 0x0, head = 0x0, 
  map = 0x8e86000, count = 965447, refcount = 0, sk_list = 0x0, 
  name = 0x816132a "rustmonster", title = 0x0, race = 0x819a58a "animal", 
  slaying = 0x0, msg = 0x0, x = 1, y = 7, ox = 1, oy = 7, speed = -0.5, 
  speed_left = -0.590000033, nrof = 0, face = 0x8157a10, direction = 4 '\004', 
  facing = 0 '\000', type = 0 '\000', immune = 0, protected = 0, 
  attacktype = 64, vulnerable = 4, path_attuned = 0, path_repelled = 0, 
  path_denied = 0, material = 0, magic = 0 '\000', thrownthaco = 0 '\000', 
  state = 1 '\001', value = 0, level = 4, last_heal = 0, last_sp = 0, 
  last_grace = 0, last_eat = 0, invisible = 0, armour = 0 '\000', 
  pick_up = 0 '\000', owner = 0x0, enemy = 0x0, arch = 0x81f0600, 
  other_arch = 0x0, weight = 30000, carrying = 0, flags = {18433, 2, 0, 0}, 
  ownercount = 0, randomitems = 0x0, run_away = 0, chosen_skill = 0x0, 
  exp_obj = 0x0, hide = 0, lights = 0x0, glow_radius = 0, move_status = 0, 
  move_type = 0, weight_limit = 0, can_apply = 0 '\000', 
  will_apply = 0 '\000', animation_id = 606, anim_speed = 0 '\000', 
  last_anim = 155 '\233', stats = {Str = 0 '\000', Dex = 0 '\000', 
    Con = 1 '\001', Wis = 15 '\017', Cha = 0 '\000', Int = 0 '\000', 
    Pow = 0 '\000', wc = -5 'û', ac = -10 'ö', hp = 100, maxhp = 100, sp = 0, 
    maxsp = 0, grace = 0, maxgrace = 0, exp = 300, food = 0, dam = 0, 
    luck = 0 '\000'}, spellitem = 0x0, expmul = 1}
(gdb) where
#0  hit_player (op=0x8960920, dam=1, hitter=0x89d1bb8, type=64) at attack.c:994
#1  0x8050022 in attack_ob_simple (op=0x8960920, hitter=0x89d1bb8, base_dam=0, 
    base_wc=-5) at attack.c:518
#2  0x80502db in attack_ob (op=0x8960920, hitter=0x89d1bb8) at attack.c:581
#3  0x8071929 in do_skill_attack (tmp=0x8960920, op=0x89d1bb8, string=0x0)
    at skill_util.c:1430
#4  0x80716ac in skill_attack (tmp=0x8960920, pl=0x89d1bb8, dir=0, string=0x0)
    at skill_util.c:1317
#5  0x8062c25 in move_monster (op=0x89d1bb8) at monster.c:428
#6  0x808028c in process_object (op=0x89d1bb8) at time.c:944
#7  0x80618f1 in process_events (map=0x0) at main.c:728
#8  0x8061d8d in main (argc=1, argv=0xbfbff728) at main.c:912
#9  0x8049b35 in _start ()

(gdb) p *op
$18 = {contr = 0x0, next = 0x8a9a618, prev = 0x8b35810, active_next = 0x0, 
  active_prev = 0x0, below = 0x0, above = 0x8b35810, inv = 0x0, 
  container = 0x0, env = 0x0, more = 0x0, head = 0x0, map = 0x8e86000, 
  count = 965503, refcount = 0, sk_list = 0x0, name = 0x81b606a "woodfloor2", 
  title = 0x0, race = 0x0, slaying = 0x0, msg = 0x0, x = 2, y = 8, ox = 2, 
  oy = 8, speed = 0, speed_left = -0.100000001, nrof = 0, face = 0x8159e10, 
  direction = 0 '\000', facing = 0 '\000', type = 0 '\000', immune = 0, 
  protected = 0, attacktype = 0, vulnerable = 0, path_attuned = 0, 
  path_repelled = 0, path_denied = 0, material = 0, magic = 0 '\000', 
  thrownthaco = 0 '\000', state = 0 '\000', value = 0, level = 0, 
  last_heal = 0, last_sp = 0, last_grace = 0, last_eat = 0, invisible = 0, 
  armour = 0 '\000', pick_up = 0 '\000', owner = 0x0, enemy = 0x0, 
  arch = 0x81b5e00, other_arch = 0x0, weight = 0, carrying = 0, flags = {256, 
    2147483648, 0, 0}, ownercount = 0, randomitems = 0x0, run_away = 0, 
  chosen_skill = 0x0, exp_obj = 0x0, hide = 0, lights = 0x0, glow_radius = 0, 
  move_status = 0, move_type = 0, weight_limit = 0, can_apply = 0 '\000', 
  will_apply = 0 '\000', animation_id = 0, anim_speed = 0 '\000', 
  last_anim = 0 '\000', stats = {Str = 0 '\000', Dex = 0 '\000', 
    Con = 0 '\000', Wis = 0 '\000', Cha = 0 '\000', Int = 0 '\000', 
    Pow = 0 '\000', wc = 0 '\000', ac = 0 '\000', hp = 0, maxhp = 0, sp = 0, 
    maxsp = 0, grace = 0, maxgrace = 0, exp = 0, food = 0, dam = 0, 
    luck = 0 '\000'}, spellitem = 0x0, expmul = 1}
(gdb) up
#5  0x8062c25 in move_monster (op=0x89d1bb8) at monster.c:428
428                 (void)skill_attack(enemy,part,0,NULL);
(gdb) list
423                 (void)attack_ob(enemy,part);
424     #endif
425                 part->stats.wc-=tmp;
426             } else
427     #ifdef ALLOW_SKILLS
428                 (void)skill_attack(enemy,part,0,NULL);
429     #else
430                 (void) attack_ob(enemy,part);
431     #endif
432         } /* if monster is in attack range */
(gdb) p *enemy
$19 = {contr = 0x0, next = 0x8a9a618, prev = 0x8b35810, active_next = 0x0, 
  active_prev = 0x0, below = 0x0, above = 0x8b35810, inv = 0x0, 
  container = 0x0, env = 0x0, more = 0x0, head = 0x0, map = 0x8e86000, 
  count = 965503, refcount = 0, sk_list = 0x0, name = 0x81b606a "woodfloor2", 
  title = 0x0, race = 0x0, slaying = 0x0, msg = 0x0, x = 2, y = 8, ox = 2, 
  oy = 8, speed = 0, speed_left = -0.100000001, nrof = 0, face = 0x8159e10, 
  direction = 0 '\000', facing = 0 '\000', type = 0 '\000', immune = 0, 
  protected = 0, attacktype = 0, vulnerable = 0, path_attuned = 0, 
  path_repelled = 0, path_denied = 0, material = 0, magic = 0 '\000', 
  thrownthaco = 0 '\000', state = 0 '\000', value = 0, level = 0, 
  last_heal = 0, last_sp = 0, last_grace = 0, last_eat = 0, invisible = 0, 
  armour = 0 '\000', pick_up = 0 '\000', owner = 0x0, enemy = 0x0, 
  arch = 0x81b5e00, other_arch = 0x0, weight = 0, carrying = 0, flags = {256, 
    2147483648, 0, 0}, ownercount = 0, randomitems = 0x0, run_away = 0, 
  chosen_skill = 0x0, exp_obj = 0x0, hide = 0, lights = 0x0, glow_radius = 0, 
  move_status = 0, move_type = 0, weight_limit = 0, can_apply = 0 '\000', 
  will_apply = 0 '\000', animation_id = 0, anim_speed = 0 '\000', 
  last_anim = 0 '\000', stats = {Str = 0 '\000', Dex = 0 '\000', 
    Con = 0 '\000', Wis = 0 '\000', Cha = 0 '\000', Int = 0 '\000', 
    Pow = 0 '\000', wc = 0 '\000', ac = 0 '\000', hp = 0, maxhp = 0, sp = 0, 
    maxsp = 0, grace = 0, maxgrace = 0, exp = 0, food = 0, dam = 0, 
    luck = 0 '\000'}, spellitem = 0x0, expmul = 1}


Apparently, the monster has decided that a woodfloor is his
enemy.

PeterM

    
    


More information about the crossfire mailing list