From f27438b1c68025fe1414c35fb120ce852dcb31bc Mon Sep 17 00:00:00 2001
From: maksymsproductengine <maksymsproductengine@lindenlab.com>
Date: Fri, 17 Jan 2014 20:32:30 +0200
Subject: [PATCH] MAINT-3536 FIXED new crash in XML_ParserFree: temporary
 solution

---
 indra/newview/llchannelmanager.cpp | 50 ++++++++++++++++--------------
 1 file changed, 27 insertions(+), 23 deletions(-)

diff --git a/indra/newview/llchannelmanager.cpp b/indra/newview/llchannelmanager.cpp
index 8b2d9e639fe..fa23251d958 100755
--- a/indra/newview/llchannelmanager.cpp
+++ b/indra/newview/llchannelmanager.cpp
@@ -113,29 +113,33 @@ void LLChannelManager::onLoginCompleted()
 	}
 	else
 	{
-		// create a channel for the StartUp Toast
-		LLScreenChannelBase::Params p;
-		p.id = LLUUID(gSavedSettings.getString("StartUpChannelUUID"));
-		p.channel_align = CA_RIGHT;
-		mStartUpChannel = createChannel(p);
-
-		if(!mStartUpChannel)
-		{
-			onStartUpToastClose();
-		}
-		else
-		{
-			gViewerWindow->getRootView()->addChild(mStartUpChannel);
-
-			// init channel's position and size
-			S32 channel_right_bound = gViewerWindow->getWorldViewRectScaled().mRight - gSavedSettings.getS32("NotificationChannelRightMargin"); 
-			S32 channel_width = gSavedSettings.getS32("NotifyBoxWidth");
-			mStartUpChannel->init(channel_right_bound - channel_width, channel_right_bound);
-			mStartUpChannel->setMouseDownCallback(boost::bind(&LLNotificationWellWindow::onStartUpToastClick, LLNotificationWellWindow::getInstance(), _2, _3, _4));
-
-			mStartUpChannel->setCommitCallback(boost::bind(&LLChannelManager::onStartUpToastClose, this));
-			mStartUpChannel->createStartUpToast(away_notifications, gSavedSettings.getS32("StartUpToastLifeTime"));
-		}
+		// TODO: Seems this code leads to MAINT-3536 new crash in XML_ParserFree.
+		// Need to investigate this and fix possible problems with notifications in startup time
+		// Viewer can normally receive and show of postponed notifications about purchasing in marketplace on startup time.
+		// Other types of postponed notifications did not tested.
+		//// create a channel for the StartUp Toast
+		//LLScreenChannelBase::Params p;
+		//p.id = LLUUID(gSavedSettings.getString("StartUpChannelUUID"));
+		//p.channel_align = CA_RIGHT;
+		//mStartUpChannel = createChannel(p);
+
+		//if(!mStartUpChannel)
+		//{
+		//	onStartUpToastClose();
+		//}
+		//else
+		//{
+		//	gViewerWindow->getRootView()->addChild(mStartUpChannel);
+
+		//	// init channel's position and size
+		//	S32 channel_right_bound = gViewerWindow->getWorldViewRectScaled().mRight - gSavedSettings.getS32("NotificationChannelRightMargin"); 
+		//	S32 channel_width = gSavedSettings.getS32("NotifyBoxWidth");
+		//	mStartUpChannel->init(channel_right_bound - channel_width, channel_right_bound);
+		//	mStartUpChannel->setMouseDownCallback(boost::bind(&LLNotificationWellWindow::onStartUpToastClick, LLNotificationWellWindow::getInstance(), _2, _3, _4));
+
+		//	mStartUpChannel->setCommitCallback(boost::bind(&LLChannelManager::onStartUpToastClose, this));
+		//	mStartUpChannel->createStartUpToast(away_notifications, gSavedSettings.getS32("StartUpToastLifeTime"));
+		//}
 	}
 
 	LLPersistentNotificationStorage::getInstance()->loadNotifications();
-- 
GitLab