Issue information

Issue ID
#7925
Status
Needs more Info
Severity
None
Started
kusakos
Dec 27, 2013 9:16
Last Post
kusakos
Jan 15, 2014 23:40
Confirmation
N/A

kusakos - Dec 27, 2013 9:16

My map server crashed. Here's a gdb report. Please help :(

(gdb) bt full
#0 0x081a7b34 in skill_check_shadowform (bl=0xe896c88, damage=41, hit=1)
at skill.c:15102
sc = 0xe896fb8
src = 0xf3e65a8
#1 0x081c32b9 in skill_attack (attack_type=1, src=0xb251c74c,
dsrc=0xb251c74c, bl=0xe896c88, skill_id=170, skill_lv=1, tick=541547045,
flag=0) at skill.c:2578
dmg = {damage = 41, damage2 = 0, type = 10, div_ = 1, amotion = 720,
dmotion = 732, blewcount = 0, flag = 273, dmg_lv = ATK_DEF}
sstatus = <value optimized out>
tstatus = 0xe896f58
sc = 0xe896fb8
sd = 0x0
tsd = 0xe896c88
type = <value optimized out>
damage = 41
rmdamage = 0 '\000'
additional_effects = true
shadow_flag = <value optimized out>
#2 0x081ea1b1 in skill_castend_damage_id (src=0xb251c74c, bl=0xe896c88,
skill_id=170, skill_lv=1, tick=541547045, flag=0) at skill.c:3511
sd = 0x0
tstatus = 0xe896f58
---Type <return> to continue, or q <return> to quit---

jTynne - Dec 27, 2013 17:34

Shadow form

