[Fixed] Crashing when idle

Old bugs stored here for reference.
Locked
User avatar
Cynnar
Project Leader
Posts: 738
Joined: Sat Sep 27, 2014 1:22 am
EQ2Emu Server: Eq2emulator
Characters: Vlash
Veinlash
Taragak
Cynnar

[Fixed] Crashing when idle

Post by Cynnar » Sun Dec 03, 2017 4:24 pm

After a few minuets of being idle on my local server I am crashing. Debug points to here in xstring

Code: Select all

	void _Construct_lv_contents(const basic_string& _Right)
		{	// assign by copying data stored in _Right
			// pre: this != &_Right
			// pre: *this owns no memory, iterators orphaned (note: _Buf/_Ptr/_Mysize/_Myres may be garbage init)
		auto& _My_data = this->_Get_data();
		auto& _Right_data = _Right._Get_data();
		const size_type _Right_size = _Right_data._Mysize;
		const _Elem * const _Right_ptr = _Right_data._Myptr();
		if (_Right_size < this->_BUF_SIZE)
			{   // stay small, don't allocate
			_Traits::copy(_My_data._Bx._Buf, _Right_ptr, this->_BUF_SIZE);
			_My_data._Mysize = _Right_size;
			_My_data._Myres = this->_BUF_SIZE - 1;
			return;
			}
const size_type _Right_size = _Right_data._Mysize;
Unhandled exception thrown: read access violation.
_Right_data was 0x20.
[ 01000011 01111001 01101110 01101110 01100001 01110010 ]

Follow on:
Twitter Facebook

Contact me:
PM Discord chat email

Hardware: the parts of a computer that can be kicked

tyrbo
Team Member
Posts: 271
Joined: Thu Feb 18, 2016 12:33 pm

Re: Crashing when idle

Post by tyrbo » Sun Dec 03, 2017 7:15 pm

Have more of a stack trace?

User avatar
Cynnar
Project Leader
Posts: 738
Joined: Sat Sep 27, 2014 1:22 am
EQ2Emu Server: Eq2emulator
Characters: Vlash
Veinlash
Taragak
Cynnar

Re: Crashing when idle

Post by Cynnar » Sun Dec 03, 2017 7:39 pm

I'm not sure this is due to being idle. It happend again when I accepted the quest Dust to Dust, so not sure if this has anything to do with it or not. Will try again and see, but here is the call stack window

Code: Select all

>	EQ2World_x64.exe!std::basic_string<char,std::char_traits<char>,std::allocator<char> >::_Construct_lv_contents(const std::basic_string<char,std::char_traits<char>,std::allocator<char> > & _Right) Line 2186	C++	Symbols loaded.
 	EQ2World_x64.exe!Item::serialize(PacketStruct * packet, bool show_name, Player * player, unsigned short packet_type, unsigned char subtype, bool loot_item) Line 1601	C++	Symbols loaded.
 	EQ2World_x64.exe!Item::serialize(unsigned short version, bool show_name, Player * player, bool include_twice, unsigned short packet_type, unsigned char subtype, bool merchant_item, bool loot_item) Line 2184	C++	Symbols loaded.
 	EQ2World_x64.exe!Client::HandleExamineInfoRequest(EQApplicationPacket * app) Line 2215	C++	Symbols loaded.
 	EQ2World_x64.exe!Client::HandlePacket(EQApplicationPacket * app) Line 1480	C++	Symbols loaded.
 	EQ2World_x64.exe!Client::Process(bool zone_process) Line 2400	C++	Symbols loaded.
 	EQ2World_x64.exe!ZoneServer::ClientProcess() Line 2903	C++	Symbols loaded.
 	EQ2World_x64.exe!ZoneServer::Process() Line 1362	C++	Symbols loaded.
 	EQ2World_x64.exe!ZoneLoop(void * tmp) Line 6006	C++	Symbols loaded.
 	[Inline Frame] EQ2World_x64.exe!invoke_thread_procedure(void(*)(void *)) Line 82	C++	Symbols loaded.
 	EQ2World_x64.exe!thread_start<void (__cdecl*)(void * __ptr64)>(void * const parameter) Line 115	C++	Symbols loaded.
 	[External Code]		Annotated Frame
and the Autos window

Code: Select all

+		_My_data	{_Bx={_Buf=0x0000000024bede10 "ÔÞ¾$" _Ptr=0x0000000024beded4 "" _Alias=0x0000000024bede10 "ÔÞ¾$" } _Mysize=...}	std::_String_val<std::_Simple_types<char> > &
+		_Right	{...}	const std::basic_string<char,std::char_traits<char>,std::allocator<char> > &
+		_Right_data	{_Bx={_Buf=0x0000000000000020 <Error reading characters of string.> _Ptr=??? _Alias=0x0000000000000020 <Error reading characters of string.> } ...}	const std::_String_val<std::_Simple_types<char> > &
		_Right_size	1	const unsigned __int64
+		this	0x0000000024bede10 "ÔÞ¾$"	std::basic_string<char,std::char_traits<char>,std::allocator<char> > *

[ 01000011 01111001 01101110 01101110 01100001 01110010 ]

Follow on:
Twitter Facebook

Contact me:
PM Discord chat email

Hardware: the parts of a computer that can be kicked

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

Re: Crashing when idle

Post by Jabantiz » Mon Dec 04, 2017 6:36 pm

This crash seems to be on this line of code

Code: Select all

string itemname = item2->name;
That being said that variable is never actually used so I deleted it, also I put a check for the pointer.

User avatar
Cynnar
Project Leader
Posts: 738
Joined: Sat Sep 27, 2014 1:22 am
EQ2Emu Server: Eq2emulator
Characters: Vlash
Veinlash
Taragak
Cynnar

Re: Crashing when idle

Post by Cynnar » Mon Dec 04, 2017 6:41 pm

Thanks [mention]Jabantiz[/mention]!
I will update local SVN and see if I can put it to the test when I'm home Saturday/Sunday.
[ 01000011 01111001 01101110 01101110 01100001 01110010 ]

Follow on:
Twitter Facebook

Contact me:
PM Discord chat email

Hardware: the parts of a computer that can be kicked

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

Re: Crashing when idle

Post by Jabantiz » Mon Dec 04, 2017 6:51 pm

Not really sure how to test this one but pushed the code to Dev SVN.

User avatar
Cynnar
Project Leader
Posts: 738
Joined: Sat Sep 27, 2014 1:22 am
EQ2Emu Server: Eq2emulator
Characters: Vlash
Veinlash
Taragak
Cynnar

Re: Crashing when idle

Post by Cynnar » Mon Dec 04, 2017 6:59 pm

I doubt there is a way to test it tbh. I will just keep an eye out in case it does happen again. If you deleted that unused line, and added a check to the pointer, then I don't expect it to happen again.
[ 01000011 01111001 01101110 01101110 01100001 01110010 ]

Follow on:
Twitter Facebook

Contact me:
PM Discord chat email

Hardware: the parts of a computer that can be kicked

User avatar
Ememjr
Team Member
Posts: 975
Joined: Wed Mar 15, 2017 9:41 am
EQ2Emu Server: Perseverance

Re: [Fixed] Crashing when idle

Post by Ememjr » Tue Dec 05, 2017 4:22 am

that section of code has to do with itemsets i added, i missed taking the line out since i was never crashing it was supposed to be used in the packet line right after it, but i populated with a different route,
most likely you have an item in your inventory that is supposed to have unpackeable items associated with it, ie vet rewards, armour crate or the most likely cause (first one a player gets is the disassemble harvesting storage box)

Locked

Who is online

Users browsing this forum: No registered users and 1 guest