#224 DismissPet crash on death of entity

닫힘
image4 년 전을 오픈 · 1개의 코멘트
image 코멘트됨, 4 년 전
#1  0x00007ffff75e6874 in usleep (useconds=useconds@entry=1000) at ../sysdeps/posix/usleep.c:32
        ts = {tv_sec = 0, tv_nsec = 1000000}
#2  0x0000555555677ab4 in Sleep (x=x@entry=1) at ../common/unix.cpp:26
No locals.
#3  0x000055555567718c in Mutex::waitReaders (this=this@entry=0x7fff8e1d6fe8, function=function@entry=0x5555559bb380 <ZoneServer::RemoveSpawn(bool, Spawn*, bool, bool, bool)::__FUNCTION__> "RemoveSpawn", line=line@entry=3855) at ../common/Mutex.cpp:271
No locals.
#4  0x0000555555677459 in Mutex::writelock (this=this@entry=0x7fff8e1d6fe8, function=function@entry=0x5555559bb380 <ZoneServer::RemoveSpawn(bool, Spawn*, bool, bool, bool)::__FUNCTION__> "RemoveSpawn", line=line@entry=3855) at ../common/Mutex.cpp:183
No locals.
#5  0x00005555556cd29f in ZoneServer::RemoveSpawn (this=0x7fff8e1d51c0, spawnListLocked=spawnListLocked@entry=false, spawn=spawn@entry=0x7fffaf2bfa10, delete_spawn=delete_spawn@entry=true, respawn=respawn@entry=true, lock=lock@entry=true) at ../WorldServer/zoneserver.cpp:3855
        __FUNCTION__ = "RemoveSpawn"
        packet = <optimized out>
        packet_version = <optimized out>
        client = <optimized out>
        client_itr = <optimized out>
        alreadyDeletedSpawn = <optimized out>
#6  0x00005555557f1a85 in Entity::DismissPet (this=this@entry=0x55555c85a210, pet=0x7fffaf2bfa10, from_death=from_death@entry=false) at ../WorldServer/Entity.cpp:1167
        PetOwner = 0x55555c85a210
        spell = <optimized out>
#7  0x000055555576965d in Entity::KillSpawn (this=this@entry=0x7fffadf48a50, dead=dead@entry=0x55555c85a210, damage_type=damage_type@entry=0 '\000', kill_blow_type=kill_blow_type@entry=0) at ../WorldServer/Entity.h:673
No locals.
#8  0x000055555576b567 in Entity::DamageSpawn (this=this@entry=0x7fffadf48a50, victim=victim@entry=0x55555c85a210, type=type@entry=192 '\300', damage_type=damage_type@entry=0 '\000', low_damage=low_damage@entry=5, high_damage=high_damage@entry=99, spell_name=0x0, crit_mod=0 '\000', is_tick=false, no_calcs=false, 
    ignore_attacker=false) at ../WorldServer/Combat.cpp:972
        hit_result = 1 '\001'
        blow_type = 0
        damage = <optimized out>
        crit = false
        __FUNCTION__ = "DamageSpawn"
        useWards = false
        attacker = 0x7fffadf48a50
#9  0x000055555576baf2 in Entity::MeleeAttack (this=0x7fffadf48a50, victim=victim@entry=0x55555c85a210, distance=distance@entry=3.82218528, primary=primary@entry=true, multi_attack=multi_attack@entry=false) at ../WorldServer/Combat.cpp:219
        damage_type = 0 '\000'
        min_damage = 5
        max_damage = 99
--Type <RET> for more, q to quit, c to continue without paging--c
        hit_result = 1 '\001'
#10 0x000055555573fa82 in Brain::ProcessMelee (this=this@entry=0x7fffadf4c0c0, target=target@entry=0x55555c85a210, distance=distance@entry=3.82218528) at ../WorldServer/NPC_AI.cpp:380
No locals.
#11 0x0000555555740ede in Brain::Think (this=0x7fffadf4c0c0) at ../WorldServer/NPC_AI.cpp:114
        distance = 3.82218528
        breakWaterPursuit = <optimized out>
        run_back_distance = <optimized out>
        target = 0x55555c85a210
#12 0x0000555555769764 in NPC::ProcessCombat (this=0x7fffadf48a50) at ../WorldServer/Combat.cpp:1121
        __FUNCTION__ = "ProcessCombat"
#13 0x00005555556a6528 in ZoneServer::CombatProcess (this=this@entry=0x7fff8e1d51c0, spawn=spawn@entry=0x7fffadf48a50) at ../WorldServer/zoneserver.cpp:1164
No locals.
#14 0x00005555556ca8ce in ZoneServer::SpawnProcess (this=this@entry=0x7fff8e1d51c0) at ../WorldServer/zoneserver.cpp:1566
        spawn = 0x7fffadf48a50
        spawnRange = <optimized out>
        aggroCheck = false
        pending_spawn_list_remove = std::vector of length 0, capacity 0
        itr = {first = 8837, second = 0x7fffadf48a50}
        movement = true
        checkRemove = <optimized out>
        __FUNCTION__ = "SpawnProcess"
