Jump to content

help with interperting BT


Recommended Posts

Posted

MaNGOS 8935 + OpenMP mtmaps

Hi, I've got problems with interpetation this crashlog:

http://www.pastebin.org/65714

[color=green]#2  0x0000000000722a76 in ThreatManager::addThreat (this=0x7f4b7cc5d4e8, pVictim=0x162a6770, pThreat=, crit=,
   schoolMask=, pThreatSpell=) at ../../../src/game/ThreatManager.cpp:395 [/color]

void ThreatManager::addThreat(Unit* pVictim, float pThreat, bool crit, SpellSchoolMask schoolMask, SpellEntry const *pThreatSpell)
{
   //function deals with adding threat and adding players and pets into ThreatList
   //mobs, NPCs, guards have ThreatList and HateOfflineList
   //players and pets have only InHateListOf
   //HateOfflineList is used co contain unattackable victims (in-flight, in-water, GM etc.)

   // not to self
   if (pVictim == getOwner())
       return;

   // not to GM
   if (!pVictim || (pVictim->GetTypeId() == TYPEID_PLAYER && ((Player*)pVictim)->isGameMaster()) )
       return;

   // not to dead and not for dead
   if(!pVictim->isAlive() || !getOwner()->isAlive() )
       return;

   assert(getOwner()->GetTypeId()== TYPEID_UNIT);

   float threat = ThreatCalcHelper::calcThreat(pVictim, iOwner, pThreat, crit, schoolMask, pThreatSpell);

   [color=Red]HostileReference* ref = iThreatContainer.addThreat(pVictim, threat);[/color]

btw. i was wondering why !pVictim check is below if (pVictim == getOwner()) but it's not the point that im going to ask.

##############################

[color="Green"]#1 0x00000000007229c0 in ThreatContainer::addThreat (this=0x162a6770,[color="Red"] pVictim=0x0[/color], pThreat=0) at ../../../src/game/ThreatManager.cpp:242 [/color]

HostileReference* ThreatContainer::addThreat(Unit* pVictim, float pThreat)
{
   [color=Red]HostileReference* ref = getReferenceByTarget(pVictim);[/color]
   if(ref)
       ref->addThreat(pThreat);
   return ref;
}

How can it be that pVictim is lost between those two functions? there is no void that could modify argument. is it caused by multithreading?

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue. Privacy Policy Terms of Use