Description:
I am having this crash.
It can happen 2-3 times a day or not happen during a week.
I compiled in debug mode to see If I could get some info and try to reproduce using the latest commit but I do not understand everything a crash log provides.
Same case that these ones (same line in PetAI.cpp):
https://github.com/TrinityCore/TrinityCore/issues/21246
https://github.com/TrinityCore/TrinityCore/issues/21247
Crashlog using debug mode:
https://gist.github.com/TheWinchesters/f0b1f62f4c28e8b2695c896ad5a1e04c#file-crashlog-2-8
Notice: This server is using some custom things :Transmog (rochet2), Passive anticheat (from Aokromes repositories) and some little code that people like @Langerz82 asks to test in open issues (unrelated to PetAI).
So, please let me know if there is a line of code that does not match.
I would love to try this crash using a unmodified core but I need someone who can give me some info about what is happening in the crash log.
I see there is a duel_hasEnded. Is this related to players doing duels?
Branch(es): 3.3.5
TC rev. hash/commit: 4337eefc8f77ec2f64f2bda747292ea4e50199ea (not the last commit but I think there were no changes about this)
Operating system: Debian 9
This is an assertion triggered
Is there something I can help with?
We could try again https://github.com/TrinityCore/TrinityCore/issues/21247 on latest 335 in case that issue is back
You should have in the console a lot of info about the current pet anyway
Make sure to use latest https://github.com/TrinityCore/TrinityCore/blob/3.3.5/contrib/debugger/crashreport.gdb too
Thank you and sorry, I did not notice I was using a old one.
Can crashreport.gdb be changed while worldserver is running?
Now using unmodified core, last rev: c8ec2dd
I tried https://github.com/TrinityCore/TrinityCore/issues/21247
worldserver does not crash but console shows this message:
"Exception trying to assign script 麓npc_pet_pri_shadowfiend麓 to Creature (Entry: 19668), this Creature will have a default AI. Exception message: Creature doesnt have a valid charm info"
And the same message if I try the same in the server where the crash happens
did someone spawn that npc somewhere ? or do you get it only after you cast Shadowfiend priest spell ?
edit: nvm, I didn't check you were trying to repro that old issue. at least it's not that causing the assert.
we'll wait for another crash with the new gdb script, it will tell the creature id, map location, etc
Here is the new crash log:
https://gist.github.com/TheWinchesters/728119d3853a04cf2a31d6d3a2829ead
I am trying things with that creature
me->GetCharmInfo()
Me: MapID: 530 X: 8909.76 Y: -7576.11 Z: 115.18 O: 5.36787
GUID Full: 0xf130003d220fa091 Type: Creature Entry: 15650 Low: 1024145 Entry 15650
Name: Crazed Dragonhawk
IsAIEnabled: true DeathState: 2 UnitMovementFlags: 0 ExtraUnitMovementFlags: 0 Class: 2
AIName: ScriptName: WaypointPath: 0 SpawnId: 55823
Same crash but different creature.
Both of them (1996 and 15650) are objetives of "Taming the beast" quest, the one that hunters do in order to obtain the ability to tame npcs.
https://wotlk.evowow.com/?quest=6102 (NPC 1996)
https://wotlk.evowow.com/?quest=9484 (NPC 15650)
Finally!
The crash will occur if a creature kill the "temporary" pet you get while doing "Taming the beast".
worldserver will crash
thanks for the how to reproduce steps 馃憤
Yeah, good job finding the actual cause of the crash. Thank you.
https://github.com/TrinityCore/TrinityCore/blob/59682bbd9b333a8e6dbfd3c6884b16afdb510197/src/server/game/AI/CoreAI/PetAI.cpp#L540
-if (!target->IsAlive())
+if (!me->IsAlive() || !target->IsAlive())
simple tested, didn't happen crash
I don't think it's correct for PetAI::AttackStart() to be called with a CORPSE Pet, how did that even happen ?
It gets even weirder, that CORPSE pet is taking damage while being dead (for those unaware, AI::DamageTaken hook is called before damage takes place, obviously it means that it also happens before death). From the last crash log it looks like the pet was already dead but still taking damage
I think there's a problem here?
DealDamage => call AI::DamageTaken => pet killed.
DealDamage => call AI::DamageTaken => crash.
Most helpful comment
Finally!
The crash will occur if a creature kill the "temporary" pet you get while doing "Taming the beast".
worldserver will crash