From 07e263e85455bf3d91b1b761e1318e1f297321fd Mon Sep 17 00:00:00 2001 From: Cinders Date: Thu, 20 Dec 2012 22:45:58 -0700 Subject: [PATCH 1/8] FIRE-5118: Lightshare bug fix --- indra/newview/fslightshare.cpp | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/indra/newview/fslightshare.cpp b/indra/newview/fslightshare.cpp index 68e6035794..05570c1f92 100644 --- a/indra/newview/fslightshare.cpp +++ b/indra/newview/fslightshare.cpp @@ -127,12 +127,12 @@ void FSLightshare::processSky(LightsharePacket* ls_packet) param_set.setEnableCloudScrollY(!ls_packet->cloudScrollYLock); param_set.setStarBrightness(ls_packet->starBrightness); - LLWLParamManager::getInstance()->propagateParameters(); - LLWLParamKey ls_key; ls_key.name = "LightshareCurrentRegion"; ls_key.scope = LLEnvKey::SCOPE_LOCAL; wlparammgr->setParamSet(ls_key, param_set); + + wlparammgr->propagateParameters(); } // static @@ -175,11 +175,11 @@ void FSLightshare::processWater(LightsharePacket* ls_packet) normalMapTexture.set(out); - LLWaterParamManager::getInstance()->setNormalMapID(normalMapTexture); - LLWaterParamManager::getInstance()->propagateParameters(); - + wwparammgr->setNormalMapID(normalMapTexture); wwparammgr->setParamSet("LightshareCurrentRegion", param_set); wwparammgr->setNormalMapID(normalMapTexture); + + wwparammgr->propagateParameters(); } void FSLightshare::setState(bool has_lightshare) From 302557b4fa59965e196b37f7635c8b3a4c69ec95 Mon Sep 17 00:00:00 2001 From: Nicky Date: Fri, 21 Dec 2012 20:28:50 +0100 Subject: [PATCH 2/8] Prevent reading past message buffers and crashing then. --- indra/llmessage/lldatapacker.h | 15 ++++++++--- indra/llmessage/llmessagetemplate.h | 17 ++++++++++++- indra/llmessage/lltemplatemessagereader.cpp | 28 ++++++++++++++++++--- 3 files changed, 52 insertions(+), 8 deletions(-) diff --git a/indra/llmessage/lldatapacker.h b/indra/llmessage/lldatapacker.h index b0a638c16e..940c797b77 100644 --- a/indra/llmessage/lldatapacker.h +++ b/indra/llmessage/lldatapacker.h @@ -199,9 +199,18 @@ inline BOOL LLDataPackerBinaryBuffer::verifyLength(const S32 data_size, const ch { if (mWriteEnabled && (mCurBufferp - mBufferp) > mBufferSize - data_size) { - llwarns << "Buffer overflow in BinaryBuffer length verify, field name " << name << "!" << llendl; - llwarns << "Current pos: " << (int)(mCurBufferp - mBufferp) << " Buffer size: " << mBufferSize << " Data size: " << data_size << llendl; - return FALSE; + // Handle invalid packets by throwing an exception and a graceful continue + + // llwarns << "Buffer overflow in AsciiBuffer length verify, field name " << name << "!" << llendl; + // llwarns << "Current pos: " << (int)(mCurBufferp - mBufferp) << " Buffer size: " << mBufferSize << " Data size: " << data_size << llendl; + // return FALSE; + + std::stringstream strm; + strm << "Buffer overflow in BinaryBuffer length verify, field name " << name << "!" << std::endl; + strm << "Current pos: " << (int)(mCurBufferp - mBufferp) << " Buffer size: " << mBufferSize << " Data size: " << data_size << std::endl; + throw std::string( strm.str() ); + + // } return TRUE; diff --git a/indra/llmessage/llmessagetemplate.h b/indra/llmessage/llmessagetemplate.h index 16d825d33b..370810e688 100644 --- a/indra/llmessage/llmessagetemplate.h +++ b/indra/llmessage/llmessagetemplate.h @@ -365,7 +365,22 @@ public: if (mHandlerFunc) { LLPerfBlock msg_cb_time("msg_cb", mName); - mHandlerFunc(msgsystem, mUserData); + + // Handle invalid packets by throwing an exception and a graceful continue + + // mHandlerFunc(msgsystem, mUserData); + + try + { + mHandlerFunc(msgsystem, mUserData); + } + catch( std::string &why ) + { + llwarns << why << llendl; + } + + // + return TRUE; } return FALSE; diff --git a/indra/llmessage/lltemplatemessagereader.cpp b/indra/llmessage/lltemplatemessagereader.cpp index ab91f74abe..f10098039b 100644 --- a/indra/llmessage/lltemplatemessagereader.cpp +++ b/indra/llmessage/lltemplatemessagereader.cpp @@ -508,21 +508,41 @@ BOOL LLTemplateMessageReader::decodeTemplate( void LLTemplateMessageReader::logRanOffEndOfPacket( const LLHost& host, const S32 where, const S32 wanted ) { + // Handle invalid packets by throwing an exception and a graceful continue + // we've run off the end of the packet! - llwarns << "Ran off end of packet " << mCurrentRMessageTemplate->mName + +// llwarns << "Ran off end of packet " << mCurrentRMessageTemplate->mName +// // << " with id " << mCurrentRecvPacketID +// << " from " << host +// << " trying to read " << wanted +// << " bytes at position " << where +// << " going past packet end at " << mReceiveSize +// << llendl; +// if(gMessageSystem->mVerboseLog) +// { +// llinfos << "MSG: -> " << host << "\tREAD PAST END:\t" +// // << mCurrentRecvPacketID << " " +// << getMessageName() << llendl; +// } +// gMessageSystem->callExceptionFunc(MX_RAN_OFF_END_OF_PACKET); + + std::stringstream strm; + strm << "Ran off end of packet " << mCurrentRMessageTemplate->mName // << " with id " << mCurrentRecvPacketID << " from " << host << " trying to read " << wanted << " bytes at position " << where << " going past packet end at " << mReceiveSize - << llendl; + << std::endl; if(gMessageSystem->mVerboseLog) { - llinfos << "MSG: -> " << host << "\tREAD PAST END:\t" + strm << "MSG: -> " << host << "\tREAD PAST END:\t" // << mCurrentRecvPacketID << " " - << getMessageName() << llendl; + << getMessageName() << std::endl; } gMessageSystem->callExceptionFunc(MX_RAN_OFF_END_OF_PACKET); + throw std::string( strm.str() ); } static LLFastTimer::DeclareTimer FTM_PROCESS_MESSAGES("Process Messages"); From 21f13e8b8793d218b12cdc31b022f02ac54b2a1c Mon Sep 17 00:00:00 2001 From: Nicky Date: Fri, 21 Dec 2012 23:25:22 +0100 Subject: [PATCH 3/8] Prevent log spam by only trying to connect to a host when it is valid. --- indra/llmessage/lliosocket.cpp | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/indra/llmessage/lliosocket.cpp b/indra/llmessage/lliosocket.cpp index 5e37912723..fb7e9ea75c 100644 --- a/indra/llmessage/lliosocket.cpp +++ b/indra/llmessage/lliosocket.cpp @@ -213,6 +213,11 @@ LLSocket::ptr_t LLSocket::create(apr_socket_t* socket, apr_pool_t* pool) bool LLSocket::blockingConnect(const LLHost& host) { + // Prevent log spam + if( !host.isOk() ) + return false; + // + if(!mSocket) return false; apr_sockaddr_t* sa = NULL; std::string ip_address; From 5c79512231fe5176f776abef5a2a72ccdb494f39 Mon Sep 17 00:00:00 2001 From: Ansariel Date: Sat, 22 Dec 2012 01:15:47 +0100 Subject: [PATCH 4/8] FIRE-8560: Friends List in People Panel Fails to Load --- indra/newview/llstartup.cpp | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/indra/newview/llstartup.cpp b/indra/newview/llstartup.cpp index 01c9616906..bd0cf67d92 100755 --- a/indra/newview/llstartup.cpp +++ b/indra/newview/llstartup.cpp @@ -229,7 +229,7 @@ #include "fswsassetblacklist.h" // For Assetblacklist init on startup #include "fsfloatersearchlegacy.h" // FIRE-6310 - +#include "llfloatersidepanelcontainer.h" // @@ -1673,6 +1673,13 @@ LLWorld::getInstance()->addRegion(gFirstSimHandle, gFirstSim, first_sim_size_x, llinfos << "Constructed " << pContacts->getTitle() << llendl; // + // FIRE-8560/FIRE-8592: We neet to create the instance of the people + // floater for the radar functions and the V2 friendlist here. + // This is because of the standalone group panels that will + // prevent doing this at login when receiving the agent group + // data update. + LLFloaterSidePanelContainer::getPanel("people", "panel_people"); + //gCacheName is required for nearby chat history loading //so I just moved nearby history loading a few states further if (gSavedPerAccountSettings.getBOOL("LogShowHistory")) @@ -2421,12 +2428,6 @@ LLWorld::getInstance()->addRegion(gFirstSimHandle, gFirstSim, first_sim_size_x, set_startup_status(1.0, "", ""); display_startup(); - // FIRE-8592: We neet to create the instance of the people - // floater for the radar functions here. This is because - // of the standalone group panels that will prevent doing - // this at login when receiving the agent group data update. - LLFloaterReg::getInstance("people"); - // #ifdef HAS_OPENSIM_SUPPORT // if (LLGridManager::getInstance()->isInOpenSim()) From bd539c8d3248f656c124df25d5cd05a261668d6a Mon Sep 17 00:00:00 2001 From: Ansariel Date: Sat, 22 Dec 2012 01:48:53 +0100 Subject: [PATCH 5/8] Fixed group/list/show SLURL command to respect "FSUseV2Friends" debug setting and open the correct group list --- indra/newview/llgroupactions.cpp | 19 ++++++++++++++++--- 1 file changed, 16 insertions(+), 3 deletions(-) diff --git a/indra/newview/llgroupactions.cpp b/indra/newview/llgroupactions.cpp index c02c665243..ab217c0051 100644 --- a/indra/newview/llgroupactions.cpp +++ b/indra/newview/llgroupactions.cpp @@ -51,6 +51,7 @@ #include "fsfloatergroup.h" #include "llpanelgroup.h" // +#include "fscontactsfloater.h" // // Globals @@ -91,9 +92,21 @@ public: { if (tokens[1].asString() == "show") { - LLSD params; - params["people_panel_tab_name"] = "groups_panel"; - LLFloaterSidePanelContainer::showPanel("people", "panel_people", params); + // Obey FSUseV2Friends setting where to open the group list + //LLSD params; + //params["people_panel_tab_name"] = "groups_panel"; + //LLFloaterSidePanelContainer::showPanel("people", "panel_people", params); + if (gSavedSettings.getBOOL("FSUseV2Friends")) + { + LLSD params; + params["people_panel_tab_name"] = "groups_panel"; + LLFloaterSidePanelContainer::showPanel("people", "panel_people", params); + } + else + { + FSFloaterContacts::getInstance()->openTab("groups"); + } + // return true; } return false; From 16d619ab2df12268fcf497c98fcfa9ea4752ea9d Mon Sep 17 00:00:00 2001 From: Ansariel Date: Sat, 22 Dec 2012 01:56:03 +0100 Subject: [PATCH 6/8] Cleaned up Firestorm specific includes in llstartup.cpp --- indra/newview/llstartup.cpp | 33 +++++++++------------------------ 1 file changed, 9 insertions(+), 24 deletions(-) diff --git a/indra/newview/llstartup.cpp b/indra/newview/llstartup.cpp index bd0cf67d92..0f72240593 100755 --- a/indra/newview/llstartup.cpp +++ b/indra/newview/llstartup.cpp @@ -191,46 +191,31 @@ #include "llvoicechannel.h" #include "llpathfindingmanager.h" -// [RLVa:KB] - Checked: 2010-02-27 (RLVa-1.2.0a) -#include "rlvhandler.h" -// [/RLVa:KB] - #include "lllogin.h" #include "llevents.h" #include "llstartuplistener.h" #include "lltoolbarview.h" -#include "tea.h" // - #if LL_WINDOWS #include "lldxhardware.h" #endif -#include "llnotificationmanager.h" - +// Firestorm includes #if HAS_GROWL #include "growlmanager.h" #endif -#include "streamtitledisplay.h" +#include "fscontactsfloater.h" #include "fsdata.h" - -// NaCl - Antispam Registry -#include "NACLantispam.h" -// NaCl End -// [RLVa:KB] - Checked: 2010-02-27 (RLVa-1.2.0a) -#include "rlvhandler.h" -// [/RLVa:KB] -//-TT Bridge +#include "fsfloatersearchlegacy.h" #include "fslslbridge.h" -//-TT - -#include "fscontactsfloater.h" // Fix for FIRE-3066 - -#include "fswsassetblacklist.h" // For Assetblacklist init on startup -#include "fsfloatersearchlegacy.h" // FIRE-6310 +#include "fswsassetblacklist.h" #include "llfloatersidepanelcontainer.h" - +#include "llnotificationmanager.h" +#include "NACLantispam.h" +#include "rlvhandler.h" +#include "streamtitledisplay.h" +#include "tea.h" // // exported globals From 0fddd0f4de72d8852ccd4f6ea99b97581554ba1b Mon Sep 17 00:00:00 2001 From: Cinders Date: Sun, 23 Dec 2012 11:20:08 -0700 Subject: [PATCH 7/8] Backout Rev 18389. String returns correctly with KDU 7.1 --- indra/cmake/LLKDU.cmake | 1 - indra/llimage/CMakeLists.txt | 4 ---- indra/llimage/llimagej2c.cpp | 11 +---------- 3 files changed, 1 insertion(+), 15 deletions(-) diff --git a/indra/cmake/LLKDU.cmake b/indra/cmake/LLKDU.cmake index 5959a7d833..fdf30338ac 100644 --- a/indra/cmake/LLKDU.cmake +++ b/indra/cmake/LLKDU.cmake @@ -22,5 +22,4 @@ if (USE_KDU) endif (STANDALONE) set(LLKDU_INCLUDE_DIRS ${LIBS_OPEN_DIR}/llkdu) set(LLKDU_LIBRARIES llkdu) - add_definitions( -DUSE_KDU ) endif (USE_KDU) diff --git a/indra/llimage/CMakeLists.txt b/indra/llimage/CMakeLists.txt index 47d7e4adac..ea8c1a1107 100644 --- a/indra/llimage/CMakeLists.txt +++ b/indra/llimage/CMakeLists.txt @@ -63,10 +63,6 @@ target_link_libraries(llimage ${ZLIB_LIBRARIES} ) -if (USE_KDU) - add_definitions( -DUSE_KDU ) -endif (USE_KDU) - # Add tests if (LL_TESTS) SET(llimage_TEST_SOURCE_FILES diff --git a/indra/llimage/llimagej2c.cpp b/indra/llimage/llimagej2c.cpp index 758df82e06..08a21db5ff 100755 --- a/indra/llimage/llimagej2c.cpp +++ b/indra/llimage/llimagej2c.cpp @@ -50,16 +50,7 @@ const std::string sTesterName("ImageCompressionTester"); //static std::string LLImageJ2C::getEngineInfo() { - //return fallbackEngineInfoLLImageJ2CImpl(); # AO, returns corrupted string, needs investigation. Workaround below. - std::string J2CEngineStr; - llinfos << "Raw engine string was '" << fallbackEngineInfoLLImageJ2CImpl() << "'" << llendl; -#ifdef USE_KDU - J2CEngineStr = "KDU"; -#else - J2CEngineStr = "OpenJPEG"; - J2CEngineStr = fallbackEngineInfoLLImageJ2CImpl(); -#endif - return J2CEngineStr; + return fallbackEngineInfoLLImageJ2CImpl(); } LLImageJ2C::LLImageJ2C() : LLImageFormatted(IMG_CODEC_J2C), From 25d2459d1edca72b151247faefe7a8f08b3c6b69 Mon Sep 17 00:00:00 2001 From: Cinders Date: Sun, 23 Dec 2012 15:05:35 -0700 Subject: [PATCH 8/8] Fix FIRE-8419: Don't return on identical stream URIs. We might need to toggle off/on a closed stream. Identical streams are handled elsewhere anyways. --- indra/newview/llvieweraudio.cpp | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/indra/newview/llvieweraudio.cpp b/indra/newview/llvieweraudio.cpp index d8382fc84e..f737eba69c 100644 --- a/indra/newview/llvieweraudio.cpp +++ b/indra/newview/llvieweraudio.cpp @@ -82,7 +82,11 @@ void LLViewerAudio::startInternetStreamWithAutoFade(std::string streamURI) // Old and new stream are identical if (mNextStreamURI == streamURI) { - return; + /// FIRE-8419 - Don't return here. It can keep the user from toggling audio streams off/on. + /// We handle identical stream URIs with FIRE-7093 anyways. + //return; + lldebugs << "Identical URI's: " << mNextStreamURI << " and " << streamURI << llendl; + // } // Record the URI we are going to be switching to