ParsecSoda icon indicating copy to clipboard operation
ParsecSoda copied to clipboard

[Bug] chatLog/commandLog crash

Open v6ooo opened this issue 4 years ago • 1 comments

Been trying to find the places in the code where the crashes are coming from and found 2 places it will randomly crash

https://github.com/FlavioFS/ParsecSoda/blob/2d00d9851399ca1e6797279d649b6b105463f8d2/ParsecSoda/Widgets/ChatWidget.cpp#L38

Result: Will randomly crash when messages are received and rendered. Reproduce: Easiest way to reproduce is to use a macro to just spam messages.

Error: Exception thrown: read access violation. _Mycont was nullptr.

-		[ptr]	0x000002ba9e067818 <Error reading characters of string.>	std::string *
		[size]	15987178197214944733	unsigned __int64
		[capacity]	15987178197214944733	unsigned __int64
+		[allocator]	allocator	std::_Compressed_pair<std::allocator<char>,std::_String_val<std::_Simple_types<char>>,1>
		[0]	<Unable to read memory>	char
		[1]	<Unable to read memory>	char
		[2]	<Unable to read memory>	char
		.....

https://github.com/FlavioFS/ParsecSoda/blob/2d00d9851399ca1e6797279d649b6b105463f8d2/ParsecSoda/Widgets/LogWidget.cpp#L20

Result: Same as above with ChatWidget but much rarer Reproduce: Same as above with ChatWidget but much rarer

v6ooo avatar Nov 12 '21 10:11 v6ooo

Sorry for the delayed reply, I've too busy recently. This is probably a racing condition in the rendering when the message data structure is altered. I'm not sure if I made the chat completely thread-safe at that time.

FlavioFS avatar Dec 12 '21 03:12 FlavioFS