#15 0x00005555556cab77 in SpawnLoop (tmp=0x7fff8e1d51c0) at ../WorldServer/zoneserver.cpp:6765
        zs = 0x7fff8e1d51c0
#16 0x00007ffff7d83fa3 in start_thread (arg=<optimized out>) at pthread_create.c:486
        ret = <optimized out>
        pd = <optimized out>
        now = <optimized out>
        unwind_buf = {cancel_jmp_buf = {{jmp_buf = {140736540436224, 7369226774812164015, 140736079060750, 140736079060751, 140736540436224, 140736305841248, -7369210283170332753, -7369244665474973777}, mask_was_saved = 0}}, priv = {pad = {0x0, 0x0, 0x0, 0x0}, data = {prev = 0x0, cleanup = 0x0, canceltype = 0}}}
        not_first_call = <optimized out>
#17 0x00007ffff75ee4cf in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:95
``` #1 0x00007ffff75e6874 in usleep (useconds=useconds@entry=1000) at ../sysdeps/posix/usleep.c:32 ts = {tv_sec = 0, tv_nsec = 1000000} #2 0x0000555555677ab4 in Sleep (x=x@entry=1) at ../common/unix.cpp:26 No locals. #3 0x000055555567718c in Mutex::waitReaders (this=this@entry=0x7fff8e1d6fe8, function=function@entry=0x5555559bb380 <ZoneServer::RemoveSpawn(bool, Spawn*, bool, bool, bool)::__FUNCTION__> "RemoveSpawn", line=line@entry=3855) at ../common/Mutex.cpp:271 No locals. #4 0x0000555555677459 in Mutex::writelock (this=this@entry=0x7fff8e1d6fe8, function=function@entry=0x5555559bb380 <ZoneServer::RemoveSpawn(bool, Spawn*, bool, bool, bool)::__FUNCTION__> "RemoveSpawn", line=line@entry=3855) at ../common/Mutex.cpp:183 No locals. #5 0x00005555556cd29f in ZoneServer::RemoveSpawn (this=0x7fff8e1d51c0, spawnListLocked=spawnListLocked@entry=false, spawn=spawn@entry=0x7fffaf2bfa10, delete_spawn=delete_spawn@entry=true, respawn=respawn@entry=true, lock=lock@entry=true) at ../WorldServer/zoneserver.cpp:3855 __FUNCTION__ = "RemoveSpawn" packet = <optimized out> packet_version = <optimized out> client = <optimized out> client_itr = <optimized out> alreadyDeletedSpawn = <optimized out> #6 0x00005555557f1a85 in Entity::DismissPet (this=this@entry=0x55555c85a210, pet=0x7fffaf2bfa10, from_death=from_death@entry=false) at ../WorldServer/Entity.cpp:1167 PetOwner = 0x55555c85a210 spell = <optimized out> #7 0x000055555576965d in Entity::KillSpawn (this=this@entry=0x7fffadf48a50, dead=dead@entry=0x55555c85a210, damage_type=damage_type@entry=0 '\000', kill_blow_type=kill_blow_type@entry=0) at ../WorldServer/Entity.h:673 No locals. #8 0x000055555576b567 in Entity::DamageSpawn (this=this@entry=0x7fffadf48a50, victim=victim@entry=0x55555c85a210, type=type@entry=192 '\300', damage_type=damage_type@entry=0 '\000', low_damage=low_damage@entry=5, high_damage=high_damage@entry=99, spell_name=0x0, crit_mod=0 '\000', is_tick=false, no_calcs=false, ignore_attacker=false) at ../WorldServer/Combat.cpp:972 hit_result = 1 '\001' blow_type = 0 damage = <optimized out> crit = false __FUNCTION__ = "DamageSpawn" useWards = false attacker = 0x7fffadf48a50 #9 0x000055555576baf2 in Entity::MeleeAttack (this=0x7fffadf48a50, victim=victim@entry=0x55555c85a210, distance=distance@entry=3.82218528, primary=primary@entry=true, multi_attack=multi_attack@entry=false) at ../WorldServer/Combat.cpp:219 damage_type = 0 '\000' min_damage = 5 max_damage = 99 --Type <RET> for more, q to quit, c to continue without paging--c hit_result = 1 '\001' #10 0x000055555573fa82 in Brain::ProcessMelee (this=this@entry=0x7fffadf4c0c0, target=target@entry=0x55555c85a210, distance=distance@entry=3.82218528) at ../WorldServer/NPC_AI.cpp:380 No locals. #11 0x0000555555740ede in Brain::Think (this=0x7fffadf4c0c0) at ../WorldServer/NPC_AI.cpp:114 distance = 3.82218528 breakWaterPursuit = <optimized out> run_back_distance = <optimized out> target = 0x55555c85a210 #12 0x0000555555769764 in NPC::ProcessCombat (this=0x7fffadf48a50) at ../WorldServer/Combat.cpp:1121 __FUNCTION__ = "ProcessCombat" #13 0x00005555556a6528 in ZoneServer::CombatProcess (this=this@entry=0x7fff8e1d51c0, spawn=spawn@entry=0x7fffadf48a50) at ../WorldServer/zoneserver.cpp:1164 No locals. #14 0x00005555556ca8ce in ZoneServer::SpawnProcess (this=this@entry=0x7fff8e1d51c0) at ../WorldServer/zoneserver.cpp:1566 spawn = 0x7fffadf48a50 spawnRange = <optimized out> aggroCheck = false pending_spawn_list_remove = std::vector of length 0, capacity 0 itr = {first = 8837, second = 0x7fffadf48a50} movement = true checkRemove = <optimized out> __FUNCTION__ = "SpawnProcess" #15 0x00005555556cab77 in SpawnLoop (tmp=0x7fff8e1d51c0) at ../WorldServer/zoneserver.cpp:6765 zs = 0x7fff8e1d51c0 #16 0x00007ffff7d83fa3 in start_thread (arg=<optimized out>) at pthread_create.c:486 ret = <optimized out> pd = <optimized out> now = <optimized out> unwind_buf = {cancel_jmp_buf = {{jmp_buf = {140736540436224, 7369226774812164015, 140736079060750, 140736079060751, 140736540436224, 140736305841248, -7369210283170332753, -7369244665474973777}, mask_was_saved = 0}}, priv = {pad = {0x0, 0x0, 0x0, 0x0}, data = {prev = 0x0, cleanup = 0x0, canceltype = 0}}} not_first_call = <optimized out> #17 0x00007ffff75ee4cf in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:95 ```
image 코멘트됨, 4 년 전
협업자

