diff --git a/indra/llcommon/llrefcount.cpp b/indra/llcommon/llrefcount.cpp index 5cbd346411..6852b5536a 100644 --- a/indra/llcommon/llrefcount.cpp +++ b/indra/llcommon/llrefcount.cpp @@ -30,7 +30,7 @@ #include "llerror.h" // maximum reference count before sounding memory leak alarm -const S32 gMaxRefCount = 65536; +const S32 gMaxRefCount = S32_MAX; LLRefCount::LLRefCount(const LLRefCount& other) : mRef(0) diff --git a/indra/newview/VIEWER_VERSION.txt b/indra/newview/VIEWER_VERSION.txt index 5dbe61b99e..10abd6ae5b 100644 --- a/indra/newview/VIEWER_VERSION.txt +++ b/indra/newview/VIEWER_VERSION.txt @@ -1 +1 @@ -6.6.5 +6.6.6 diff --git a/indra/newview/llagent.cpp b/indra/newview/llagent.cpp index 757af5540b..5984f42118 100644 --- a/indra/newview/llagent.cpp +++ b/indra/newview/llagent.cpp @@ -103,6 +103,7 @@ #include "stringize.h" #include "boost/foreach.hpp" #include "llcorehttputil.h" +#include "lluiusage.h" // [RLVa:KB] - Checked: 2011-11-04 (RLVa-1.4.4a) #include "rlvactions.h" #include "rlvhandler.h" @@ -660,6 +661,8 @@ void LLAgent::ageChat() //----------------------------------------------------------------------------- void LLAgent::moveAt(S32 direction, bool reset) { + LLUIUsage::instance().logCommand("Agent.MoveAt"); + mMoveTimer.reset(); LLFirstUse::notMoving(false); @@ -4813,6 +4816,7 @@ void LLAgent::startTeleportRequest() } if (hasPendingTeleportRequest()) { + LLUIUsage::instance().logCommand("Agent.StartTeleportRequest"); mTeleportCanceled.reset(); if (!isMaturityPreferenceSyncedWithServer()) { diff --git a/indra/newview/llappearancemgr.cpp b/indra/newview/llappearancemgr.cpp index 1c4a43860d..5a77e44399 100644 --- a/indra/newview/llappearancemgr.cpp +++ b/indra/newview/llappearancemgr.cpp @@ -60,6 +60,8 @@ #include "llappviewer.h" #include "llcoros.h" #include "lleventcoro.h" +#include "lluiusage.h" + #include "llavatarpropertiesprocessor.h" // [RLVa:KB] - Checked: 2011-05-22 (RLVa-1.3.1) @@ -1470,6 +1472,9 @@ void LLAppearanceMgr::wearItemsOnAvatar(const uuid_vec_t& item_ids_to_wear, bool replace, LLPointer cb) { + LL_DEBUGS("UIUsage") << "wearItemsOnAvatar" << LL_ENDL; + LLUIUsage::instance().logCommand("Avatar.WearItem"); + bool first = true; LLInventoryObject::const_object_list_t items_to_link; @@ -3133,6 +3138,7 @@ void LLAppearanceMgr::wearInventoryCategoryOnAvatar( LLInventoryCategory* catego LL_INFOS("Avatar") << self_av_string() << "wearInventoryCategoryOnAvatar '" << category->getName() << "'" << LL_ENDL; + LLUIUsage::instance().logCommand("Avatar.WearCategory"); if (gAgentCamera.cameraCustomizeAvatar()) { @@ -4484,6 +4490,8 @@ void LLAppearanceMgr::makeNewOutfitLinks(const std::string& new_folder_name, boo { if (!isAgentAvatarValid()) return; + LLUIUsage::instance().logCommand("Avatar.CreateNewOutfit"); + LL_DEBUGS("Avatar") << "creating new outfit" << LL_ENDL; gAgentWearables.notifyLoadingStarted(); @@ -4525,6 +4533,9 @@ void LLAppearanceMgr::wearBaseOutfit() void LLAppearanceMgr::removeItemsFromAvatar(const uuid_vec_t& ids_to_remove, LLPointer cb /*= NULL*/, bool immediate_delete /*= false*/) // [/SL:KB] { + LL_DEBUGS("UIUsage") << "removeItemsFromAvatar" << LL_ENDL; + LLUIUsage::instance().logCommand("Avatar.RemoveItem"); + if (ids_to_remove.empty()) { LL_WARNS() << "called with empty list, nothing to do" << LL_ENDL; @@ -5054,6 +5065,8 @@ public: "Quick Appearance"); if ( gInventory.getCategory( folder_uuid ) != NULL ) { + // Assume this is coming from the predefined avatars web floater + LLUIUsage::instance().logCommand("Avatar.WearPredefinedAppearance"); LLAppearanceMgr::getInstance()->wearInventoryCategory(category, true, false); // *TODOw: This may not be necessary if initial outfit is chosen already -- josh diff --git a/indra/newview/llavataractions.cpp b/indra/newview/llavataractions.cpp index f17deda451..672afb6923 100644 --- a/indra/newview/llavataractions.cpp +++ b/indra/newview/llavataractions.cpp @@ -78,6 +78,7 @@ #include "llsidepanelinventory.h" #include "llavatarname.h" #include "llagentui.h" +#include "lluiusage.h" // [RLVa:KB] - Checked: 2011-04-11 (RLVa-1.3.0) #include "rlvactions.h" #include "rlvcommon.h" @@ -164,7 +165,7 @@ void LLAvatarActions::requestFriendshipDialog(const LLUUID& id, const std::strin payload["id"] = id; payload["name"] = name; - LLNotificationsUtil::add("AddFriendWithMessage", args, payload, &callbackAddFriendWithMessage); + LLNotificationsUtil::add("AddFriendWithMessage", args, payload, &callbackAddFriendWithMessage); // add friend to recent people list LLRecentPeople::instance().add(id); @@ -1788,6 +1789,8 @@ bool LLAvatarActions::handleUnfreeze(const LLSD& notification, const LLSD& respo void LLAvatarActions::requestFriendship(const LLUUID& target_id, const std::string& target_name, const std::string& message) { const LLUUID calling_card_folder_id = gInventory.findCategoryUUIDForType(LLFolderType::FT_CALLINGCARD); + LLUIUsage::instance().logCommand("Agent.SendFriendRequest"); + send_improved_im(target_id, target_name, message, diff --git a/indra/newview/llcallingcard.cpp b/indra/newview/llcallingcard.cpp index 5f2f26cf8f..0ea885d175 100644 --- a/indra/newview/llcallingcard.cpp +++ b/indra/newview/llcallingcard.cpp @@ -53,6 +53,7 @@ #include "llviewerobjectlist.h" #include "llvoavatar.h" #include "llavataractions.h" +#include "lluiusage.h" // Firestorm includes #include "fscommon.h" @@ -302,6 +303,8 @@ void LLAvatarTracker::copyBuddyList(buddy_map_t& buddies) const void LLAvatarTracker::terminateBuddy(const LLUUID& id) { LL_DEBUGS() << "LLAvatarTracker::terminateBuddy()" << LL_ENDL; + LLUIUsage::instance().logCommand("Agent.TerminateFriendship"); + LLRelationship* buddy = get_ptr_in_map(mBuddyInfo, id); if(!buddy) return; mBuddyInfo.erase(id); diff --git a/indra/newview/llchatbar.cpp b/indra/newview/llchatbar.cpp index 8cf40652b7..015af4d725 100644 --- a/indra/newview/llchatbar.cpp +++ b/indra/newview/llchatbar.cpp @@ -569,8 +569,6 @@ void LLChatBar::sendChatFromViewer(const LLWString &wtext, EChatType type, BOOL // how to chat gWarningSettings.setBOOL("FirstOtherChatBeforeUser", FALSE); - LLUIUsage::instance().logCommand("Chat.Send"); // Pseudo-command - // Look for "/20 foo" channel chats. S32 channel = 0; LLWString out_text = stripChannelNumber(wtext, &channel); diff --git a/indra/newview/llfloaterimnearbychat.cpp b/indra/newview/llfloaterimnearbychat.cpp index 3291e744d3..9c9df55dc4 100644 --- a/indra/newview/llfloaterimnearbychat.cpp +++ b/indra/newview/llfloaterimnearbychat.cpp @@ -708,7 +708,6 @@ void LLFloaterIMNearbyChat::sendChatFromViewer(const std::string &utf8text, ECha void LLFloaterIMNearbyChat::sendChatFromViewer(const LLWString &wtext, EChatType type, BOOL animate) { - LLUIUsage::instance().logCommand("Chat.Send"); // pseuo-command // Look for "/20 foo" channel chats. S32 channel = 0; LLWString out_text = stripChannelNumber(wtext, &channel); @@ -921,6 +920,12 @@ void send_chat_from_viewer(std::string utf8_out_text, EChatType type, S32 channe } // [/RLVa:KB] + LL_DEBUGS("UIUsage") << "Nearby chat, text " << utf8_out_text << " type " << type << " channel " << channel << LL_ENDL; + if (type != CHAT_TYPE_START && type != CHAT_TYPE_STOP) // prune back some redundant logging + { + LLUIUsage::instance().logCommand("Chat.SendNearby"); // pseuo-command + } + LLMessageSystem* msg = gMessageSystem; if (channel >= 0) diff --git a/indra/newview/llgroupmgr.cpp b/indra/newview/llgroupmgr.cpp index 35843fff9b..1bd691d9a9 100644 --- a/indra/newview/llgroupmgr.cpp +++ b/indra/newview/llgroupmgr.cpp @@ -64,6 +64,7 @@ #include "llviewerregion.h" #include #include "llcorehttputil.h" +#include "lluiusage.h" // [SL:KB] - Patch: Chat-GroupSessionEject | Checked: 2012-02-04 (Catznip-3.2.1) #include "llimview.h" @@ -1881,6 +1882,9 @@ void LLGroupMgr::sendGroupRoleMemberChanges(const LLUUID& group_id) //static void LLGroupMgr::sendGroupMemberJoin(const LLUUID& group_id) { + + LLUIUsage::instance().logCommand("Group.Join"); + LLMessageSystem *msg = gMessageSystem; msg->newMessageFast(_PREHASH_JoinGroupRequest); diff --git a/indra/newview/llimview.cpp b/indra/newview/llimview.cpp index 5fca351dbf..9e0b540813 100644 --- a/indra/newview/llimview.cpp +++ b/indra/newview/llimview.cpp @@ -76,6 +76,7 @@ #include "message.h" #include "llviewerregion.h" #include "llcorehttputil.h" +#include "lluiusage.h" // [RLVa:KB] - Checked: 2013-05-10 (RLVa-1.4.9) #include "rlvactions.h" #include "rlvcommon.h" @@ -911,6 +912,23 @@ void LLIMModel::LLIMSession::addMessage(const std::string& from, const LLUUID& f message["index"] = (LLSD::Integer)mMsgs.size(); message["is_history"] = is_history; + LL_DEBUGS("UIUsage") << "addMessage " << " from " << from << " from_id " << from_id << " utf8_text " << utf8_text << " time " << time << " is_history " << is_history << " session mType " << mType << LL_ENDL; + if (from_id == gAgent.getID()) + { + if (mType == IM_SESSION_GROUP_START) + { + LLUIUsage::instance().logCommand("Chat.SendGroup"); + } + else if (mType == IM_NOTHING_SPECIAL) + { + LLUIUsage::instance().logCommand("Chat.SendIM"); + } + else + { + LLUIUsage::instance().logCommand("Chat.SendOther"); + } + } + mMsgs.push_front(message); if (mSpeakers && from_id.notNull()) diff --git a/indra/newview/lltooldraganddrop.cpp b/indra/newview/lltooldraganddrop.cpp index 61f03dd631..72a217c1dd 100644 --- a/indra/newview/lltooldraganddrop.cpp +++ b/indra/newview/lltooldraganddrop.cpp @@ -60,6 +60,7 @@ #include "llvoavatarself.h" #include "llworld.h" #include "llpanelface.h" +#include "lluiusage.h" // [RLVa:KB] - Checked: 2011-05-22 (RLVa-1.3.1) #include "rlvactions.h" #include "rlvhandler.h" @@ -1323,10 +1324,12 @@ void LLToolDragAndDrop::dropObject(LLViewerObject* raycast_target, LLMessageSystem* msg = gMessageSystem; if (mSource == SOURCE_NOTECARD) { + LLUIUsage::instance().logCommand("Object.RezObjectFromNotecard"); msg->newMessageFast(_PREHASH_RezObjectFromNotecard); } else { + LLUIUsage::instance().logCommand("Object.RezObject"); msg->newMessageFast(_PREHASH_RezObject); } msg->nextBlockFast(_PREHASH_AgentData); diff --git a/indra/newview/lltoolpie.cpp b/indra/newview/lltoolpie.cpp index 14ace2ac63..d85f2caa44 100644 --- a/indra/newview/lltoolpie.cpp +++ b/indra/newview/lltoolpie.cpp @@ -74,6 +74,7 @@ #include "llui.h" #include "llweb.h" #include "pipeline.h" // setHighlightObject +#include "lluiusage.h" // [RLVa:KB] - Checked: 2010-03-06 (RLVa-1.2.0c) #include "rlvactions.h" #include "rlvhandler.h" @@ -647,6 +648,8 @@ bool LLToolPie::walkToClickedLocation() return false; } + LLUIUsage::instance().logCommand("Agent.WalkToClickedLocation"); + LLPickInfo saved_pick = mPick; if (gAgentCamera.getCameraMode() != CAMERA_MODE_MOUSELOOK) { diff --git a/indra/newview/lltoolplacer.cpp b/indra/newview/lltoolplacer.cpp index c16e630f42..5943d7de1f 100644 --- a/indra/newview/lltoolplacer.cpp +++ b/indra/newview/lltoolplacer.cpp @@ -66,6 +66,7 @@ #include "llprimitive.h" #include "llwindow.h" // incBusyCount() #include "material_codes.h" +#include "lluiusage.h" // [RLVa:KB] - Checked: 2010-03-23 (RLVa-1.2.0a) #include "rlvhandler.h" @@ -301,6 +302,7 @@ BOOL LLToolPlacer::addObject( LLPCode pcode, S32 x, S32 y, U8 use_physics ) gAgent.getID(), 1.0f, LLAudioEngine::AUDIO_TYPE_UI); } + LLUIUsage::instance().logCommand("Build.ObjectAdd"); gMessageSystem->newMessageFast(_PREHASH_ObjectAdd); gMessageSystem->nextBlockFast(_PREHASH_AgentData); gMessageSystem->addUUIDFast(_PREHASH_AgentID, gAgent.getID()); diff --git a/indra/newview/llviewermedia.cpp b/indra/newview/llviewermedia.cpp index 096da38de2..0dd0e201bb 100644 --- a/indra/newview/llviewermedia.cpp +++ b/indra/newview/llviewermedia.cpp @@ -3950,7 +3950,7 @@ bool LLViewerMediaImpl::shouldShowBasedOnClass() const // bool LLViewerMediaImpl::isObscured() const { - if (getUsedInUI() || isParcelMedia()) return false; + if (getUsedInUI() || isParcelMedia() || isAttachedToHUD()) return false; LLParcel* agent_parcel = LLViewerParcelMgr::getInstance()->getAgentParcel(); if (!agent_parcel) @@ -3966,6 +3966,20 @@ bool LLViewerMediaImpl::isObscured() const return false; } +bool LLViewerMediaImpl::isAttachedToHUD() const +{ + std::list< LLVOVolume* >::const_iterator iter = mObjectList.begin(); + std::list< LLVOVolume* >::const_iterator end = mObjectList.end(); + for ( ; iter != end; iter++) + { + if ((*iter)->isHUDAttachment()) + { + return true; + } + } + return false; +} + ////////////////////////////////////////////////////////////////////////////////////////// // bool LLViewerMediaImpl::isAttachedToAnotherAvatar() const diff --git a/indra/newview/llviewermedia.h b/indra/newview/llviewermedia.h index b95cfd4c68..f1f42afd81 100644 --- a/indra/newview/llviewermedia.h +++ b/indra/newview/llviewermedia.h @@ -411,6 +411,8 @@ public: void cancelMimeTypeProbe(); + bool isAttachedToHUD() const; + // Is this media attached to an avatar *not* self bool isAttachedToAnotherAvatar() const; diff --git a/indra/newview/llviewermessage.cpp b/indra/newview/llviewermessage.cpp index 453ce7c155..94b07bda62 100644 --- a/indra/newview/llviewermessage.cpp +++ b/indra/newview/llviewermessage.cpp @@ -134,6 +134,7 @@ #include "llexperiencecache.h" #include "llexperiencecache.h" +#include "lluiusage.h" // Firestorm includes #include @@ -322,6 +323,7 @@ bool friendship_offer_callback(const LLSD& notification, const LLSD& response) { case 0: { + LLUIUsage::instance().logCommand("Agent.AcceptFriendship"); // accept LLAvatarTracker::formFriendship(payload["from_id"]); @@ -370,6 +372,7 @@ bool friendship_offer_callback(const LLSD& notification, const LLSD& response) // fall-through case 2: // Send IM - decline and start IM session { + LLUIUsage::instance().logCommand("Agent.DeclineFriendship"); // decline // We no longer notify other viewers, but we DO still send // the rejection to the simulator to delete the pending userop. @@ -917,6 +920,11 @@ void send_join_group_response(LLUUID group_id, LLUUID transaction_id, bool accep EInstantMessage type = accept_invite ? IM_GROUP_INVITATION_ACCEPT : IM_GROUP_INVITATION_DECLINE; + if (accept_invite) + { + LLUIUsage::instance().logCommand("Group.Join"); + } + send_improved_im(group_id, std::string("name"), std::string("message"), diff --git a/indra/newview/llviewerregion.cpp b/indra/newview/llviewerregion.cpp index 53f384809e..7eaf23cb03 100755 --- a/indra/newview/llviewerregion.cpp +++ b/indra/newview/llviewerregion.cpp @@ -331,6 +331,24 @@ void LLViewerRegionImpl::requestBaseCapabilitiesCoro(U64 regionHandle) return; } + if (!LLWorld::instanceExists()) + { + LL_WARNS("AppInit", "Capabilities") << "Received capabilities, but world no longer exists!" << LL_ENDL; + return; + } + + regionp = LLWorld::getInstance()->getRegionFromHandle(regionHandle); + if (!regionp) //region was removed + { + LL_WARNS("AppInit", "Capabilities") << "Received capabilities for region that no longer exists!" << LL_ENDL; + return; // this error condition is not recoverable. + } + + impl = regionp->getRegionImplNC(); + + // Fix seed cap retry count + //++(impl->mSeedCapAttempts); + if (!result.isMap() || result.has("error")) { LL_WARNS("AppInit", "Capabilities") << "Malformed response" << LL_ENDL; @@ -350,24 +368,6 @@ void LLViewerRegionImpl::requestBaseCapabilitiesCoro(U64 regionHandle) // remove the http_result from the llsd result.erase("http_result"); - if (!LLWorld::instanceExists()) - { - LL_WARNS("AppInit", "Capabilities") << "Received capabilities, but world no longer exists!" << LL_ENDL; - return; - } - - regionp = LLWorld::getInstance()->getRegionFromHandle(regionHandle); - if (!regionp) //region was removed - { - LL_WARNS("AppInit", "Capabilities") << "Received capabilities for region that no longer exists!" << LL_ENDL; - return; // this error condition is not recoverable. - } - - impl = regionp->getRegionImplNC(); - - // Fix seed cap retry count - //++(impl->mSeedCapAttempts); - if (id != impl->mHttpResponderID) // region is no longer referring to this request { LL_WARNS("AppInit", "Capabilities") << "Received results for a stale capabilities request!" << LL_ENDL; diff --git a/indra/newview/llvoavatarself.cpp b/indra/newview/llvoavatarself.cpp index 3503eb28e5..5b57c7c4bc 100644 --- a/indra/newview/llvoavatarself.cpp +++ b/indra/newview/llvoavatarself.cpp @@ -67,6 +67,7 @@ #include "llsdserialize.h" #include "llcallstack.h" #include "llcorehttputil.h" +#include "lluiusage.h" // Firestorm includes #include "fslslbridge.h" @@ -3242,6 +3243,7 @@ void LLVOAvatarSelf::onCustomizeStart(bool disable_camera_switch) { if (isAgentAvatarValid()) { + LLUIUsage::instance().logCommand("Avatar.CustomizeStart"); if (!gAgentAvatarp->mEndCustomizeCallback.get()) { gAgentAvatarp->mEndCustomizeCallback = new LLUpdateAppearanceOnDestroy; diff --git a/indra/newview/llvoiceclient.cpp b/indra/newview/llvoiceclient.cpp index 2b357eaada..42ff94f839 100644 --- a/indra/newview/llvoiceclient.cpp +++ b/indra/newview/llvoiceclient.cpp @@ -37,6 +37,7 @@ #include "llui.h" #include "llkeyboard.h" #include "llagent.h" +#include "lluiusage.h" const F32 LLVoiceClient::OVERDRIVEN_POWER_LEVEL = 0.7f; @@ -619,6 +620,10 @@ void LLVoiceClient::setMuteMic(bool muted) void LLVoiceClient::setUserPTTState(bool ptt) { + if (ptt) + { + LLUIUsage::instance().logCommand("Agent.EnableMicrophone"); + } mUserPTTState = ptt; updateMicMuteLogic(); mMicroChangedSignal(); diff --git a/indra/newview/llvovolume.cpp b/indra/newview/llvovolume.cpp index d8c115ece0..f884c41a62 100644 --- a/indra/newview/llvovolume.cpp +++ b/indra/newview/llvovolume.cpp @@ -6395,7 +6395,7 @@ void LLVolumeGeometryManager::rebuildMesh(LLSpatialGroup* group) { LLDrawable* drawablep = (LLDrawable*)(*drawable_iter)->getDrawable(); - if (drawablep && !drawablep->isDead() && drawablep->isState(LLDrawable::REBUILD_ALL) && !drawablep->isState(LLDrawable::RIGGED) ) + if (drawablep && !drawablep->isDead() && drawablep->isState(LLDrawable::REBUILD_ALL)) { LL_PROFILE_ZONE_NAMED_CATEGORY_VOLUME("Rebuild all non-Rigged"); LLVOVolume* vobj = drawablep->getVOVolume(); @@ -6440,8 +6440,6 @@ void LLVolumeGeometryManager::rebuildMesh(LLSpatialGroup* group) LLVertexBuffer* buff = face->getVertexBuffer(); if (buff) { - llassert(!face->isState(LLFace::RIGGED)); - if (!face->getGeometryVolume(*volume, face->getTEOffset(), vobj->getRelativeXform(), vobj->getRelativeXformInvTrans(), face->getGeomIndex())) { //something's gone wrong with the vertex buffer accounting, rebuild this group