viewing paste Unknown #6677 | C

Posted on the
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177
Program received signal EXC_BAD_ACCESS, Could not access memory.
Reason: KERN_INVALID_ADDRESS at address: 0x0000007200000002
run_script_main (st=0x1050d94d4) at script.c:2822
2822            i=scriptbuf[(*pos)++]<<j;
(gdb) p st
$1 = (struct script_state *) 0x1050d94d4
(gdb) p *st
$2 = {
  stack = 0x105024d44, 
  start = 3, 
  end = 3, 
  pos = 0, 
  state = RUN, 
  rid = 0, 
  oid = 110013449, 
  script = 0x100b2e340, 
  scriptroot = 0x0, 
  sleep = {
    tick = 0, 
    timer = -1, 
    charid = 0
  }, 
  instance_id = -1, 
  bk_st = 0x0, 
  hIterator = 0 '\0', 
  bk_npcid = 0, 
  freeloop = 0, 
  op2ref = 0, 
  npc_item_flag = 1, 
  id = 113
}
(gdb) p *st->script
$3 = {
  script_size = 33659032, 
  script_buf = 0x7200000002 <Address 0x7200000002 out of bounds>, 
  script_vars = 0x101a0993c
}
(gdb) bt full
#0  run_script_main (st=0x1050d94d4) at script.c:2822
    nd = (struct npc_data *) 0x100b2e340
    stack = (struct script_stack *) 0x105024d44
    cmdcount = 655352
    gotocount = 2047
    sd = <value temporarily unavailable, due to optimizations>
#1  0x00000001000aa23b in npc_event_doall_sub (key=0x105024d44, data=0x1078a8644, ap=0x10779d94c) at npc.c:379
    c = (int *) 0x7fff5fbffa64
    name = 0x1001df921 "OnInit"
    rid = 0
#2  0x00000001001c05e4 in linkdb_foreach (head=0x105024d44, func=0x1000aa0f0 <npc_event_doall_sub>) at db.c:2741
No locals.
#3  0x00000001000ac6e9 in npc_event_doall (name=0x1001df921 "OnInit") at npc.c:410
No locals.
#4  0x00000001000ac714 in npc_event_do_oninit () at npc.c:478
No locals.
#5  0x0000000100016e3c in do_init (argc=1606417152, argv=0x100d82240) at map.c:5508
No locals.
#6  0x00000001001bbcc9 in main (argc=1, argv=0x7200000002) at core.c:340
No locals.
(gdb) p *nd
$4 = {
  bl = {
    next = 0x102019898, 
    prev = 0x7200000002, 
    id = 27302204, 
    m = 1, 
    x = 0, 
    y = -26180, 
    type = BL_PC
  }, 
  ud = 0x105c1441c, 
  vd = 0x0, 
  option = 5, 
  master_nd = 0x0, 
  class_ = 0, 
  speed = 0, 
  name = "\000\000\000\000T?Q\005\001\000\000\000?\001\000\000\000\000\000\0000 \037\b\001", 
  exname = "\000\000\000\000P\000\000\000M\000\0000 \020\a\001\000\000\000\000?\003\000??", 
  chat_id = 94097668, 
  touching_id = 1, 
  next_walktime = 26, 
  dir = 0 '\0', 
  size = 0, 
  status = {
    hp = 31166260, 
    sp = 1, 
    max_hp = 1, 
    max_sp = 1024, 
    str = 3, 
    agi = 0, 
    vit = 0, 
    int_ = 10, 
    dex = 2048, 
    luk = 0, 
    batk = 0, 
    matk_min = 0, 
    matk_max = 38528, 
    speed = 152, 
    amotion = 0, 
    adelay = 0, 
    dmotion = 12097, 
    mode = 30, 
    hit = 1, 
    flee = 0, 
    cri = 12110, 
    flee2 = 30, 
    def2 = 1, 
    mdef2 = 0, 
    aspd_rate2 = 12124, 
    aspd_rate = 30, 
    def = 1, 
    mdef = 0, 
    def_ele = 107 'k', 
    ele_lv = 47 '/', 
    size = 30 '\036', 
    race = 0 '\0', 
    rhw = {
      atk = 1, 
      atk2 = 0, 
      range = 12154, 
      ele = 30 '\036', 
      matk = 1, 
      wlv = 0 '\0'
    }, 
    lhw = {
      atk = 12170, 
      atk2 = 30, 
      range = 1, 
      ele = 0 '\0', 
      matk = 12187, 
      wlv = 30 '\036'
    }, 
    equip_atk = 1
  }, 
  level = 12205, 
  stat_point = 30, 
  chatdb = 0x1001e2fbe, 
  path = 0x1001e2fc7 "OnTouch", 
  subtype = 33654008, 
  src_id = 1, 
  u = {
    scr = {
      script = 0x102018ec8, 
      xs = 0, 
      ys = 0, 
      guild_id = 0, 
      timer = 0, 
      timerid = 0, 
      timeramount = 0, 
      rid = 0, 
      timertick = 838576, 
      timer_event = 0x1000cce30, 
      label_list_num = 998176, 
      label_list = 0x1000cd250
    }, 
    shop = {
      shop_item = 0x102018ec8, 
      count = 0
    }, 
    warp = {
      xs = -28984, 
      ys = 513, 
      x = 1, 
      y = 0, 
      mapindex = 0
    }, 
    tomb = {
      md = 0x102018ec8, 
      kill_time = 0, 
      killer_name = '\0' <repeats 16 times>, "??\f\000\001\000\000"
    }
  }
}
(gdb) p nd->name
$5 = "\000\000\000\000T?Q\005\001\000\000\000?\001\000\000\000\000\000\0000 \037\b\001"
(gdb) q
The program is running.  Exit anyway? (y or n) y
 
Viewed 1014 times, submitted by Guest.