View Single Post
  #4  
Old 05-14-2015, 08:36 PM
Uleat's Avatar
Uleat
Developer
 
Join Date: Apr 2012
Location: North Carolina
Posts: 2,815
Default

You can try this patch to see if it helps identify the problem:

Code:
 zone/entity.cpp | 11 ++++++++---
 1 file changed, 8 insertions(+), 3 deletions(-)

diff --git a/zone/entity.cpp b/zone/entity.cpp
index 5646f08..0f1246a 100644
--- a/zone/entity.cpp
+++ b/zone/entity.cpp
@@ -736,9 +736,14 @@ void EntityList::CheckSpawnQueue()
 			Mob::CreateSpawnPacket(outapp, ns);
 			QueueClients(0, outapp);
 			auto it = npc_list.find(ns->spawn.spawnId);
-			NPC *pnpc = it->second;
-			pnpc->SendArmorAppearance();
-			pnpc->SetAppearance(pnpc->GetGuardPointAnim(),false);
+			if (it == npc_list.end()) {
+				Log.Out(Logs::General, Logs::Error, "Error in EntityList::CheckSpawnQueue: Unable to find NPC for spawnId '%i'", ns->spawn.spawnId);
+			}
+			else {
+				NPC *pnpc = it->second;
+				pnpc->SendArmorAppearance();
+				pnpc->SetAppearance(pnpc->GetGuardPointAnim(), false);
+			}
 			safe_delete(outapp);
 			iterator.RemoveCurrent();
 		}

That assertion looks like it is being triggered by calling a dereference on the list::end() object.


EDIT: The '%i' should probably be '%u' in that log message..but, any value greater than 65535 or less than 0 would indicate an issue.


EDIT2: This is a troubleshooting patch..playing in a zone where the log message is triggered may cause issues with clients being attacked by 'invisible' mobs.
__________________
Uleat of Bertoxxulous

Compilin' Dirty

Last edited by Uleat; 05-14-2015 at 08:57 PM..
Reply With Quote