Closed GoogleCodeExporter closed 8 years ago
I observed this crash on my server today. Visual Studio broke here:
if (
mob != sender
&& mob != attacker
// && !mob->IsCorpse()
// && mob->IsAIControlled()
&& mob->GetPrimaryFaction() != 0
&& mob->DistNoRoot(*sender) <= r
&& !mob->IsEngaged()
)
The mob object in my case is not null but does have many variables that are at
max
value or the expression cannot be evaluated. This usually means the mob is
dead and
iterating through this instance of the npc_list still has a pointer to it's
object.
Possible solutions:
might not work on bad objects, but maybe unrem the check for !mob->IsCorpse()
Speed up the for loop to possibly get the checks in before it dies. My npc_list
had
312 objects in it so maybe moving the check (mob->DistNoRoot(*sender) <= r) up
to
the top of the if statement so the other processing checks aren't made on mob
objects on the other side of the zone.
Original comment by cong...@gmail.com
on 25 Jan 2010 at 7:07
I believe this issue has been resolved a while back (by a suggestion from
Rogean, I think). Haven't seen this crash since then.
Original comment by weiss...@gmail.com
on 2 Dec 2010 at 9:08
Original comment by KimmySpr...@gmail.com
on 2 Dec 2010 at 8:40
Original issue reported on code.google.com by
KimmySpr...@gmail.com
on 2 May 2009 at 9:19