Description of Issue:
Modifications that may affect results:
bonus2 bSkillAtk,"RA_CLUSTERBOMB",800;GDB's bt full stack:
```(gdb) bt full
unit_id = 217
ap = <optimized out>
bl = 0x7f441ef427c4
y0=
bx =
by =
cx = 1511447936
cy = 22099
returnCount = 0
bl =
blockcount =
i = 0
ap_copy = {{gp_offset = 48, fp_offset = 48, overflow_arg_area = 0x7ffd6df818e0, reg_save_area = 0x7ffd6df81810}}
x0=
returnCount = 0
ap = {{gp_offset = 48, fp_offset = 48, overflow_arg_area = 0x7ffd6df818d8, reg_save_area = 0x7ffd6df81810}}
at skill.cpp:12163
sd = 0x565360d4bff0
sc =
sce = 0x0
sg =
type =
i =
__FUNCTION__ = "skill_castend_pos2"
maxcount = <optimized out>
src = 0x565360d4bff0
sd = <optimized out>
ud = 0x565360d4c010
md = 0x0
y0=
bx =
by =
cx = 1511447936
cy = 22099
returnCount = 0
bl =
blockcount =
i = 0
ap_copy = {{gp_offset = 48, fp_offset = 48, overflow_arg_area = 0x7ffd6df818e0, reg_save_area = 0x7ffd6df81810}}
x0=
returnCount = 0
ap = {{gp_offset = 48, fp_offset = 48, overflow_arg_area = 0x7ffd6df818d8, reg_save_area = 0x7ffd6df81810}}
at skill.cpp:12163
sd = 0x565360d4bff0
sc =
sce = 0x0
sg =
type =
i =
__FUNCTION__ = "skill_castend_pos2"
maxcount = <optimized out>
src = 0x565360d4bff0
sd = <optimized out>
ud = 0x565360d4c010
md = 0x0
__FUNCTION__ = "skill_castend_pos"
skill_id=skill_id@entry=2237, skill_lv=skill_lv@entry=1, casttime=0, castcancel=0) at unit.cpp:2117
sd = 0x565360d4bff0
ud =
sc =
bl = {next = 0x565360d4bff0, prev = 0x56535701acf0
y = 185, type = BL_NUL}
tick = 3531793441
range =
__FUNCTION__ = "unit_skilluse_pos2"
at unit.cpp:1959
No locals.
No locals.
cmd = <optimized out>
packet_len = 10
sd = <optimized out>
pnum = 0
cmd2 = 1844976544
rfd = {fds_bits = {256, 0 <repeats 15 times>}}
timeout = {tv_sec = 0, tv_usec = 14584}
---Type
ret = 0
i = 8
```
Update
On continued testing, it only crashes when the player is in @duel mode.
Here's what i assume :
when Ranger A placing traps, and the damage got reflected by crescent elbow, the Ranger dies at the same time the traps removed (because of detonator), that's why on this line unit->group->unit_id = UNT_USED_TRAPS; the unit->group is nullptr because when player dies, he/she will automatically leaves @duel mode.
--- a/src/map/skill.cpp
+++ b/src/map/skill.cpp
@@ -17282,6 +17282,8 @@ int skill_detonator(struct block_list *bl, va_list ap)
map_foreachinrange(skill_trap_splash,bl,skill_get_splash(unit->group->skill_id,unit->group->skill_lv),unit->group->bl_flag,bl,unit->group->tick);
break;
}
+ if (!unit->group)
+ return 0;
clif_changetraplook(bl, UNT_USED_TRAPS);
unit->group->unit_id = UNT_USED_TRAPS;
unit->group->limit = DIFF_TICK(gettick(),unit->group->tick) +
As a temporary hot fix you could add that check. When the map_foreachinrange is calling skill_trap_splash. It's dealing the damage and then returns out of there and we have already verified unit->group from before but now after the damage has been dealt and the caster is dead, that assertion is failing because it is null now.
@aleos89 i've tested your hotfix and it worked on my test server. I will update this comment if there's an update on my live server.
Thanks a lot.
Most helpful comment
As a temporary hot fix you could add that check. When the
map_foreachinrangeis callingskill_trap_splash. It's dealing the damage and then returns out of there and we have already verifiedunit->groupfrom before but now after the damage has been dealt and the caster is dead, that assertion is failing because it is null now.