if( (bl->type == BL_PC && battle_config.pc_cloak_check_type&1)

having something to do with:

NPC_CRITICALSLASH causing crashing, something to do with:

ud->attackabletime = tick + type;

and

case KO_JYUMONJIKIRI:

from [url="https://raw.github.com/HerculesWS/Hercules/master/src/map/skill.c"]https://raw.github.com/HerculesWS/Hercules/master/src/map/skill.c[/url]

That's about as useful as I get with these. Are you running latest Herc?

Ind - Dec 27, 2013 23:14

whats on your src/map/skill.c line 15102?

kusakos - Jan 15, 2014 9:04

Thank you for your replies. And i'm sorry for the late response, i was out during the holidays. Anyway, above crash report was fixed after updating to the latest revision. It crashes when casting poison spore explosion by genetics.

But i'm still getting map server crashes, here's the crash gdb report.

[code=nocode:0] (gdb) bt full #0 0x081b093f in skill_check_shadowform (bl=0xab17cd8, damage=3364, hit=1) at skill.c:15175 sc = 0xab18008 src = 0xa441f38 #1 0x081cc0f9 in skill_attack (attack_type=4, src=0xb870118, dsrc=0xb870118, bl=0xab17cd8, skill_id=2008, skill_lv=10, tick=1949430007, flag=131073) at skill.c:2580 dmg = {damage = 3364, damage2 = 0, type = 0, div_ = 1, amotion = 0, dmotion = 736, blewcount = 0, flag = 325, dmg_lv = ATK_DEF} sstatus = <value optimized out> tstatus = 0xab17fa8 sc = 0xab18008 sd = 0xb870118 tsd = 0xab17cd8 type = <value optimized out> damage = 3364 rmdamage = false additional_effects = true shadow_flag = <value optimized out> #2 0x081f85e8 in skill_castend_damage_id (src=0xb870118, bl=0xab17cd8, skill_id=2008, skill_lv=10, tick=1949430007, flag=131073) at skill.c:4005 tsc = <value optimized out> sd = 0xb870118 ---Type <return> to continue, or q <return> to quit--- [/code]

And here's the code on skill.c line 15175
[code=auto:15175] if( (--sc->data[SC__SHADOWFORM]->val3) <= 0 ) { status_change_end(bl, SC__SHADOWFORM, INVALID_TIMER); if( src->type == BL_PC ) ((TBL_PC*)src)->shadowform_id = 0; } return true; [/code]

Megasantos - Jan 15, 2014 14:26

Is wrong this code it does not check if the user is on the effect.

[color=rgb(0,0,0)][font=Arial][size=3]Change[/size][/font][/color][color=rgb(0,0,0)][font=Arial][size=3]:[/size][/font][/color][code=:0] if( (--sc->data[SC__SHADOWFORM]->val3) <= 0 ) { status_change_end(bl, SC__SHADOWFORM, INVALID_TIMER); if( src->type == BL_PC ) ((TBL_PC*)src)->shadowform_id = 0; } [/code]
for:
[code=:0] if(sc->data[SC__SHADOWFORM]) { if((--sc->data[SC__SHADOWFORM]->val3) <= 0) status_change_end(bl, SC__SHADOWFORM, INVALID_TIMER); if(src->type == BL_PC) ((TBL_PC*)src)->shadowform_id = 0; } [/code]

malufett - Jan 15, 2014 17:13

[quote name="Megasantos" timestamp="1389795977"]
Is wrong this code it does not check if the user is on the effect.

[color=rgb(0,0,0)][font=Arial][size=3]Change[/size][/font][/color][color=rgb(0,0,0)][font=Arial][size=3]:[/size][/font][/color][code=auto:0] if( (--sc->data[SC__SHADOWFORM]->val3) <= 0 ) { status_change_end(bl, SC__SHADOWFORM, INVALID_TIMER); if( src->type == BL_PC ) ((TBL_PC*)src)->shadowform_id = 0; } [/code]for:
[code=auto:0] if(sc->data[SC__SHADOWFORM]) { if((--sc->data[SC__SHADOWFORM]->val3) <= 0) status_change_end(bl, SC__SHADOWFORM, INVALID_TIMER); if(src->type == BL_PC) ((TBL_PC*)src)->shadowform_id = 0; } [/code][/quote]

there is a check at the very first...[code=auto:0] if( sc && sc->data[SC__SHADOWFORM] && damage ) { [/code]


:meow:

Ind - Jan 15, 2014 18:24

I think the reason is:[code=auto:0] status->damage(bl, src, damage, 0, clif->damage(src, src, 500, 500, damage, hit, (hit > 1 ? 8 : 0), 0), 0); if( (--sc->data[SC__SHADOWFORM]->val3) <= 0 ) { status_change_end(bl, SC__SHADOWFORM, INVALID_TIMER); if( src->type == BL_PC ) ((TBL_PC*)src)->shadowform_id = 0; } [/code]status->damage affected bl (sc is from bl) in such a manner that either bl's sc data was cleared, or SC__SHADOWFORM removal was triggered

kusakos - Jan 15, 2014 23:40

Hi all, yes there was indeed a check at the beginning. Here's the complete code.
[code=nocode:15159] if( sc && sc->data[SC__SHADOWFORM] && damage ) { src = map->id2bl(sc->data[SC__SHADOWFORM]->val2); if( !src || src->m != bl->m ) { status_change_end(bl, SC__SHADOWFORM, INVALID_TIMER); return false; } if( src && (status->isdead(src) || !battle->check_target(bl,src,BCT_ENEMY)) ){ if( src->type == BL_PC ) ((TBL_PC*)src)->shadowform_id = 0; status_change_end(bl, SC__SHADOWFORM, INVALID_TIMER); return false; } status->damage(bl, src, damage, 0, clif->damage(src, src, 500, 500, damage, hit, (hit > 1 ? 8 : 0), 0), 0); if( (--sc->data[SC__SHADOWFORM]->val3) <= 0 ) { status_change_end(bl, SC__SHADOWFORM, INVALID_TIMER); if( src->type == BL_PC ) ((TBL_PC*)src)->shadowform_id = 0; } return true; } [/code]
Hello Ind, what further info do you need to help in identifying the source of the crash? The crashes happens during WOE second edition. All other WOEs are fine, no crashes. Only on WOE 2.