From a46794bcff15b70ab4e5e04ce12d118579b72245 Mon Sep 17 00:00:00 2001 From: James Cook Date: Wed, 18 Nov 2009 14:27:58 -0800 Subject: EXT-2579 Fix memory leak/bloat due to /me IRC-style emotes. Pending review with Richard/Leyla --- indra/newview/llchatitemscontainerctrl.cpp | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'indra/newview/llchatitemscontainerctrl.cpp') diff --git a/indra/newview/llchatitemscontainerctrl.cpp b/indra/newview/llchatitemscontainerctrl.cpp index 997aed4277..56b7520bd5 100644 --- a/indra/newview/llchatitemscontainerctrl.cpp +++ b/indra/newview/llchatitemscontainerctrl.cpp @@ -188,7 +188,17 @@ void LLNearbyChatToastPanel::init(LLSD& notification) } mText = mText.substr(3); style_params.font.style = "UNDERLINE"; +#define INFINITE_REFLOW_BUG 0 +#if INFINITE_REFLOW_BUG + // This causes LLTextBase::reflow() to infinite loop until the viewer + // runs out of memory, throws a bad_alloc exception from std::vector + // in mLineInfoList, and the main loop catches it and continues. + // It appears to be caused by addText() adding a line separator in the + // middle of a line. See EXT-2579, EXT-1949 msg_text->addText(mText,style_params); +#else + msg_text->appendText(mText, FALSE, style_params); +#endif } else { -- cgit v1.2.3 From 203490e2a0915c5ce59ccacba420388327f9143b Mon Sep 17 00:00:00 2001 From: James Cook Date: Wed, 18 Nov 2009 14:29:01 -0800 Subject: Change /me emote formatting to pure italics, not underlined. Review pending with Richard/Leyla --- indra/newview/llchatitemscontainerctrl.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'indra/newview/llchatitemscontainerctrl.cpp') diff --git a/indra/newview/llchatitemscontainerctrl.cpp b/indra/newview/llchatitemscontainerctrl.cpp index 56b7520bd5..8a6935b71b 100644 --- a/indra/newview/llchatitemscontainerctrl.cpp +++ b/indra/newview/llchatitemscontainerctrl.cpp @@ -187,7 +187,7 @@ void LLNearbyChatToastPanel::init(LLSD& notification) msg_text->setText(mFromName, style_params); } mText = mText.substr(3); - style_params.font.style = "UNDERLINE"; + style_params.font.style = "ITALIC"; #define INFINITE_REFLOW_BUG 0 #if INFINITE_REFLOW_BUG // This causes LLTextBase::reflow() to infinite loop until the viewer -- cgit v1.2.3