diff --git a/indra/CMakeLists.txt b/indra/CMakeLists.txt
index 1bfcb3fca2..dc0294c777 100644
--- a/indra/CMakeLists.txt
+++ b/indra/CMakeLists.txt
@@ -89,10 +89,10 @@ add_subdirectory(${LIBS_OPEN_PREFIX}llplugin)
add_subdirectory(${LIBS_OPEN_PREFIX}llui)
add_subdirectory(${LIBS_OPEN_PREFIX}viewer_components)
-#if (LL_TESTS OR NOT STANDALONE)
+if (LL_TESTS OR NOT STANDALONE)
# Legacy C++ tests. Build always, run if LL_TESTS is true.
-#add_subdirectory(${VIEWER_PREFIX}test)
-#endif (LL_TESTS OR NOT STANDALONE)
+add_subdirectory(${VIEWER_PREFIX}test)
+endif (LL_TESTS OR NOT STANDALONE)
# viewer media plugins
add_subdirectory(${LIBS_OPEN_PREFIX}media_plugins)
diff --git a/indra/cmake/00-Common.cmake b/indra/cmake/00-Common.cmake
index b475a1c7d8..3a0723d51c 100755
--- a/indra/cmake/00-Common.cmake
+++ b/indra/cmake/00-Common.cmake
@@ -158,14 +158,22 @@ if (LINUX)
OUTPUT_VARIABLE CXX_VERSION
OUTPUT_STRIP_TRAILING_WHITESPACE)
+ # Gentoo defines _FORTIFY_SOURCE by default
+ if (NOT ${GXX_VERSION} MATCHES "Gentoo 4.7.*")
+ #
+
if (${GXX_VERSION} STREQUAL ${CXX_VERSION})
-# add_definitions(-D_FORTIFY_SOURCE=2)
+ add_definitions(-D_FORTIFY_SOURCE=2)
else (${GXX_VERSION} STREQUAL ${CXX_VERSION})
if (NOT ${GXX_VERSION} MATCHES " 4.1.*Red Hat")
add_definitions(-D_FORTIFY_SOURCE=2)
endif (NOT ${GXX_VERSION} MATCHES " 4.1.*Red Hat")
endif (${GXX_VERSION} STREQUAL ${CXX_VERSION})
+ # Gentoo defines _FORTIFY_SOURCE by default
+ endif (NOT ${GXX_VERSION} MATCHES "Gentoo 4.7.*")
+ #
+
# Let's actually get a numerical version of gxx's version
STRING(REGEX REPLACE ".* ([0-9])\\.([0-9])\\.([0-9]).*" "\\1\\2\\3" CXX_VERSION_NUMBER ${CXX_VERSION})
@@ -181,6 +189,11 @@ if (LINUX)
set(CMAKE_CXX_FLAGS "-Wno-unused-but-set-variable ${CMAKE_CXX_FLAGS}")
endif (${CXX_VERSION_NUMBER} GREATER 460)
#
+ # Disable attribute warnings for GCC >= 4.7. It causes a lot of warning/errors in boost.
+ if(${CXX_VERSION_NUMBER} GREATER 470)
+ set(CMAKE_CXX_FLAGS "-Wno-attributes ${CMAKE_CXX_FLAGS}")
+ endif (${CXX_VERSION_NUMBER} GREATER 470)
+ #
# End of hacks.
diff --git a/indra/cmake/Copy3rdPartyLibs.cmake b/indra/cmake/Copy3rdPartyLibs.cmake
index 1fa011b7a2..d674e6d26a 100755
--- a/indra/cmake/Copy3rdPartyLibs.cmake
+++ b/indra/cmake/Copy3rdPartyLibs.cmake
@@ -272,12 +272,12 @@ elseif(LINUX)
libexpat.so
libexpat.so.1
libGLOD.so
- libgmock_main.so
- libgmock.so.0
+# libgmock_main.so
+# libgmock.so.0
libgmodule-2.0.so
libgobject-2.0.so
- libgtest_main.so
- libgtest.so.0
+# libgtest_main.so
+# libgtest.so.0
libhunspell-1.3.so.0.0.0
libminizip.so
libopenal.so
diff --git a/indra/cmake/LLAddBuildTest.cmake b/indra/cmake/LLAddBuildTest.cmake
index 9bb3077797..4b64e36943 100644
--- a/indra/cmake/LLAddBuildTest.cmake
+++ b/indra/cmake/LLAddBuildTest.cmake
@@ -1,6 +1,10 @@
# -*- cmake -*-
include(LLTestCommand)
-include(GoogleMock)
+
+# Google Mock/Test is not used
+#include(GoogleMock)
+#
+
include(Tut)
MACRO(LL_ADD_PROJECT_UNIT_TESTS project sources)
@@ -16,8 +20,9 @@ MACRO(LL_ADD_PROJECT_UNIT_TESTS project sources)
#
# WARNING: do NOT modify this code without working with poppy -
# there is another branch that will conflict heavily with any changes here.
-INCLUDE(GoogleMock)
-
+# Google Mock/Test is not used
+#INCLUDE(GoogleMock)
+#
IF(LL_TEST_VERBOSE)
MESSAGE("LL_ADD_PROJECT_UNIT_TESTS UNITTEST_PROJECT_${project} sources: ${sources}")
diff --git a/indra/llappearance/llwearabletype.h b/indra/llappearance/llwearabletype.h
index e51e6731d3..622114e232 100644
--- a/indra/llappearance/llwearabletype.h
+++ b/indra/llappearance/llwearabletype.h
@@ -35,6 +35,11 @@
class LLTranslationBridge
{
public:
+ // virtual dtor or dtors or derived class might not be properly called
+ virtual ~LLTranslationBridge()
+ { }
+ //
+
virtual std::string getString(const std::string &xml_desc) = 0;
};
diff --git a/indra/llaudio/llaudiodecodemgr.cpp b/indra/llaudio/llaudiodecodemgr.cpp
index 480b3934c3..cc60417982 100644
--- a/indra/llaudio/llaudiodecodemgr.cpp
+++ b/indra/llaudio/llaudiodecodemgr.cpp
@@ -645,6 +645,7 @@ void LLAudioDecodeMgr::Impl::processQueue(const F32 num_secs)
mCurrentDecodep = new LLVorbisDecodeState(uuid, d_path);
if (!mCurrentDecodep->initDecode())
{
+ gAudiop->markSoundCorrupt( uuid );
mCurrentDecodep = NULL;
}
}
@@ -671,6 +672,11 @@ void LLAudioDecodeMgr::processQueue(const F32 num_secs)
BOOL LLAudioDecodeMgr::addDecodeRequest(const LLUUID &uuid)
{
+ // Protect against corrupted sounds. Just do a quit exit instead of trying to decode over and over.
+ if( gAudiop->isCorruptSound( uuid ) )
+ return FALSE;
+ //
+
if (gAudiop->hasDecodedFile(uuid))
{
// Already have a decoded version, don't need to decode it.
diff --git a/indra/llaudio/llaudioengine.cpp b/indra/llaudio/llaudioengine.cpp
index f89b61c30f..aef5bb3f1e 100644
--- a/indra/llaudio/llaudioengine.cpp
+++ b/indra/llaudio/llaudioengine.cpp
@@ -676,6 +676,11 @@ void LLAudioEngine::cleanupBuffer(LLAudioBuffer *bufferp)
bool LLAudioEngine::preloadSound(const LLUUID &uuid)
{
+ // Protect against corrupted sounds. Just do a quick exit instead of trying to preload over and over again.
+ if( gAudiop->isCorruptSound( uuid ) )
+ return false;
+ //
+
gAudiop->getAudioData(uuid); // We don't care about the return value, this is just to make sure
// that we have an entry, which will mean that the audio engine knows about this
@@ -955,6 +960,11 @@ LLAudioSource * LLAudioEngine::findAudioSource(const LLUUID &source_id)
LLAudioData * LLAudioEngine::getAudioData(const LLUUID &audio_uuid)
{
+ // Protect against corrupted sounds. Just do a quick exit instead of trying to decode over and over again.
+ if( isCorruptSound( audio_uuid ) )
+ return 0;
+ //
+
data_map::iterator iter;
iter = mAllData.find(audio_uuid);
if (iter == mAllData.end())
@@ -1292,61 +1302,73 @@ std::map gSoundHistory;
// static
void LLAudioSource::logSoundPlay(LLUUID id, LLAudioSource* audio_source, LLVector3d position, S32 type, LLUUID assetid, LLUUID ownerid, LLUUID sourceid, bool is_trigger, bool is_looped)
{
- LLSoundHistoryItem item;
- item.mID = id;
- item.mAudioSource = audio_source;
- item.mPosition = position;
- item.mType = type;
- item.mAssetID = assetid;
- item.mOwnerID = ownerid;
- item.mSourceID = sourceid;
- item.mPlaying = true;
- item.mTimeStarted = LLTimer::getElapsedSeconds();
- item.mTimeStopped = F64_MAX;
- item.mIsTrigger = is_trigger;
- item.mIsLooped = is_looped;
+ // Corrupt asset, do not bother
+ if( gAudiop->isCorruptSound( assetid ) )
+ return;
+ //
- item.mReviewed = false;
- item.mReviewedCollision = false;
+ // Do not overflow our log here.
+ if( gSoundHistory.size() > 2048 )
+ pruneSoundLog();
+ if( gSoundHistory.size() > 2048 )
+ return; // Might clear out oldest entries before giving up?
+ //
- gSoundHistory[id] = item;
+ LLSoundHistoryItem item;
+ item.mID = id;
+ item.mAudioSource = audio_source;
+ item.mPosition = position;
+ item.mType = type;
+ item.mAssetID = assetid;
+ item.mOwnerID = ownerid;
+ item.mSourceID = sourceid;
+ item.mPlaying = true;
+ item.mTimeStarted = LLTimer::getElapsedSeconds();
+ item.mTimeStopped = F64_MAX;
+ item.mIsTrigger = is_trigger;
+ item.mIsLooped = is_looped;
+
+ item.mReviewed = false;
+ item.mReviewedCollision = false;
+
+ gSoundHistory[id] = item;
}
// static
void LLAudioSource::logSoundStop(LLUUID id)
{
- if(gSoundHistory.find(id) != gSoundHistory.end())
- {
- gSoundHistory[id].mPlaying = false;
- gSoundHistory[id].mTimeStopped = LLTimer::getElapsedSeconds();
- gSoundHistory[id].mAudioSource = NULL; // just in case
- pruneSoundLog();
- }
+ if(gSoundHistory.find(id) != gSoundHistory.end())
+ {
+ gSoundHistory[id].mPlaying = false;
+ gSoundHistory[id].mTimeStopped = LLTimer::getElapsedSeconds();
+ gSoundHistory[id].mAudioSource = NULL; // just in case
+ pruneSoundLog();
+ }
}
// static
void LLAudioSource::pruneSoundLog()
{
- if(++gSoundHistoryPruneCounter >= 64)
- {
- gSoundHistoryPruneCounter = 0;
- while(gSoundHistory.size() > 256)
- {
- std::map::iterator iter = gSoundHistory.begin();
- std::map::iterator end = gSoundHistory.end();
- U64 lowest_time = (*iter).second.mTimeStopped;
- LLUUID lowest_id = (*iter).first;
- for( ; iter != end; ++iter)
- {
- if((*iter).second.mTimeStopped < lowest_time)
- {
- lowest_time = (*iter).second.mTimeStopped;
- lowest_id = (*iter).first;
- }
- }
- gSoundHistory.erase(lowest_id);
- }
- }
+ if(++gSoundHistoryPruneCounter >= 64)
+ {
+ gSoundHistoryPruneCounter = 0;
+ while(gSoundHistory.size() > 256)
+ {
+ std::map::iterator iter = gSoundHistory.begin();
+ std::map::iterator end = gSoundHistory.end();
+ U64 lowest_time = (*iter).second.mTimeStopped;
+ LLUUID lowest_id = (*iter).first;
+ for( ; iter != end; ++iter)
+ {
+ if((*iter).second.mTimeStopped < lowest_time)
+ {
+ lowest_time = (*iter).second.mTimeStopped;
+ lowest_id = (*iter).first;
+ }
+ }
+ gSoundHistory.erase(lowest_id);
+ }
+ }
}
// NaCl End
@@ -1399,6 +1421,7 @@ void LLAudioSource::update()
{
llwarns << "Marking LLAudioSource corrupted for " << adp->getID() << llendl;
mCorrupted = true ;
+ gAudiop->markSoundCorrupt( adp->getID() );
}
}
}
@@ -1488,6 +1511,8 @@ bool LLAudioSource::play(const LLUUID &audio_uuid)
mAgeTimer.reset();
LLAudioData *adp = gAudiop->getAudioData(audio_uuid);
+ if( !adp )
+ return false;
addAudioData(adp);
if (isMuted())
@@ -1879,3 +1904,26 @@ bool LLAudioData::load()
mBufferp->mAudioDatap = this;
return true;
}
+
+// Protect against corrupted sounds
+
+const U32 ND_MAX_SOUNDRETRIES = 25;
+
+void LLAudioEngine::markSoundCorrupt( LLUUID const &aId )
+{
+ std::map::iterator itr = mCorruptData.find( aId );
+ if( mCorruptData.end() == itr )
+ mCorruptData[ aId ] = 1;
+ else if( itr->second != ND_MAX_SOUNDRETRIES )
+ itr->second += 1;
+}
+
+bool LLAudioEngine::isCorruptSound( LLUUID const &aId ) const
+{
+ std::map::const_iterator itr = mCorruptData.find( aId );
+ if( mCorruptData.end() == itr )
+ return false;
+
+ return itr->second == ND_MAX_SOUNDRETRIES;
+}
+//
diff --git a/indra/llaudio/llaudioengine.h b/indra/llaudio/llaudioengine.h
index b03e27aff3..b1117a9c47 100644
--- a/indra/llaudio/llaudioengine.h
+++ b/indra/llaudio/llaudioengine.h
@@ -253,6 +253,16 @@ protected:
private:
void setDefaults();
LLStreamingAudioInterface *mStreamingAudioImpl;
+
+ // Protect against corrupted sounds
+
+ std::map mCorruptData;
+
+public:
+ void markSoundCorrupt( LLUUID const & );
+ bool isCorruptSound( LLUUID const& ) const;
+
+ //
};
diff --git a/indra/llcharacter/llkeyframemotion.cpp b/indra/llcharacter/llkeyframemotion.cpp
index 01217925a3..017b17f504 100644
--- a/indra/llcharacter/llkeyframemotion.cpp
+++ b/indra/llcharacter/llkeyframemotion.cpp
@@ -2285,8 +2285,8 @@ void LLKeyframeDataCache::removeKeyframeData(const LLUUID& id)
keyframe_data_map_t::iterator found_data = sKeyframeDataMap.find(id);
if (found_data != sKeyframeDataMap.end())
{
- // FIRE-5385; Do not delete data directory, instead move it into the garbabe queue, so it gets deleted once no one holds a reference anymore.
- // Otherwise it leeads to memory corruption etc.
+ // FIRE-5385; Do not delete data directly, instead move it into the garbabe queue, so it gets deleted once no one holds a reference anymore.
+ // Otherwise it leads to memory corruption etc.
// delete found_data->second.mList;
// sKeyframeDataMap.erase(found_data);
@@ -2330,8 +2330,16 @@ LLKeyframeDataCache::~LLKeyframeDataCache()
//-----------------------------------------------------------------------------
void LLKeyframeDataCache::clear()
{
+ // FIRE-8144; Do not delete data directly, instead move it into the garbage queue, so it gets deleted once no one holds a reference anymore.
+ // Otherwise it leads to memory corruption etc.
+
+ // for( keyframe_data_map_t::iterator itr = sKeyframeDataMap.begin(); sKeyframeDataMap.end() != itr; ++itr )
+ // delete itr->second.mList;
+
for( keyframe_data_map_t::iterator itr = sKeyframeDataMap.begin(); sKeyframeDataMap.end() != itr; ++itr )
- delete itr->second.mList;
+ mGarbage.push_back( itr->second.mList );
+
+ //
sKeyframeDataMap.clear();
}
diff --git a/indra/llcorehttp/CMakeLists.txt b/indra/llcorehttp/CMakeLists.txt
index 9adfd0ed62..123c69a33a 100644
--- a/indra/llcorehttp/CMakeLists.txt
+++ b/indra/llcorehttp/CMakeLists.txt
@@ -3,7 +3,11 @@
project(llcorehttp)
include(00-Common)
-include(GoogleMock)
+
+# Google Mock/Test is not used
+#include(GoogleMock)
+#
+
include(CURL)
include(CARes)
include(OpenSSL)
diff --git a/indra/llmessage/CMakeLists.txt b/indra/llmessage/CMakeLists.txt
index 1a90c32fe4..b4d560260e 100644
--- a/indra/llmessage/CMakeLists.txt
+++ b/indra/llmessage/CMakeLists.txt
@@ -3,7 +3,11 @@
project(llmessage)
include(00-Common)
-include(GoogleMock)
+
+# Google Mock/Test is not used
+#include(GoogleMock)
+#
+
include(LLAddBuildTest)
include(LLCommon)
include(LLMath)
diff --git a/indra/llmessage/llcircuit.cpp b/indra/llmessage/llcircuit.cpp
index 0c2d4b823d..f199eb602f 100644
--- a/indra/llmessage/llcircuit.cpp
+++ b/indra/llmessage/llcircuit.cpp
@@ -120,6 +120,11 @@ LLCircuitData::LLCircuitData(const LLHost &host, TPACKETID in_id,
mPeriodTime = mt_sec;
mLocalEndPointID.generate();
+
+ // Throttle to prevent log spam.
+ mLastPacketLog = 0;
+ mLogMessagesSkipped = 0;
+ //
}
@@ -750,7 +755,22 @@ void LLCircuitData::checkPacketInID(TPACKETID id, BOOL receive_resent)
}
else
{
- llinfos << "packet_out_of_order - got packet " << id << " expecting " << index << " from " << mHost << llendl;
+ // Throttle to prevent log spam.
+
+ // llinfos << "packet_out_of_order - got packet " << id << " expecting " << index << " from " << mHost << llendl;
+
+ if( (LLTimer::getTotalSeconds() - mLastPacketLog ) > 15 )
+ {
+ llinfos << "packet_out_of_order - got packet " << id << " expecting " << index << " from " << mHost << llendl;
+ llinfos << mLogMessagesSkipped << " since last log entry" << llendl;
+ mLastPacketLog = LLTimer::getTotalSeconds();
+ mLogMessagesSkipped = 0;
+ }
+ else
+ ++mLogMessagesSkipped;
+
+ //
+
if(gMessageSystem->mVerboseLog)
{
std::ostringstream str;
diff --git a/indra/llmessage/llcircuit.h b/indra/llmessage/llcircuit.h
index 430d6358f7..11ce777656 100644
--- a/indra/llmessage/llcircuit.h
+++ b/indra/llmessage/llcircuit.h
@@ -276,6 +276,11 @@ protected:
const F32 mHeartbeatInterval;
const F32 mHeartbeatTimeout;
+
+ // Throttle to prevent log spam.
+ F64 mLastPacketLog;
+ U32 mLogMessagesSkipped;
+ //
};
diff --git a/indra/newview/fsconsoleutils.cpp b/indra/newview/fsconsoleutils.cpp
index 0ea73926a1..55594447c1 100644
--- a/indra/newview/fsconsoleutils.cpp
+++ b/indra/newview/fsconsoleutils.cpp
@@ -29,6 +29,7 @@
#include "fsconsoleutils.h"
+#include "fsfloaternearbychat.h"
#include "lggcontactsets.h"
#include "llagent.h"
#include "llconsole.h"
@@ -39,6 +40,13 @@
#include "llviewercontrol.h"
#include "rlvhandler.h"
+// static
+BOOL FSConsoleUtils::isNearbyChatVisible()
+{
+ FSFloaterNearbyChat* nearby_chat = LLFloaterReg::getTypedInstance("fs_nearby_chat", LLSD());
+ return nearby_chat->getVisible();
+}
+
// static
bool FSConsoleUtils::ProcessChatMessage(const LLChat& chat_msg, const LLSD &args)
{
@@ -96,7 +104,7 @@ bool FSConsoleUtils::ProcessChatMessage(const LLChat& chat_msg, const LLSD &args
LLColor4 chatcolor;
LLViewerChat::getChatColor(chat_msg, chatcolor);
gConsole->addConsoleLine(consoleChat, chatcolor);
- gConsole->setVisible(!LLFloaterReg::instanceVisible("fs_nearby_chat", LLSD()));
+ gConsole->setVisible(!isNearbyChatVisible());
}
else
{
@@ -119,7 +127,7 @@ bool FSConsoleUtils::ProcessChatMessage(const LLChat& chat_msg, const LLSD &args
LLColor4 chatcolor;
LLViewerChat::getChatColor(chat_msg, chatcolor);
gConsole->addConsoleLine(consoleChat, chatcolor);
- gConsole->setVisible(!LLFloaterReg::instanceVisible("fs_nearby_chat", LLSD()));
+ gConsole->setVisible(!isNearbyChatVisible());
}
return true;
@@ -175,7 +183,7 @@ void FSConsoleUtils::onProcessChatAvatarNameLookup(const LLUUID& agent_id, const
LLColor4 chatcolor;
LLViewerChat::getChatColor(chat_msg, chatcolor);
gConsole->addConsoleLine(consoleChat, chatcolor);
- gConsole->setVisible(!LLFloaterReg::instanceVisible("fs_nearby_chat", LLSD()));
+ gConsole->setVisible(!isNearbyChatVisible());
}
//static
@@ -272,5 +280,5 @@ void FSConsoleUtils::onProccessInstantMessageNameLookup(const LLUUID& agent_id,
}
gConsole->addConsoleLine("IM: " + senderName + delimiter + message, textColor);
- gConsole->setVisible(!LLFloaterReg::instanceVisible("fs_nearby_chat", LLSD()));
+ gConsole->setVisible(!isNearbyChatVisible());
}
diff --git a/indra/newview/fsconsoleutils.h b/indra/newview/fsconsoleutils.h
index f550a56f22..33af353bf6 100644
--- a/indra/newview/fsconsoleutils.h
+++ b/indra/newview/fsconsoleutils.h
@@ -39,7 +39,7 @@ public:
static bool ProcessInstantMessage(const LLUUID& session_id, const LLUUID& from_id, const std::string& message);
protected:
-
+ static BOOL isNearbyChatVisible();
static void onProcessChatAvatarNameLookup(const LLUUID& agent_id, const LLAvatarName& av_name, const LLChat& chat_msg);
static void onProccessInstantMessageNameLookup(const LLUUID& agent_id, const LLAvatarName& av_name, const std::string& message_str, const std::string& group);
diff --git a/indra/newview/llfloatertools.cpp b/indra/newview/llfloatertools.cpp
index f0386d7d1d..e123e9b641 100644
--- a/indra/newview/llfloatertools.cpp
+++ b/indra/newview/llfloatertools.cpp
@@ -264,14 +264,15 @@ BOOL LLFloaterTools::postBuild()
mCheckStretchTexture = getChild("checkbox stretch textures");
getChild("checkbox stretch textures")->setValue((BOOL)gSavedSettings.getBOOL("ScaleStretchTextures"));
mComboGridMode = getChild("combobox grid mode");
- //Phoenix:KC show highlight
+
+ // show highlight
+ //mCheckStretchUniformLabel = getChild("checkbox uniform label");
mCheckShowHighlight = getChild("checkbox show highlight");
mOrginalShowHighlight = gSavedSettings.getBOOL("RenderHighlightSelections");
mCheckShowHighlight->setValue(mOrginalShowHighlight);
mCheckActualRoot = getChild("checkbox actual root");
-
- //mCheckStretchUniformLabel = getChild("checkbox uniform label");
+ //
//
@@ -327,7 +328,7 @@ BOOL LLFloaterTools::postBuild()
sShowObjectCost = gSavedSettings.getBOOL("ShowObjectRenderingCost");
- //Phoenix:KC - added back more/less button
+ // Added back more/less button
LLButton* btnExpand = getChild("btnExpand");
if (btnExpand)
{
@@ -342,6 +343,7 @@ BOOL LLFloaterTools::postBuild()
{
gSavedSettings.setBOOL("FSToolboxExpanded", TRUE);
}
+ //
return TRUE;
}
@@ -369,8 +371,11 @@ LLFloaterTools::LLFloaterTools(const LLSD& key)
mComboGridMode(NULL),
mCheckStretchUniform(NULL),
mCheckStretchTexture(NULL),
- mCheckShowHighlight(NULL), //Phoenix:KC
- mCheckActualRoot(NULL), //Phoenix:KC
+ //
+ //mCheckStretchUniformLabel(NULL),
+ mCheckShowHighlight(NULL),
+ mCheckActualRoot(NULL),
+ //
mBtnRotateLeft(NULL),
mBtnRotateReset(NULL),
@@ -437,8 +442,10 @@ LLFloaterTools::LLFloaterTools(const LLSD& key)
mCommitCallbackRegistrar.add("BuildTool.LinkObjects", boost::bind(&LLSelectMgr::linkObjects, LLSelectMgr::getInstance()));
mCommitCallbackRegistrar.add("BuildTool.UnlinkObjects", boost::bind(&LLSelectMgr::unlinkObjects, LLSelectMgr::getInstance()));
+ //
mCommitCallbackRegistrar.add("BuildTool.CopyKeys", boost::bind(&LLFloaterTools::onClickBtnCopyKeys,this));
mCommitCallbackRegistrar.add("BuildTool.Expand", boost::bind(&LLFloaterTools::onClickExpand,this));
+ //
mLandImpactsObserver = new LLLandImpactsObserver();
LLViewerParcelMgr::getInstance()->addObserver(mLandImpactsObserver);
@@ -492,11 +499,7 @@ void LLFloaterTools::refresh()
// Refresh object and prim count labels
LLLocale locale(LLLocale::USER_LOCALE);
- //-TT 2.8.2 - from KC
- //std::string obj_count_string;
- //LLResMgr::getInstance()->getIntegerString(obj_count_string, LLSelectMgr::getInstance()->getSelection()->getRootObjectCount());
- //getChild("obj_count")->setTextArg("[COUNT]", obj_count_string);
-
+ //
std::string desc_string;
std::string num_string;
bool enable_link_count = true;
@@ -562,11 +565,7 @@ void LLFloaterTools::refresh()
}
getChild("link_num_obj_count")->setTextArg("[DESC]", desc_string);
getChild("link_num_obj_count")->setTextArg("[NUM]", num_string);
- // - KC
- std::string prim_count_string;
- LLResMgr::getInstance()->getIntegerString(prim_count_string, prim_count);
- // Was removed from floater_tools.xml as part of SH-1719
- //getChild("prim_count")->setTextArg("[COUNT]", prim_count_string);
+ //
#if 0
if (!gMeshRepo.meshRezEnabled())
{
@@ -640,14 +639,10 @@ void LLFloaterTools::refresh()
childSetVisible("selection_empty", !have_selection);
}
- // disable the object and prim counts if nothing selected
+ // disable the object and prim counts if nothing selected
bool have_selection = ! LLSelectMgr::getInstance()->getSelection()->isEmpty();
- //getChildView("obj_count")->setEnabled(have_selection);
getChildView("link_num_obj_count")->setEnabled(have_selection && enable_link_count);
- // Was removed from floater_tools.xml as part of SH-1719
- //getChildView("prim_count")->setEnabled(have_selection);
- // Was removed from floater_tools.xml as part of SH-1917 SH-1935
- //getChildView("RenderingCost")->setEnabled(have_selection && sShowObjectCost);
+ //
// Refresh child tabs
mPanelPermissions->refresh();
@@ -858,8 +853,11 @@ void LLFloaterTools::updatePopup(LLCoordGL center, MASK mask)
//mCheckSelectLinked ->setVisible( edit_visible );
if (mCheckStretchUniform) mCheckStretchUniform->setVisible( edit_visible );
if (mCheckStretchTexture) mCheckStretchTexture->setVisible( edit_visible );
- if (mCheckShowHighlight) mCheckShowHighlight->setVisible( edit_visible ); //Phoenix:KC
- if (mCheckActualRoot) mCheckActualRoot->setVisible( edit_visible ); //Phoenix:KC
+ //
+ //if (mCheckStretchUniformLabel) mCheckStretchUniformLabel->setVisible( edit_visible );
+ if (mCheckShowHighlight) mCheckShowHighlight->setVisible( edit_visible );
+ if (mCheckActualRoot) mCheckActualRoot->setVisible( edit_visible );
+ //
// Create buttons
BOOL create_visible = (tool == LLToolCompCreate::getInstance());
@@ -955,13 +953,11 @@ void LLFloaterTools::updatePopup(LLCoordGL center, MASK mask)
getChildView("Strength:")->setVisible( land_visible);
}
- //getChildView("link_num_obj_count")->setVisible( !land_visible);
- // Was removed from floater_tools.xml as part of SH-1719
- //getChildView("prim_count")->setVisible( !land_visible);
-
+ //
static LLCachedControl sFSToolboxExpanded(gSavedSettings, "FSToolboxExpanded", TRUE);
mTab->setVisible(!land_visible && sFSToolboxExpanded);
mPanelLandInfo->setVisible(land_visible && sFSToolboxExpanded);
+ //
bool have_selection = !LLSelectMgr::getInstance()->getSelection()->isEmpty();
@@ -988,7 +984,7 @@ void LLFloaterTools::onOpen(const LLSD& key)
mParcelSelection = LLViewerParcelMgr::getInstance()->getFloatingParcelSelection();
mObjectSelection = LLSelectMgr::getInstance()->getEditSelection();
- //Phoenix:KC - set the check box value from the saved setting
+ // Set the check box value from the saved setting
// this function runs on selection change
if (!mOpen)
{
@@ -996,6 +992,7 @@ void LLFloaterTools::onOpen(const LLSD& key)
mOrginalShowHighlight = gSavedSettings.getBOOL("RenderHighlightSelections");
mCheckShowHighlight->setValue(mOrginalShowHighlight);
}
+ //
std::string panel = key.asString();
if (!panel.empty())
@@ -1025,9 +1022,10 @@ void LLFloaterTools::onClose(bool app_quitting)
LLSelectMgr::getInstance()->promoteSelectionToRoot();
gSavedSettings.setBOOL("EditLinkedParts", FALSE);
- //Reset silhouette override -KC
+ //
gSavedSettings.setBOOL("RenderHighlightSelections", mOrginalShowHighlight);
mOpen = FALSE; //hack cause onOpen runs on every selection change but onClose doesnt.
+ //
gViewerWindow->showCursor();
diff --git a/indra/newview/llpanelface.cpp b/indra/newview/llpanelface.cpp
index fccaddb098..9592c637be 100644
--- a/indra/newview/llpanelface.cpp
+++ b/indra/newview/llpanelface.cpp
@@ -85,8 +85,10 @@ BOOL LLPanelFace::postBuild()
childSetCommitCallback("TexOffsetU",LLPanelFace::onCommitTextureInfo, this);
childSetCommitCallback("TexOffsetV",LLPanelFace::onCommitTextureInfo, this);
childSetAction("button align",&LLPanelFace::onClickAutoFix,this);
+ //
childSetAction("copytextures",&LLPanelFace::onClickCopy,this);
childSetAction("pastetextures",&LLPanelFace::onClickPaste,this);
+ //
LLTextureCtrl* mTextureCtrl;
LLColorSwatchCtrl* mColorSwatch;
@@ -507,12 +509,14 @@ void LLPanelFace::getState()
//
// //mBtnAutoFix->setEnabled ( editable );
// }
+ //
S32 selected_count = LLSelectMgr::getInstance()->getSelection()->getObjectCount();
BOOL single_volume = (LLSelectMgr::getInstance()->selectionAllPCode( LL_PCODE_VOLUME ))
&& (selected_count == 1);
getChildView("copytextures")->setEnabled(single_volume && editable);
getChildView("pastetextures")->setEnabled(editable);
getChildView("textbox params")->setEnabled(single_volume && editable);
+ //
getChildView("button apply")->setEnabled(editable);
bool identical;
diff --git a/indra/newview/llpreviewgesture.cpp b/indra/newview/llpreviewgesture.cpp
index 7e7f1c70e4..2bfaca0aba 100644
--- a/indra/newview/llpreviewgesture.cpp
+++ b/indra/newview/llpreviewgesture.cpp
@@ -503,7 +503,7 @@ void LLPreviewGesture::addKeys()
combo->add( NONE_LABEL );
for (KEY key = ' '; key < KEY_NONE; key++)
{
- char buffer[] = {key, '\0'};
+ char buffer[] = {(char)key, '\0'}; // Added (char) for proper array initialization
std::string str_org(buffer);
std::string str_translated = LLKeyboard::stringFromKey(key);
diff --git a/indra/newview/llsurfacepatch.cpp b/indra/newview/llsurfacepatch.cpp
index b822237a60..b85b7b99a5 100644
--- a/indra/newview/llsurfacepatch.cpp
+++ b/indra/newview/llsurfacepatch.cpp
@@ -232,8 +232,8 @@ void LLSurfacePatch::eval(const U32 x, const U32 y, const U32 stride, LLVector3
const F32 xyScaleInv = (1.f / xyScale)*(0.2222222222f);
F32 vec[3] = {
- fmod((F32)(mOriginGlobal.mdV[0] + x)*xyScaleInv, 256.f),
- fmod((F32)(mOriginGlobal.mdV[1] + y)*xyScaleInv, 256.f),
+ (F32)fmod((F32)(mOriginGlobal.mdV[0] + x)*xyScaleInv, 256.f), // Added (F32) for proper array initialization
+ (F32)fmod((F32)(mOriginGlobal.mdV[1] + y)*xyScaleInv, 256.f), // Added (F32) for proper array initialization
0.f
};
F32 rand_val = llclamp(noise2(vec)* 0.75f + 0.5f, 0.f, 1.f);
diff --git a/indra/newview/llviewermessage.cpp b/indra/newview/llviewermessage.cpp
index a8ca8d6a30..e9c46ccd11 100644
--- a/indra/newview/llviewermessage.cpp
+++ b/indra/newview/llviewermessage.cpp
@@ -2670,10 +2670,16 @@ void process_improved_im(LLMessageSystem *msg, void **user_data)
(gRlvHandler.canReceiveIM(from_id)) )
// [/RLVa:KB]
{
+ // Log autoresponse notification after initial message
+ bool has_session = true;
+
// return a standard "busy" message, but only do it to online IM
// (i.e. not other auto responses and not store-and-forward IM)
if (!gIMMgr->hasSession(session_id))
{
+ // Log autoresponse notification after initial message
+ has_session = false;
+
// if there is not a panel for this conversation (i.e. it is a new IM conversation
// initiated by the other party) then...
std::string my_name;
@@ -2703,25 +2709,10 @@ void process_improved_im(LLMessageSystem *msg, void **user_data)
IM_BUSY_AUTO_RESPONSE,
session_id);
gAgent.sendReliableMessage();
- // Fire-5389 - "Autoresponse Sent" message added to Firestorm as was in Phoenix
- gIMMgr->addMessage(
- session_id,
- from_id,
- LLStringUtil::null, // Pass null value so no name gets prepended
- LLTrans::getString("IM_autoresponse_sent"),
- my_name,
- IM_NOTHING_SPECIAL,
- parent_estate_id,
- region_id,
- position,
- false, // <-- Wow! This parameter is never handled!!!
- TRUE
- );
- //
}
// checkfor and process reqinfo
- if (gIMMgr->hasSession(session_id))
+ if (has_session)
{
message = FSData::getInstance()->processRequestForInfo(from_id,message,name,session_id);
}
@@ -2745,6 +2736,25 @@ void process_improved_im(LLMessageSystem *msg, void **user_data)
region_id,
position,
true);
+
+ if (!has_session)
+ {
+ // Fire-5389 - "Autoresponse Sent" message added to Firestorm as was in Phoenix
+ gIMMgr->addMessage(
+ session_id,
+ from_id,
+ LLStringUtil::null, // Pass null value so no name gets prepended
+ LLTrans::getString("IM_autoresponse_sent"),
+ name,
+ IM_NOTHING_SPECIAL,
+ parent_estate_id,
+ region_id,
+ position,
+ false, // <-- Wow! This parameter is never handled!!!
+ TRUE
+ );
+ //
+ }
}
else if (from_id.isNull())
{
@@ -5475,6 +5485,11 @@ void process_sound_trigger(LLMessageSystem *msg, void **)
msg->getUUIDFast(_PREHASH_SoundData, _PREHASH_OwnerID, owner_id);
msg->getUUIDFast(_PREHASH_SoundData, _PREHASH_ObjectID, object_id);
+ // Protect against corrupted sounds
+ if( gAudiop->isCorruptSound( sound_id ) )
+ return;
+ //
+
if(FSWSAssetBlacklist::getInstance()->isBlacklisted(sound_id,LLAssetType::AT_SOUND)){
return;
}
@@ -5588,6 +5603,11 @@ void process_preload_sound(LLMessageSystem *msg, void **user_data)
return;
// NaCl End
+ // Protect against corrupted sounds
+ if( gAudiop->isCorruptSound( sound_id ) )
+ return;
+ //
+
LLViewerObject *objectp = gObjectList.findObject(object_id);
if (!objectp) return;
diff --git a/indra/newview/llvoavatar.cpp b/indra/newview/llvoavatar.cpp
index 79955f171d..1761a4a9a9 100644
--- a/indra/newview/llvoavatar.cpp
+++ b/indra/newview/llvoavatar.cpp
@@ -761,8 +761,14 @@ LLVOAvatar::~LLVOAvatar()
debugAvatarRezTime("AvatarRezLeftNotification","left sometime after declouding");
}
- logPendingPhases();
+ // only call logPendingPhases if we're still alive. Otherwise this can lead to shutdown crashes
+
+ // logPendingPhases();
+ if (isAgentAvatarValid())
+ logPendingPhases();
+ //
+
lldebugs << "LLVOAvatar Destructor (0x" << this << ") id:" << mID << llendl;
std::for_each(mAttachmentPoints.begin(), mAttachmentPoints.end(), DeletePairedPointer());
diff --git a/indra/newview/llvoavatar.h b/indra/newview/llvoavatar.h
index 5de20f5d48..030613aadc 100755
--- a/indra/newview/llvoavatar.h
+++ b/indra/newview/llvoavatar.h
@@ -993,7 +993,11 @@ extern const S32 MAX_TEXTURE_VIRTURE_SIZE_RESET_INTERVAL;
std::string get_sequential_numbered_file_name(const std::string& prefix,
const std::string& suffix);
+
+// Remove LLVolatileAPRPool/apr_file_t and use FILE* instead
void dump_visual_param(apr_file_t* file, LLVisualParam* viewer_param, F32 value);
+void dump_visual_param(LLAPRFile::tFiletype* file, LLVisualParam* viewer_param, F32 value);
+//
#endif // LL_VOAVATAR_H
diff --git a/indra/newview/llvoavatarself.cpp b/indra/newview/llvoavatarself.cpp
index ecd4f242b9..39517eef98 100644
--- a/indra/newview/llvoavatarself.cpp
+++ b/indra/newview/llvoavatarself.cpp
@@ -3440,7 +3440,11 @@ void LLVOAvatarSelf::dumpScratchTextureByteCount()
void LLVOAvatarSelf::dumpWearableInfo(LLAPRFile& outfile)
{
- apr_file_t* file = outfile.getFileHandle();
+ // Remove LLVolatileAPRPool/apr_file_t and use FILE* instead
+ // apr_file_t* file = outfile.getFileHandle();
+ LLAPRFile::tFiletype* file = outfile.getFileHandle();
+ //
+
if (!file)
{
return;
diff --git a/indra/newview/skins/default/xui/es/strings.xml b/indra/newview/skins/default/xui/es/strings.xml
index 21736e129f..f7302c6677 100644
--- a/indra/newview/skins/default/xui/es/strings.xml
+++ b/indra/newview/skins/default/xui/es/strings.xml
@@ -5081,6 +5081,8 @@ Inténtalo incluyendo la ruta de acceso al editor entre comillas
Contact sets
Vista subjetiva
Crear hito
+ Historial de teleportes
+ Pose
Información sobre el terreno que vas a visitar
@@ -5180,6 +5182,12 @@ Inténtalo incluyendo la ruta de acceso al editor entre comillas
Crea un hito en tu posición actual
+
+ Abre el historial de teleportes
+
+
+ Pose del avatar para ajustar accesorios
+
actualmente en tu barra de herramientas inferior
diff --git a/indra/test/CMakeLists.txt b/indra/test/CMakeLists.txt
index 31e1d89c68..31e739a440 100644
--- a/indra/test/CMakeLists.txt
+++ b/indra/test/CMakeLists.txt
@@ -14,7 +14,9 @@ include(Linking)
include(Tut)
include(LLAddBuildTest)
-include(GoogleMock)
+# Google Mock/Test is not used
+#include(GoogleMock)
+#
include_directories(
${LLCOMMON_INCLUDE_DIRS}
diff --git a/indra/test/test.cpp b/indra/test/test.cpp
index dc8580fe69..4173c677dc 100644
--- a/indra/test/test.cpp
+++ b/indra/test/test.cpp
@@ -51,11 +51,16 @@
# include "ctype_workaround.h"
#endif
+// Google Mock/Test is not used an either Windows/Mac/Linux
+#if 0
+
#ifndef LL_WINDOWS
#include
#include
#endif
+#endif
+//
#if LL_MSVC
#pragma warning (push)
#pragma warning (disable : 4702) // warning C4702: unreachable code
@@ -486,9 +491,17 @@ int main(int argc, char **argv)
{
// The following line must be executed to initialize Google Mock
// (and Google Test) before running the tests.
+
+// Google Mock/Test is not used an either Windows/Mac/Linux
+#if 0
+
#ifndef LL_WINDOWS
::testing::InitGoogleMock(&argc, argv);
#endif
+
+#endif
+//
+
// LOGTEST overrides default, but can be overridden by --debug or LOGFAIL.
const char* LOGTEST = getenv("LOGTEST");
if (LOGTEST)