Jump to content
  • 0
Sign in to follow this  
Ragno

Map Crash related to Reflect Damage

Question

We are having a map crash related to Royal Guard skill Reflect Damage, and have some problems to individualice/reproduce the problem.

 

This is the report we have:

 

Core was generated by `./map-server'.
Program terminated with signal 11, Segmentation fault.
#0  battle_reflect_damage (target=0x324bb60, src=0x7f612ac13f4c,
    wd=0x7ffe6c7ae200, skill_id=26320) at battle.c:5851
5851                                            if( (--sc->data[SC_LG_REFLECTDAMAGE]->val3) <= 0 )
Missing separate debuginfos, use: debuginfo-install glibc-2.12-1.166.el6_7.3.x86_64 keyutils-libs-1.4-5.el6.x86_64 krb5-libs-1.10.3-42.el6.x86_64 libcom_err-1.41.12-22.el6.x86_64 libgcc-4.4.7-16.el6.x86_64 libselinux-2.0.94-5.8.el6.x86_64 mysql-libs-5.1.73-5.el6_6.x86_64 nss-softokn-freebl-3.14.3-23.el6_7.x86_64 openssl-1.0.1e-42.el6.x86_64 pcre-7.8-7.el6.x86_64 zlib-1.2.3-29.el6.x86_64
(gdb) BT FULL
#0  battle_reflect_damage (target=0x324bb60, src=0x7f612ac13f4c,
    wd=0x7ffe6c7ae200, skill_id=26320) at battle.c:5851
        change = false
        sce_d = <value optimized out>
        d_bl = <value optimized out>
        ssc = <value optimized out>
        damage = 0
        rdamage = <value optimized out>
        trdamage = <value optimized out>
        sd = 0x0
        tsd = 0x324bb60
        sc = <value optimized out>
        tick = 80965520
        delay = 300
        rdelay = <value optimized out>
        max_reflect_damage = 31277
#1  0x0000000000467842 in battle_calc_weapon_attack (src=0x7f612ac13f4c,
    target=0x324bb60, skill_id=<value optimized out>, skill_lv=0, wflag=0)
    at battle.c:5621
        damage = 1
        skillratio = <value optimized out>
        temp = <value optimized out>
        s_ele = 0
---Type <return> to continue, or q <return> to quit---
        s_ele_ = 0
        i = <value optimized out>
        nk = 0
        n_ele = true
        sd = 0x0
        tsd = 0x324bb60
        wd = {damage = 0, damage2 = 0, type = 0, div_ = 1, amotion = 768,
          dmotion = 748, blewcount = 0, flag = 529, dmg_lv = ATK_DEF}
        sc = <value optimized out>
        tsc = 0x324bfc0
        sstatus = 0x7f612ac142cc
        tstatus = 0x1
        flag = {hit = 1, cri = 0, idef = 0, idef2 = 0, pdef = 0, pdef2 = 0,
          infdef = 0, arrow = 0, rh = 1, lh = 0, weapon = 1, tdef = 0,
          distinct = 0}
        __func__ = "battle_calc_weapon_attack"
#2  0x0000000000466bd9 in battle_calc_attack (
    attack_type=<value optimized out>, bl=<value optimized out>,
    target=0x324bb60, skill_id=<value optimized out>,
    skill_lv=<value optimized out>, count=0) at battle.c:5654
        d = {damage = 0, damage2 = -4294967296, type = 14, div_ = 0,
          amotion = 0, dmotion = 0, blewcount = 2819, flag = 65535,
          dmg_lv = ATK_NONE}
---Type <return> to continue, or q <return> to quit---
        sd = 0x0
        __func__ = "battle_calc_attack"
#3  0x0000000000463fd5 in battle_weapon_attack (src=0x7f612ac13f4c,
    target=0x324bb60, tick=80965517, flag=0) at battle.c:6164
        sd = 0x0
        tsd = 0x324bb60
        sstatus = 0x7f612ac142cc
        tstatus = 0x324bf58
        sc = 0x7f612ac1433c
        tsc = 0x324bfc0
        damage = <value optimized out>
        skillv = <value optimized out>
        wd = <value optimized out>
        __func__ = "battle_weapon_attack"
#4  0x000000000062b80a in unit_attack_timer_sub (src=0x7f612ac13f4c,
    tid=<value optimized out>, tick=80965517) at unit.c:2194
        target = 0x324bb60
        ud = 0x7f612ac13f6c
        sstatus = 0x7f612ac142cc
        sd = <value optimized out>
        md = 0x7f612ac13f4c
        range = 0
#5  0x000000000062b9e4 in unit_attack_timer (tid=1775, tick=80965517,
---Type <return> to continue, or q <return> to quit---
    id=<value optimized out>, data=<value optimized out>) at unit.c:2225
        bl = 0x7f612ac13f4c
#6  0x000000000064091a in do_timer (tick=80965519) at timer.c:489
        tid = 1775
        diff = -2
        __func__ = "do_timer"
#7  0x0000000000644c2b in main (argc=<value optimized out>,
    argv=<value optimized out>) at core.c:464
        next = <value optimized out>
        retval = 0
(gdb)

Do you have any opinion about this?

Share this post


Link to post
Share on other sites

3 answers to this question

Recommended Posts

  • 0

Can you show your battle.c on line 5851? The whole function will be great :D
 

@edit

 

Core was generated by `./map-server'.
Program terminated with signal 11, Segmentation fault.
#0 battle_reflect_damage (target=0x324bb60, src=0x7f612ac13f4c,
wd=0x7ffe6c7ae200, skill_id=26320) at battle.c:5851

This is not the Reflect Damage Skill ID.
Did you changed something in battle.c?

Edited by bio

Share this post


Link to post
Share on other sites
  • 0

Thanks for the replies. The Crash occurrs in "battle.c:5850" function "battle_reflect_damage"

if( (--sc->data[sC_LG_REFLECTDAMAGE]->val3) <= 0 )

 

The function "battle_reflect_damage" is called from the line "battle.c:5620" (function "battle_calc_weapon_attack")

battle->reflect_damage(target, src, &wd, skill_id);

 

Also, in this battle.c in the line 4107 (function "Damage battle_calc_misc_attack")

md.damage = md.damage*(1000 + tstatus->mdef) / (1000 + tstatus->mdef * 10) - tstatus->mdef2;

 

If the value "tstatus->mdef" is -100 you got a crash by division by 0 in this part "(1000 + tstatus->mdef * 10)"

 

This is the battle.c that has the crash:

 

battle.c

 

I'm posting this on bugtracker.

 

Edit: Cannot start a new Issue in bugtracker.

Can you show your battle.c on line 5851? The whole function will be great :D

 

@edit

Core was generated by `./map-server'.

Program terminated with signal 11, Segmentation fault.

#0 battle_reflect_damage (target=0x324bb60, src=0x7f612ac13f4c,

wd=0x7ffe6c7ae200, skill_id=26320) at battle.c:5851

This is not the Reflect Damage Skill ID.

Did you changed something in battle.c?

 

 

No, we have not edited this part of the src. Edited by Ragno

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Answer this question...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
Sign in to follow this  

×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.