Page 1 of 1

World Crash: /spawn set name

Posted: Mon Jan 22, 2018 5:39 pm
by John Adams
Added a couple spawn to the spawn/spawn_npcs tables, then /spawn {id} into the world.

Targetted it and did a /spawn add new "test", which stuck it in the "location" tables.

/reload spawns - repopped the guy, saw an invalid grid ID so I fixed that in spawn_location_placements (no way to do it via client commands)

/reload spawns - saw the spawn properly

Targetted it and did /spawn set name "Model:5019" and KABOOM.

Code: Select all

 	ntdll.dll!7767a225()	Unknown
 	[Frames below may be incorrect and/or missing, no symbols loaded for ntdll.dll]	
>	EQ2World__Debug.exe!CriticalSection::lock() Line 337	C++
 	EQ2World__Debug.exe!Mutex::readlock(const char * function, unsigned int line) Line 85	C++
 	EQ2World__Debug.exe!ZoneServer::SendUpdateTitles(Spawn * spawn, Title * suffix, Title * prefix) Line 5525	C++
 	EQ2World__Debug.exe!Commands::SetSpawnCommand(Client * client, Spawn * target, unsigned char type, const char * value, bool send_update, bool temporary, std::basic_string<char,std::char_traits<char>,std::allocator<char> > * temp_value) Line 482	C++
 	EQ2World__Debug.exe!ZoneServer::ApplySetSpawnCommand(Client * client, Spawn * target, unsigned char type, char * value) Line 3501	C++
 	EQ2World__Debug.exe!Commands::Process(unsigned int index, EQ2_16BitString * command_parms, Client * client) Line 3132	C++
 	EQ2World__Debug.exe!Client::HandlePacket(EQApplicationPacket * app) Line 1504	C++
 	EQ2World__Debug.exe!Client::Process(bool zone_process) Line 2434	C++
 	EQ2World__Debug.exe!ZoneServer::ClientProcess() Line 2914	C++
 	EQ2World__Debug.exe!ZoneServer::Process() Line 1363	C++
 	EQ2World__Debug.exe!ZoneLoop(void * tmp) Line 6019	C++
 	EQ2World__Debug.exe!invoke_thread_procedure(void(*)(void *) procedure, void * const context) Line 82	C++
 	EQ2World__Debug.exe!thread_start<void (__cdecl*)(void *)>(void * const parameter) Line 115	C++
 	kernel32.dll!75fc8654()	Unknown
 	ntdll.dll!77694a77()	Unknown
 	ntdll.dll!77694a47()	Unknown
Regardless of me doing something wrong, I suppose a world-ending crash should be avoided.

Re: World Crash: /spawn set name

Posted: Mon Jan 22, 2018 6:41 pm
by Jabantiz
CriticalSection is a really odd place for it to crash, must be an issue with our mutex class, really it seems like some pointer might have been null. Does doing the /spawn set name "Model:5019" reliably cause the crash? If so does /spawn set name with a name of only letters also cause a crash?

Re: World Crash: /spawn set name

Posted: Tue Jan 23, 2018 1:16 pm
by John Adams
Yes, consistently crashes with /spawn set name "Model:5019". Hovered over this line in zoneserver (line 5525):

Code: Select all

for (itr = clients.begin(); itr != clients.end(); itr++) {
and clients does look odd, no real data in there to see clearly.

Tried /spawn set name "Test"
(quotes)
Tried /spawn set name Test
(no quotes)

Same crash, so it should be reproducible enough to trace.

Re: World Crash: /spawn set name

Posted: Tue Jan 23, 2018 8:29 pm
by tyrbo
I think I was having the same issue. Can't recall where I fixed it.
Possibly here?

https://github.com/stitchpvp/world/comm ... 06209b8cff

Not sure.