Go Back   EQEmulator Home > EQEmulator Forums > Support > Support::Windows Servers

Support::Windows Servers Support forum for Windows EQEMu users.

Reply
 
Thread Tools Display Modes
  #1  
Old 05-15-2015, 08:52 PM
Uleat's Avatar
Uleat
Developer
 
Join Date: Apr 2012
Location: North Carolina
Posts: 2,815
Default

Yes, if you're not familiar with applying patches, you can manually enter the code.

Just take the lines beginning with '-' and delete them..then add the lines beginning with '+'


Essentially, you will end up with this:
Code:
void EntityList::CheckSpawnQueue()
{
	// Send the stuff if the oldest packet on the queue is older than 50ms -Quagmire
	if (tsFirstSpawnOnQueue != 0xFFFFFFFF && (Timer::GetCurrentTime() - tsFirstSpawnOnQueue) > 50) {
		LinkedListIterator<NewSpawn_Struct *> iterator(SpawnQueue);
		EQApplicationPacket *outapp = 0;

		iterator.Reset();
		NewSpawn_Struct	*ns;

		while(iterator.MoreElements()) {
			outapp = new EQApplicationPacket;
			ns = iterator.GetData();
			Mob::CreateSpawnPacket(outapp, ns);
			QueueClients(0, outapp);
			auto it = npc_list.find(ns->spawn.spawnId);
			if (it == npc_list.end()) {
				Log.Out(Logs::General, Logs::Error, "Error in EntityList::CheckSpawnQueue: Unable to find NPC for spawnId '%u'", ns->spawn.spawnId);
			}
			else {
				NPC *pnpc = it->second;
				pnpc->SendArmorAppearance();
				pnpc->SetAppearance(pnpc->GetGuardPointAnim(),false);
			}
			safe_delete(outapp);
			iterator.RemoveCurrent();
		}
		tsFirstSpawnOnQueue = 0xFFFFFFFF;
		NumSpawnsOnQueue = 0;
	}
}
Note: I replaced the '%i' with '%u' in the log message code above.


What is happening is that we're calling a deference on (npc_list::iterator<unsigned short, NPC *>)it when we say 'it->second'

For some reason, npc_list is returning npc_list::end() when we assign 'it = npc_list.find(ns->spawn.spawnId)'

And since npc_list::end() is not dereferenceable, we get an assertion failure and the 'std::_Debug_message' call.


Again, not knowing the cause of this, you may have players being attacked by unseen and/or untargetable mobs..so,
be careful and watchful when your problem zones are active.


I've been looking at this from an downcast issue (uint32 -> uint16 with loss of data.)

One of the other dev's pointed out that it might be an empty npc_list..or some other queue-based issue.

Your results will help point which direction to go with this.
__________________
Uleat of Bertoxxulous

Compilin' Dirty
Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

   

All times are GMT -4. The time now is 10:38 PM.


 

Everquest is a registered trademark of Daybreak Game Company LLC.
EQEmulator is not associated or affiliated in any way with Daybreak Game Company LLC.
Except where otherwise noted, this site is licensed under a Creative Commons License.
       
Powered by vBulletin®, Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Template by Bluepearl Design and vBulletin Templates - Ver3.3