Jump to content

[unconfirmed] Infinite loop in TaxiHandler.cpp

Guest ankso

Recommended Posts

MaNGOS: 10337

DB: YTDB 559

Well, I think I have found an infinite loop here:

void WorldSession::SendDoFlight( uint32 mountDisplayId, uint32 path, uint32 pathNode )
   // remove fake death
   if (GetPlayer()->hasUnitState(UNIT_STAT_DIED))

   while(GetPlayer()->GetMotionMaster()->GetCurrentMovementGeneratorType()==FLIGHT_MOTION_TYPE) // --> Here is the problem

   if (mountDisplayId)
       GetPlayer()->Mount( mountDisplayId );


I have some custom patches but nothing related to taxi paths, my server gets freezed sometimes and with that DEBUG_LOG I have found the loop where it fails. How to reproduce? Don't know, may be take flight paths until it gets stucked :P

If you have a freeze and the last output is: "WORLD: Taxi has to go from X to X" then this is your problem.

Any ideas or anyone has the same bug?

Link to comment
Share on other sites

while(GetPlayer()->GetMotionMaster()->GetCurrentMovementGeneratorType()==FLIGHT_MOTION_TYPE) check top movement generator.

GetPlayer()->GetMotionMaster()->MovementExpired(false); remove top movegen unconditionaly

except single case: if (empty() || size() == 1)

when it single existed movegen. This is impossible in normal way becase player always has idle movgen as most deep.

ofc, if as you say, "custom patches" modify something in movegens in wrong way it can be sources of problem.

Link to comment
Share on other sites

  • 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