World crashing randomly? [solved, ish]

Old bugs stored here for reference.
Locked
User avatar
John Adams
Retired
Posts: 9684
Joined: Thu Jul 26, 2007 6:27 am
EQ2Emu Server: EQ2Emulator Test Center
Characters: John
Location: Arizona
Contact:

World crashing randomly? [solved, ish]

Post by John Adams » Wed Sep 26, 2012 9:44 pm

That doesn't seem likely, but it seems every time I touch the client in windowed mode, my world crashes. This is in debug this time, so here's the stack:

Code: Select all

>	EQ2World__Debug.exe!_Strftime_l(char * string, unsigned int maxsize, const char * format, const tm * timeptr, void * lc_time_arg, localeinfo_struct * plocinfo)  Line 368 + 0x32 bytes	C++
 	EQ2World__Debug.exe!strftime(char * string, unsigned int maxsize, const char * format, const tm * timeptr)  Line 268 + 0x19 bytes	C++
 	EQ2World__Debug.exe!EQPacket::DumpRawHeader(unsigned short seq, _iobuf * to)  Line 139 + 0x20 bytes	C++
 	EQ2World__Debug.exe!EQStream::ProcessPacket(EQProtocolPacket * p)  Line 303	C++
 	EQ2World__Debug.exe!EQStream::Process(const unsigned char * buffer, const unsigned int length)  Line 1164	C++
 	EQ2World__Debug.exe!EQStreamFactory::ReaderLoop()  Line 239	C++
 	EQ2World__Debug.exe!EQStreamFactoryReaderLoop(void * eqfs)  Line 59	C++
 	EQ2World__Debug.exe!_callthreadstart()  Line 259 + 0xf bytes	C
 	EQ2World__Debug.exe!_threadstart(void * ptd)  Line 243	C
 	kernel32.dll!772b339a() 	
 	[Frames below may be incorrect and/or missing, no symbols loaded for kernel32.dll]	
 	ntdll.dll!77d09ef2() 	
 	ntdll.dll!77d09ec5() 	

EDIT: OH you know where this is? In all those previously undefined preprocessors like EQN_DEBUG, LE_DEBUG, etc. Maybe this has always been there, but because I put them in the preprocessors to see what they do, now I am getting crashes?


Edit2: Yup, it was my logger changes here in EQStream.cpp
was:

Code: Select all

#ifdef EQN_DEBUG
					cout << "*** Future packet: Expecting Seq=" << NextInSeq << ", but got Seq=" << seq << endl;
					//p->DumpRawHeader(seq);
					cout << endl;
#endif				
is:

Code: Select all

#ifdef EQN_DEBUG
					LogWrite(PACKET__DEBUG, 0, "Packet", "*** Future packet: Expecting Seq=%i, but got Seq=%i", NextInSeq, seq);
					LogWrite(PACKET__DEBUG, 0, "Packet", "[Start]");
					p->DumpRawHeader(seq);
					LogWrite(PACKET__DEBUG, 0, "Packet", "[End]");
#endif				
DumpRawHeader() must be some old EQ hack code LE left in there but commented out. I do find a ton of functions like that around Emu code, usually commented out. When I uncomment them, bad things happen.

I'll fix this right away.

Jabantiz
Lead Developer
Posts: 2912
Joined: Wed Jul 25, 2007 2:52 pm
Location: California

Re: World crashing resizing client window?

Post by Jabantiz » Wed Sep 26, 2012 9:50 pm

When I was messing around with AoD client I noticed that EQPacket::DumpRawHeader always caused the world to crash and I couldn't figure out why, this always happened on duplicate packets if I remember right.

User avatar
John Adams
Retired
Posts: 9684
Joined: Thu Jul 26, 2007 6:27 am
EQ2Emu Server: EQ2Emulator Test Center
Characters: John
Location: Arizona
Contact:

Re: World crashing randomly? [solved, ish]

Post by John Adams » Wed Sep 26, 2012 9:58 pm

Yup, I had just gone through and "LogWrite-ified" most of those couts, which is why I uncommented DumpRaw and DumpRawPacket. I was hoping it would help you sort out some of the dupe packet issues. Guess not, unless we fix DumpRawPacket too :)

btw, it's funny what you run across while surfing through the darkest corners of our code;
#ifdef NOWAY

Locked

Who is online

Users browsing this forum: No registered users and 0 guests