diff --git a/indra/llcommon/llerror.cpp b/indra/llcommon/llerror.cpp
index 9b0141eb76717dc363d90010f46577db8146766b..d2af004cde71a209ae084c0eecd5478f5ab11839 100755
--- a/indra/llcommon/llerror.cpp
+++ b/indra/llcommon/llerror.cpp
@@ -201,10 +201,7 @@ namespace {
 		virtual void recordMessage(LLError::ELevel level,
 								   const std::string& message)
 		{
-			llutf16string utf16str =
-				wstring_to_utf16str(utf8str_to_wstring(message));
-			utf16str += '\n';
-			OutputDebugString(utf16str.c_str());
+			LL_WINDOWS_OUTPUT_DEBUG(message);
 		}
 	};
 #endif
@@ -1401,5 +1398,27 @@ namespace LLError
    {
        sIndex = 0 ;
    }
+
+#if LL_WINDOWS
+	void LLOutputDebugUTF8(const std::string& s)
+	{
+		// Be careful when calling OutputDebugString as it throws DBG_PRINTEXCEPTION_C 
+		// which works just fine under the windows debugger, but can cause users who
+		// have enabled SEHOP exception chain validation to crash due to interactions
+		// between the Win 32-bit exception handling and boost coroutine fiber stacks. BUG-2707
+		//
+		if (IsDebuggerPresent())
+		{
+			// Need UTF16 for Unicode OutputDebugString
+			//
+			if (s.size())
+			{
+				OutputDebugString(utf8str_to_utf16str(s).c_str());
+				OutputDebugString(TEXT("\n"));
+			}
+		}
+	}
+#endif
+
 }
 
diff --git a/indra/llcommon/llerror.h b/indra/llcommon/llerror.h
index b65b4101531fb6d42be69dfe6ec4315f0f48acc9..0b723aeb5d00df1565a0852b7ca05e6ea81d40ab 100755
--- a/indra/llcommon/llerror.h
+++ b/indra/llcommon/llerror.h
@@ -34,7 +34,6 @@
 #include "llerrorlegacy.h"
 #include "stdtypes.h"
 
-
 /** Error Logging Facility
 
 	Information for most users:
@@ -199,8 +198,20 @@ namespace LLError
        static void clear() ;
 	   static void end(std::ostringstream* _out) ;
    }; 
+
+#if LL_WINDOWS
+	void LLOutputDebugUTF8(const std::string& s);
+#endif
+
 }
 
+#if LL_WINDOWS
+	// Macro accepting a std::string for display in windows debugging console
+	#define LL_WINDOWS_OUTPUT_DEBUG(a) LLError::LLOutputDebugUTF8(a)
+#else
+	#define LL_WINDOWS_OUTPUT_DEBUG(a)
+#endif
+
 //this is cheaper than llcallstacks if no need to output other variables to call stacks. 
 #define llpushcallstacks LLError::LLCallStacks::push(__FUNCTION__, __LINE__)
 #define llcallstacks \
diff --git a/indra/llui/llxuiparser.cpp b/indra/llui/llxuiparser.cpp
index 3ad5ad7d425dfeda1f2ecb9d2bc9c00dfbddb0ab..6322da91235d90a3084371f61d8d03503828b2cd 100755
--- a/indra/llui/llxuiparser.cpp
+++ b/indra/llui/llxuiparser.cpp
@@ -1309,10 +1309,8 @@ bool LLXUIParser::writeSDValue(Parser& parser, const void* val_ptr, name_stack_t
 void LLXUIParser::parserWarning(const std::string& message)
 {
 #ifdef LL_WINDOWS
-	// use Visual Studo friendly formatting of output message for easy access to originating xml
-	llutf16string utf16str = utf8str_to_utf16str(llformat("%s(%d):\t%s", mCurFileName.c_str(), mCurReadNode->getLineNumber(), message.c_str()).c_str());
-	utf16str += '\n';
-	OutputDebugString(utf16str.c_str());
+	// use Visual Studio friendly formatting of output message for easy access to originating xml
+	LL_WINDOWS_OUTPUT_DEBUG(llformat("%s(%d):\t%s", mCurFileName.c_str(), mCurReadNode->getLineNumber(), message.c_str()));
 #else
 	Parser::parserWarning(message);
 #endif
@@ -1321,9 +1319,8 @@ void LLXUIParser::parserWarning(const std::string& message)
 void LLXUIParser::parserError(const std::string& message)
 {
 #ifdef LL_WINDOWS
-	llutf16string utf16str = utf8str_to_utf16str(llformat("%s(%d):\t%s", mCurFileName.c_str(), mCurReadNode->getLineNumber(), message.c_str()).c_str());
-	utf16str += '\n';
-	OutputDebugString(utf16str.c_str());
+        // use Visual Studio friendly formatting of output message for easy access to originating xml
+	LL_WINDOWS_OUTPUT_DEBUG(llformat("%s(%d):\t%s", mCurFileName.c_str(), mCurReadNode->getLineNumber(), message.c_str()));
 #else
 	Parser::parserError(message);
 #endif
@@ -1640,10 +1637,8 @@ bool LLSimpleXUIParser::processText()
 void LLSimpleXUIParser::parserWarning(const std::string& message)
 {
 #ifdef LL_WINDOWS
-	// use Visual Studo friendly formatting of output message for easy access to originating xml
-	llutf16string utf16str = utf8str_to_utf16str(llformat("%s(%d):\t%s", mCurFileName.c_str(), LINE_NUMBER_HERE, message.c_str()).c_str());
-	utf16str += '\n';
-	OutputDebugString(utf16str.c_str());
+	// use Visual Studio friendly formatting of output message for easy access to originating xml
+	LL_WINDOWS_OUTPUT_DEBUG(llformat("%s(%d):\t%s", mCurFileName.c_str(), LINE_NUMBER_HERE, message.c_str()));
 #else
 	Parser::parserWarning(message);
 #endif
@@ -1652,9 +1647,8 @@ void LLSimpleXUIParser::parserWarning(const std::string& message)
 void LLSimpleXUIParser::parserError(const std::string& message)
 {
 #ifdef LL_WINDOWS
-	llutf16string utf16str = utf8str_to_utf16str(llformat("%s(%d):\t%s", mCurFileName.c_str(), LINE_NUMBER_HERE, message.c_str()).c_str());
-	utf16str += '\n';
-	OutputDebugString(utf16str.c_str());
+        // use Visual Studio friendly formatting of output message for easy access to originating xml
+	LL_WINDOWS_OUTPUT_DEBUG(llformat("%s(%d):\t%s", mCurFileName.c_str(), LINE_NUMBER_HERE, message.c_str()));
 #else
 	Parser::parserError(message);
 #endif
diff --git a/indra/newview/llpanelface.cpp b/indra/newview/llpanelface.cpp
index 2f6c285a804f6b80050fd316434cf6359b9e3bce..d873cab59a0b35d6616020bc709751fdf4092798 100755
--- a/indra/newview/llpanelface.cpp
+++ b/indra/newview/llpanelface.cpp
@@ -1513,6 +1513,10 @@ void LLPanelFace::onSelectColor(const LLSD& data)
 void LLPanelFace::onCommitMaterialsMedia(LLUICtrl* ctrl, void* userdata)
 {
 	LLPanelFace* self = (LLPanelFace*) userdata;
+	LLUUID specmap = getCurrentSpecularMap();
+	LLUUID normmap = getCurrentNormalMap();
+	self->updateShinyControls(!specmap.isNull(), true);
+	self->updateBumpyControls(!normmap.isNull(), true);
 	self->updateUI();
 }