Potential fix in...

void Entity::KillSpawn(Spawn* dead, int8 damage_type, int16 kill_blow_type) {

need third variable in functions for DismissPet that the spawn list is already locked

	else if (dead->IsEntity()) {
		// remove all pets for this entity
		((Entity*)dead)->DismissPet((NPC*)((Entity*)dead)->GetPet());
		((Entity*)dead)->DismissPet((NPC*)((Entity*)dead)->GetCharmedPet());
		((Entity*)dead)->DismissPet((NPC*)((Entity*)dead)->GetDeityPet());
		((Entity*)dead)->DismissPet((NPC*)((Entity*)dead)->GetCosmeticPet());
	}

	if (dead->IsPet())
		((NPC*)dead)->GetOwner()->DismissPet((NPC*)dead, true);
	else if (dead->IsEntity()) {
		// remove all pets for this entity
		((Entity*)dead)->DismissPet((NPC*)((Entity*)dead)->GetPet(), false, true);
		((Entity*)dead)->DismissPet((NPC*)((Entity*)dead)->GetCharmedPet(), false, true);
		((Entity*)dead)->DismissPet((NPC*)((Entity*)dead)->GetDeityPet(), false, true);
		((Entity*)dead)->DismissPet((NPC*)((Entity*)dead)->GetCosmeticPet(), false, true);
	}
Potential fix in... void Entity::KillSpawn(Spawn* dead, int8 damage_type, int16 kill_blow_type) { need third variable in functions for DismissPet that the spawn list is already locked ``` else if (dead->IsEntity()) { // remove all pets for this entity ((Entity*)dead)->DismissPet((NPC*)((Entity*)dead)->GetPet()); ((Entity*)dead)->DismissPet((NPC*)((Entity*)dead)->GetCharmedPet()); ((Entity*)dead)->DismissPet((NPC*)((Entity*)dead)->GetDeityPet()); ((Entity*)dead)->DismissPet((NPC*)((Entity*)dead)->GetCosmeticPet()); } ``` ``` if (dead->IsPet()) ((NPC*)dead)->GetOwner()->DismissPet((NPC*)dead, true); else if (dead->IsEntity()) { // remove all pets for this entity ((Entity*)dead)->DismissPet((NPC*)((Entity*)dead)->GetPet(), false, true); ((Entity*)dead)->DismissPet((NPC*)((Entity*)dead)->GetCharmedPet(), false, true); ((Entity*)dead)->DismissPet((NPC*)((Entity*)dead)->GetDeityPet(), false, true); ((Entity*)dead)->DismissPet((NPC*)((Entity*)dead)->GetCosmeticPet(), false, true); } ```
image 4 년 전가 Close
로그인하여 이 대화에 참여
로딩중...
취소
저장
아직 콘텐츠가 없습니다.