A spawn being removed while the spawn condition for day/night is being triggered causes a crash on SpawnConditionID().. because the itr->second is null
void ZoneServer::ProcessSpawnConditional(int8 condition) {
MSpawnLocationList.readlock(__FUNCTION__, __LINE__);
MSpawnList.readlock(__FUNCTION__, __LINE__);
map<int32, Spawn*>::iterator itr;
for (itr = spawn_list.begin(); itr != spawn_list.end(); itr++) {
SpawnLocation* loc = spawn_location_list[itr->second->GetSpawnLocationID()];()];
// we crash here ^^^ on itr->second = NULL
Our setting of NULL to a spawn ID on spawn removal is not ideal, we should erase from the spawn list...
A spawn being removed while the spawn condition for day/night is being triggered causes a crash on SpawnConditionID().. because the itr->second is null
void ZoneServer::ProcessSpawnConditional(int8 condition) {
MSpawnLocationList.readlock(__FUNCTION__, __LINE__);
MSpawnList.readlock(__FUNCTION__, __LINE__);
map<int32, Spawn*>::iterator itr;
for (itr = spawn_list.begin(); itr != spawn_list.end(); itr++) {
SpawnLocation* loc = spawn_location_list[itr->second->GetSpawnLocationID()];()];
// we crash here ^^^ on itr->second = NULL
Our setting of NULL to a spawn ID on spawn removal is not ideal, we should erase from the spawn list...
image hivatkozott erre a hibajegyre egy commit-ban ekkor: 4 éve
EQ2World__Debug_x64.exe!Spawn::GetSpawnLocationID() Line 1112 C++
EQ2WorldDebug_x64.exe!ZoneServer::ProcessSpawnConditional(unsigned char condition) Line 6983 C++
EQ2WorldDebug_x64.exe!ZoneServer::Process() Line 1420 C++
EQ2WorldDebug_x64.exe!ZoneLoop(void * tmp) Line 6146 C++
EQ2WorldDebug_x64.exe!thread_start<void (__cdecl*)(void *),0>(void * const parameter) Line 102 C++
trace I had received on this event:
EQ2World__Debug_x64.exe!Spawn::GetSpawnLocationID() Line 1112 C++
EQ2WorldDebug_x64.exe!ZoneServer::ProcessSpawnConditional(unsigned char condition) Line 6983 C++
EQ2WorldDebug_x64.exe!ZoneServer::Process() Line 1420 C++
EQ2WorldDebug_x64.exe!ZoneLoop(void * tmp) Line 6146 C++
EQ2WorldDebug_x64.exe!thread_start<void (__cdecl*)(void *),0>(void * const parameter) Line 102 C++
As another note the process thats supposed to clean up these dead spawn pointers is
pending_spawn_list_remove inside bool ZoneServer::SpawnProcess() ... however with that delay in place between the removal of the null entry and this ProcessSpawnConditional missing a NULL check on itr->second we ran into the crash.
As another note the process thats supposed to clean up these dead spawn pointers is
pending_spawn_list_remove inside bool ZoneServer::SpawnProcess() ... however with that delay in place between the removal of the null entry and this ProcessSpawnConditional missing a NULL check on itr->second we ran into the crash.
A spawn being removed while the spawn condition for day/night is being triggered causes a crash on SpawnConditionID().. because the itr->second is null
Our setting of NULL to a spawn ID on spawn removal is not ideal, we should erase from the spawn list...
trace I had received on this event:
As another note the process thats supposed to clean up these dead spawn pointers is
pending_spawn_list_remove inside bool ZoneServer::SpawnProcess() ... however with that delay in place between the removal of the null entry and this ProcessSpawnConditional missing a NULL check on itr->second we ran into the crash.