From 460c81070e5fa1c51ce7e186a9ecb8c5f1c995e1 Mon Sep 17 00:00:00 2001 From: Oz Linden Date: Thu, 4 Apr 2013 16:43:15 -0400 Subject: tag merge of DRTVWR-310 --- .hgtags | 1 + 1 file changed, 1 insertion(+) diff --git a/.hgtags b/.hgtags index e7b221d0cb..3d872799de 100644 --- a/.hgtags +++ b/.hgtags @@ -434,3 +434,4 @@ fd6b510e83f56830e45670c428653134899d3e25 DRTVWR-305 902caf2b9fdbdbc5c399c4d5ebcecaf9cb97bab8 DRTVWR-306 5c6098fd17d40ee3a38ca6b64f6be9db7f61f0a8 3.5.0-beta7 adc360e6bf21390d2665380951d85937cd29a604 3.5.0-release +1ada73295ed0eaa4a772ef079c29f57069342c32 DRTVWR-310 -- cgit v1.2.3 From 01fb17cbc5a1d6a3526c4115787dbae74f7bdb07 Mon Sep 17 00:00:00 2001 From: Oz Linden Date: Fri, 12 Apr 2013 11:17:33 -0400 Subject: Added tag 3.5.1-beta1 for changeset 0ca3910763ce --- .hgtags | 1 + 1 file changed, 1 insertion(+) diff --git a/.hgtags b/.hgtags index e7b221d0cb..310c6fbc18 100644 --- a/.hgtags +++ b/.hgtags @@ -434,3 +434,4 @@ fd6b510e83f56830e45670c428653134899d3e25 DRTVWR-305 902caf2b9fdbdbc5c399c4d5ebcecaf9cb97bab8 DRTVWR-306 5c6098fd17d40ee3a38ca6b64f6be9db7f61f0a8 3.5.0-beta7 adc360e6bf21390d2665380951d85937cd29a604 3.5.0-release +0ca3910763cec967703e45bc6208a325dccb9f95 3.5.1-beta1 -- cgit v1.2.3 From f12b2c7bca1af81d5b7548e5b856dace92e8fea9 Mon Sep 17 00:00:00 2001 From: Oz Linden Date: Fri, 12 Apr 2013 12:10:36 -0400 Subject: Added tag 3.5.1-beta1 for changeset 20cdf370f5c8 --- .hgtags | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.hgtags b/.hgtags index d07ac6dbda..53693c2cdf 100644 --- a/.hgtags +++ b/.hgtags @@ -436,3 +436,5 @@ fd6b510e83f56830e45670c428653134899d3e25 DRTVWR-305 adc360e6bf21390d2665380951d85937cd29a604 3.5.0-release 0ca3910763cec967703e45bc6208a325dccb9f95 3.5.1-beta1 1ada73295ed0eaa4a772ef079c29f57069342c32 DRTVWR-310 +0ca3910763cec967703e45bc6208a325dccb9f95 3.5.1-beta1 +20cdf370f5c8be6193bef6fb3a81cc3f81275191 3.5.1-beta1 -- cgit v1.2.3 From d091644bccb012e5e4a10de7c1f03583d798d07d Mon Sep 17 00:00:00 2001 From: "Brad Payne (Vir Linden)" Date: Wed, 17 Apr 2013 16:06:27 -0400 Subject: SH-4125 FIX - problem was unpredictable ordering of avatar and llviewerregion deletion. Avoid trying to send metrics when we're shutting down and it's too late anyway. Reviewed by Nyx --- indra/newview/llvoavatar.cpp | 29 ++++++++++++++++------------- 1 file changed, 16 insertions(+), 13 deletions(-) diff --git a/indra/newview/llvoavatar.cpp b/indra/newview/llvoavatar.cpp index 0475e9fc89..06fb23b84b 100755 --- a/indra/newview/llvoavatar.cpp +++ b/indra/newview/llvoavatar.cpp @@ -802,14 +802,14 @@ void LLVOAvatar::debugAvatarRezTime(std::string notification_name, std::string c //------------------------------------------------------------------------ LLVOAvatar::~LLVOAvatar() { - if (!mFullyLoaded) - { + if (!mFullyLoaded) + { debugAvatarRezTime("AvatarRezLeftCloudNotification","left after ruth seconds as cloud"); - } - else - { + } + else + { debugAvatarRezTime("AvatarRezLeftNotification","left sometime after declouding"); - } + } logPendingPhases(); @@ -6023,6 +6023,11 @@ void LLVOAvatar::stopPhase(const std::string& phase_name, bool err_check) void LLVOAvatar::logPendingPhases() { + if (!isAgentAvatarValid()) + { + return; + } + for (LLViewerStats::phase_map_t::iterator it = getPhases().begin(); it != getPhases().end(); ++it) @@ -6057,6 +6062,11 @@ void LLVOAvatar::logPendingPhasesAllAvatars() void LLVOAvatar::logMetricsTimerRecord(const std::string& phase_name, F32 elapsed, bool completed) { + if (!isAgentAvatarValid()) + { + return; + } + LLSD record; record["timer_name"] = phase_name; record["avatar_id"] = getID(); @@ -6073,13 +6083,6 @@ void LLVOAvatar::logMetricsTimerRecord(const std::string& phase_name, F32 elapse record["is_using_server_bakes"] = ((bool) isUsingServerBakes()); record["is_self"] = isSelf(); - -#if 0 // verbose logging - std::ostringstream ostr; - ostr << LLSDNotationStreamer(record); - LL_DEBUGS("Avatar") << "record\n" << ostr.str() << llendl; -#endif - if (isAgentAvatarValid()) { gAgentAvatarp->addMetricsTimerRecord(record); -- cgit v1.2.3 From dbe504cbd47149e18778c2873486c0e88d629d20 Mon Sep 17 00:00:00 2001 From: Nyx Linden Date: Wed, 17 Apr 2013 18:33:39 -0400 Subject: SUN-70 MAINT-2597 FIX Crash when trying to edit no-modify objects Added protection for invalid / empty inventory contents --- indra/newview/llviewerobject.cpp | 36 ++++++++++++++++++++++++------------ indra/newview/llviewerobject.h | 2 +- 2 files changed, 25 insertions(+), 13 deletions(-) diff --git a/indra/newview/llviewerobject.cpp b/indra/newview/llviewerobject.cpp index fcf5af76ff..670272e7be 100644 --- a/indra/newview/llviewerobject.cpp +++ b/indra/newview/llviewerobject.cpp @@ -2697,24 +2697,33 @@ void LLViewerObject::processTaskInvFile(void** user_data, S32 error_code, LLExtS if(ft && (0 == error_code) && (object = gObjectList.findObject(ft->mTaskID))) { - object->loadTaskInvFile(ft->mFilename); + if (object->loadTaskInvFile(ft->mFilename)) + { - LLInventoryObject::object_list_t::iterator it = object->mInventory->begin(); - LLInventoryObject::object_list_t::iterator end = object->mInventory->end(); - std::list& pending_lst = object->mPendingInventoryItemsIDs; + LLInventoryObject::object_list_t::iterator it = object->mInventory->begin(); + LLInventoryObject::object_list_t::iterator end = object->mInventory->end(); + std::list& pending_lst = object->mPendingInventoryItemsIDs; - for (; it != end && pending_lst.size(); ++it) - { - LLViewerInventoryItem* item = dynamic_cast(it->get()); - if(item && item->getType() != LLAssetType::AT_CATEGORY) + for (; it != end && pending_lst.size(); ++it) { - std::list::iterator id_it = std::find(pending_lst.begin(), pending_lst.begin(), item->getAssetUUID()); - if (id_it != pending_lst.end()) + LLViewerInventoryItem* item = dynamic_cast(it->get()); + if(item && item->getType() != LLAssetType::AT_CATEGORY) { - pending_lst.erase(id_it); + std::list::iterator id_it = std::find(pending_lst.begin(), pending_lst.begin(), item->getAssetUUID()); + if (id_it != pending_lst.end()) + { + pending_lst.erase(id_it); + } } } } + else + { + // MAINT-2597 - crash when trying to edit a no-mod object + // Somehow get an contents inventory response, but with an invalid stream (possibly 0 size?) + // Stated repro was specific to no-mod objects so failing without user interaction should be safe. + llwarns << "Trying to load invalid task inventory file. Ignoring file contents." << llendl; + } } else { @@ -2726,7 +2735,7 @@ void LLViewerObject::processTaskInvFile(void** user_data, S32 error_code, LLExtS delete ft; } -void LLViewerObject::loadTaskInvFile(const std::string& filename) +BOOL LLViewerObject::loadTaskInvFile(const std::string& filename) { std::string filename_and_local_path = gDirUtilp->getExpandedFilename(LL_PATH_CACHE, filename); llifstream ifs(filename_and_local_path); @@ -2773,8 +2782,11 @@ void LLViewerObject::loadTaskInvFile(const std::string& filename) { llwarns << "unable to load task inventory: " << filename_and_local_path << llendl; + return FALSE; } doInventoryCallback(); + + return TRUE; } void LLViewerObject::doInventoryCallback() diff --git a/indra/newview/llviewerobject.h b/indra/newview/llviewerobject.h index 728d279c39..316dbce7d0 100644 --- a/indra/newview/llviewerobject.h +++ b/indra/newview/llviewerobject.h @@ -656,7 +656,7 @@ protected: // static void processTaskInvFile(void** user_data, S32 error_code, LLExtStat ext_status); - void loadTaskInvFile(const std::string& filename); + BOOL loadTaskInvFile(const std::string& filename); void doInventoryCallback(); BOOL isOnMap(); -- cgit v1.2.3 From 490edf41ebb91adcc127bd21463772eb17baad8b Mon Sep 17 00:00:00 2001 From: Nyx Linden Date: Wed, 17 Apr 2013 19:20:42 -0400 Subject: BUG-2326 MAINT-2596 FIX crash when selecting non-existant user in resident picker Added checks to validate that the selection list is non-empty --- doc/contributions.txt | 1 + indra/newview/llfloateravatarpicker.cpp | 9 ++++++++- 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/doc/contributions.txt b/doc/contributions.txt index 32dd3c1a2e..a63e3a22b0 100644 --- a/doc/contributions.txt +++ b/doc/contributions.txt @@ -299,6 +299,7 @@ ChickyBabes Zuzu Christopher Organiser Ciaran Laval Cinder Roxley + BUG-2326 STORM-1703 Clara Young Coaldust Numbers diff --git a/indra/newview/llfloateravatarpicker.cpp b/indra/newview/llfloateravatarpicker.cpp index 3e0e82b579..113aa9a8f2 100644 --- a/indra/newview/llfloateravatarpicker.cpp +++ b/indra/newview/llfloateravatarpicker.cpp @@ -818,7 +818,14 @@ bool LLFloaterAvatarPicker::isSelectBtnEnabled() uuid_vec_t avatar_ids; std::vector avatar_names; getSelectedAvatarData(list, avatar_ids, avatar_names); - return mOkButtonValidateSignal(avatar_ids); + if (avatar_ids.size() >= 1) + { + ret_val = mOkButtonValidateSignal(avatar_ids); + } + else + { + ret_val = false; + } } } -- cgit v1.2.3 From 65080feae3e3297b603459edbc83d927501082ad Mon Sep 17 00:00:00 2001 From: Oz Linden Date: Thu, 18 Apr 2013 11:25:42 -0400 Subject: tag merge of DRTVWR-313 --- .hgtags | 1 + 1 file changed, 1 insertion(+) diff --git a/.hgtags b/.hgtags index 53693c2cdf..32a228465d 100644 --- a/.hgtags +++ b/.hgtags @@ -438,3 +438,4 @@ adc360e6bf21390d2665380951d85937cd29a604 3.5.0-release 1ada73295ed0eaa4a772ef079c29f57069342c32 DRTVWR-310 0ca3910763cec967703e45bc6208a325dccb9f95 3.5.1-beta1 20cdf370f5c8be6193bef6fb3a81cc3f81275191 3.5.1-beta1 +2319904200de367646b9a9442239a38d52c1eeb5 DRTVWR-313 -- cgit v1.2.3 From c8e8ef8517efa174df8b4a3085548f2a658be21b Mon Sep 17 00:00:00 2001 From: Oz Linden Date: Thu, 18 Apr 2013 13:18:45 -0400 Subject: Added tag 3.5.1-beta2 for changeset 9d8726eca785 --- .hgtags | 1 + 1 file changed, 1 insertion(+) diff --git a/.hgtags b/.hgtags index 32a228465d..ed123d3440 100644 --- a/.hgtags +++ b/.hgtags @@ -439,3 +439,4 @@ adc360e6bf21390d2665380951d85937cd29a604 3.5.0-release 0ca3910763cec967703e45bc6208a325dccb9f95 3.5.1-beta1 20cdf370f5c8be6193bef6fb3a81cc3f81275191 3.5.1-beta1 2319904200de367646b9a9442239a38d52c1eeb5 DRTVWR-313 +9d8726eca785acad694564516f16dd639faf45c0 3.5.1-beta2 -- cgit v1.2.3 From 06d7845a5a40e012ad1bc7cc4ec15e82c00e5da4 Mon Sep 17 00:00:00 2001 From: Nyx Linden Date: Mon, 22 Apr 2013 19:14:24 -0400 Subject: SUN-72 SH-4132 FIX viewer builds cannot write to paths containing special characters. Integrated Nicky Dasmijn's patch to handle the unicode file paths properly. Code reviewed, patch was clean. Tested locally, correctly allows wearables to load where they would fail before. Should be ready for automated build & QA. --- doc/contributions.txt | 1 + indra/llcommon/llfile.cpp | 21 +++++++++++++++------ 2 files changed, 16 insertions(+), 6 deletions(-) diff --git a/doc/contributions.txt b/doc/contributions.txt index a63e3a22b0..d7f050a916 100644 --- a/doc/contributions.txt +++ b/doc/contributions.txt @@ -899,6 +899,7 @@ NickyD Nicky Dasmijn VWR-29228 MAINT-873 + SUN-72 Nicky Perian OPEN-1 STORM-1087 diff --git a/indra/llcommon/llfile.cpp b/indra/llcommon/llfile.cpp index bc615ed39e..864b6e6975 100644 --- a/indra/llcommon/llfile.cpp +++ b/indra/llcommon/llfile.cpp @@ -853,7 +853,8 @@ llifstream::llifstream(const std::string& _Filename, #if LL_WINDOWS std::istream(&_M_filebuf) { - if (_M_filebuf.open(_Filename.c_str(), _Mode | ios_base::in) == 0) + llutf16string wideName = utf8str_to_utf16str( _Filename ); + if (_M_filebuf.open(wideName.c_str(), _Mode | ios_base::in) == 0) { _Myios::setstate(ios_base::failbit); } @@ -872,7 +873,8 @@ llifstream::llifstream(const char* _Filename, #if LL_WINDOWS std::istream(&_M_filebuf) { - if (_M_filebuf.open(_Filename, _Mode | ios_base::in) == 0) + llutf16string wideName = utf8str_to_utf16str( _Filename ); + if (_M_filebuf.open(wideName.c_str(), _Mode | ios_base::in) == 0) { _Myios::setstate(ios_base::failbit); } @@ -917,8 +919,10 @@ bool llifstream::is_open() const void llifstream::open(const char* _Filename, ios_base::openmode _Mode) { // open a C stream with specified mode - if (_M_filebuf.open(_Filename, _Mode | ios_base::in) == 0) + #if LL_WINDOWS + llutf16string wideName = utf8str_to_utf16str( _Filename ); + if (_M_filebuf.open( wideName.c_str(), _Mode | ios_base::in) == 0) { _Myios::setstate(ios_base::failbit); } @@ -927,6 +931,7 @@ void llifstream::open(const char* _Filename, ios_base::openmode _Mode) _Myios::clear(); } #else + if (_M_filebuf.open(_Filename, _Mode | ios_base::in) == 0) { this->setstate(ios_base::failbit); } @@ -969,7 +974,8 @@ llofstream::llofstream(const std::string& _Filename, #if LL_WINDOWS std::ostream(&_M_filebuf) { - if (_M_filebuf.open(_Filename.c_str(), _Mode | ios_base::out) == 0) + llutf16string wideName = utf8str_to_utf16str( _Filename ); + if (_M_filebuf.open( wideName.c_str(), _Mode | ios_base::out) == 0) { _Myios::setstate(ios_base::failbit); } @@ -988,7 +994,8 @@ llofstream::llofstream(const char* _Filename, #if LL_WINDOWS std::ostream(&_M_filebuf) { - if (_M_filebuf.open(_Filename, _Mode | ios_base::out) == 0) + llutf16string wideName = utf8str_to_utf16str( _Filename ); + if (_M_filebuf.open( wideName.c_str(), _Mode | ios_base::out) == 0) { _Myios::setstate(ios_base::failbit); } @@ -1032,8 +1039,9 @@ bool llofstream::is_open() const void llofstream::open(const char* _Filename, ios_base::openmode _Mode) { // open a C stream with specified mode - if (_M_filebuf.open(_Filename, _Mode | ios_base::out) == 0) #if LL_WINDOWS + llutf16string wideName = utf8str_to_utf16str( _Filename ); + if (_M_filebuf.open( wideName.c_str(), _Mode | ios_base::out) == 0) { _Myios::setstate(ios_base::failbit); } @@ -1042,6 +1050,7 @@ void llofstream::open(const char* _Filename, ios_base::openmode _Mode) _Myios::clear(); } #else + if (_M_filebuf.open(_Filename, _Mode | ios_base::out) == 0) { this->setstate(ios_base::failbit); } -- cgit v1.2.3 From 5fcb76f2528923e498848005ab80b82cae8fcc8b Mon Sep 17 00:00:00 2001 From: Oz Linden Date: Tue, 23 Apr 2013 11:43:14 -0400 Subject: tag merge of DRTVWR-314 --- .hgtags | 1 + 1 file changed, 1 insertion(+) diff --git a/.hgtags b/.hgtags index ed123d3440..23225c70bb 100644 --- a/.hgtags +++ b/.hgtags @@ -440,3 +440,4 @@ adc360e6bf21390d2665380951d85937cd29a604 3.5.0-release 20cdf370f5c8be6193bef6fb3a81cc3f81275191 3.5.1-beta1 2319904200de367646b9a9442239a38d52c1eeb5 DRTVWR-313 9d8726eca785acad694564516f16dd639faf45c0 3.5.1-beta2 +4b7fa963b80e2056ab648f83a4d61310b3cedb3d DRTVWR-314 -- cgit v1.2.3 From 0bc7056ae6b314fac508f2c417cc5818107cb72e Mon Sep 17 00:00:00 2001 From: Oz Linden Date: Tue, 23 Apr 2013 12:27:12 -0400 Subject: Added tag 3.5.1-beta3 for changeset 65ae89aeb7ea --- .hgtags | 1 + 1 file changed, 1 insertion(+) diff --git a/.hgtags b/.hgtags index 23225c70bb..f2ea8cb0ea 100644 --- a/.hgtags +++ b/.hgtags @@ -441,3 +441,4 @@ adc360e6bf21390d2665380951d85937cd29a604 3.5.0-release 2319904200de367646b9a9442239a38d52c1eeb5 DRTVWR-313 9d8726eca785acad694564516f16dd639faf45c0 3.5.1-beta2 4b7fa963b80e2056ab648f83a4d61310b3cedb3d DRTVWR-314 +65ae89aeb7ea674a555e439e963f17949322ac94 3.5.1-beta3 -- cgit v1.2.3 From 1beb15c93b139e4494bb90cce30b1c67accb4b08 Mon Sep 17 00:00:00 2001 From: Oz Linden Date: Thu, 25 Apr 2013 17:59:45 -0400 Subject: Added tag 3.5.1-release for changeset 13149a524874 --- .hgtags | 1 + 1 file changed, 1 insertion(+) diff --git a/.hgtags b/.hgtags index f2ea8cb0ea..c3cfbeb4f7 100644 --- a/.hgtags +++ b/.hgtags @@ -442,3 +442,4 @@ adc360e6bf21390d2665380951d85937cd29a604 3.5.0-release 9d8726eca785acad694564516f16dd639faf45c0 3.5.1-beta2 4b7fa963b80e2056ab648f83a4d61310b3cedb3d DRTVWR-314 65ae89aeb7ea674a555e439e963f17949322ac94 3.5.1-beta3 +13149a524874b608aeb76325b35faff113a5ea53 3.5.1-release -- cgit v1.2.3 From e4c96827d237a489873ce8453640d3a13f83d01a Mon Sep 17 00:00:00 2001 From: "Brad Payne (Vir Linden)" Date: Mon, 29 Apr 2013 14:24:05 -0400 Subject: SH-4144 FIX - Debug setting now disables use of AISv3 by default. This is just a workaround for the problem of aditi advertising the cap when it isn't really present. Once we have aditi in a consistent state we should remove the setting, or at least default it to true. --- indra/newview/app_settings/logcontrol.xml | 2 +- indra/newview/app_settings/settings.xml | 11 +++++++++++ indra/newview/llviewerinventory.cpp | 10 +++++++--- 3 files changed, 19 insertions(+), 4 deletions(-) diff --git a/indra/newview/app_settings/logcontrol.xml b/indra/newview/app_settings/logcontrol.xml index 92a241857e..c5561166fc 100755 --- a/indra/newview/app_settings/logcontrol.xml +++ b/indra/newview/app_settings/logcontrol.xml @@ -42,8 +42,8 @@ tags - diff --git a/indra/newview/app_settings/settings.xml b/indra/newview/app_settings/settings.xml index 18a33b3542..1262089b3d 100755 --- a/indra/newview/app_settings/settings.xml +++ b/indra/newview/app_settings/settings.xml @@ -14033,6 +14033,17 @@ Value 1 + UseAISv3Inventory + + Comment + Allow use of AISv3 inventory - this setting should only be needed during development. + Persist + 1 + Type + Boolean + Value + 0 + ClickToWalk Comment diff --git a/indra/newview/llviewerinventory.cpp b/indra/newview/llviewerinventory.cpp index 3eab85b8b3..d45512df9c 100755 --- a/indra/newview/llviewerinventory.cpp +++ b/indra/newview/llviewerinventory.cpp @@ -627,6 +627,10 @@ S32 LLViewerInventoryCategory::getVersion() const void LLViewerInventoryCategory::setVersion(S32 version) { + if (mPreferredType == LLFolderType::FT_CURRENT_OUTFIT) + { + llinfos << "cof version change " << mVersion << " => " << version << llendl; + } mVersion = version; } @@ -1189,7 +1193,7 @@ void remove_inventory_item( if(obj) { std::string cap; - if (gAgent.getRegion()) + if (gAgent.getRegion() && gSavedSettings.getBOOL("UseAISv3Inventory")) { cap = gAgent.getRegion()->getCapability("InventoryAPIv3"); } @@ -1267,7 +1271,7 @@ void remove_inventory_category( } std::string cap; - if (gAgent.getRegion()) + if (gAgent.getRegion() && gSavedSettings.getBOOL("UseAISv3Inventory")) { cap = gAgent.getRegion()->getCapability("InventoryAPIv3"); } @@ -1409,7 +1413,7 @@ void purge_descendents_of(const LLUUID& id, LLPointer cb) else { std::string cap; - if (gAgent.getRegion()) + if (gAgent.getRegion() && gSavedSettings.getBOOL("UseAISv3Inventory")) { cap = gAgent.getRegion()->getCapability("InventoryAPIv3"); } -- cgit v1.2.3 From 72aa727a3f371cf592d33e6cccefbf74be053b70 Mon Sep 17 00:00:00 2001 From: "Brad Payne (Vir Linden)" Date: Mon, 29 Apr 2013 14:29:04 -0400 Subject: removed overly enthusiastic log setting --- indra/newview/app_settings/logcontrol.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/indra/newview/app_settings/logcontrol.xml b/indra/newview/app_settings/logcontrol.xml index c5561166fc..92a241857e 100755 --- a/indra/newview/app_settings/logcontrol.xml +++ b/indra/newview/app_settings/logcontrol.xml @@ -42,8 +42,8 @@ tags - Avatar -- cgit v1.2.3 From 9caeb5ad5045352c4bb77195c5c0bc71575bc3fd Mon Sep 17 00:00:00 2001 From: "Brad Payne (Vir Linden)" Date: Mon, 29 Apr 2013 14:31:15 -0400 Subject: removed debugging code that got pushed incorrectly. --- indra/newview/app_settings/logcontrol.xml | 2 +- indra/newview/llviewerinventory.cpp | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/indra/newview/app_settings/logcontrol.xml b/indra/newview/app_settings/logcontrol.xml index 92a241857e..c5561166fc 100755 --- a/indra/newview/app_settings/logcontrol.xml +++ b/indra/newview/app_settings/logcontrol.xml @@ -42,8 +42,8 @@ tags - diff --git a/indra/newview/llviewerinventory.cpp b/indra/newview/llviewerinventory.cpp index d45512df9c..b39dbd51a1 100755 --- a/indra/newview/llviewerinventory.cpp +++ b/indra/newview/llviewerinventory.cpp @@ -627,10 +627,12 @@ S32 LLViewerInventoryCategory::getVersion() const void LLViewerInventoryCategory::setVersion(S32 version) { +#if 0 if (mPreferredType == LLFolderType::FT_CURRENT_OUTFIT) { llinfos << "cof version change " << mVersion << " => " << version << llendl; } +#endif mVersion = version; } -- cgit v1.2.3 From 48d684c7befae1ca7f7b43f682d7bea03fc4e0c0 Mon Sep 17 00:00:00 2001 From: "Brad Payne (Vir Linden)" Date: Mon, 29 Apr 2013 14:32:03 -0400 Subject: logcontrol.xml fix this time for sure. --- indra/newview/app_settings/logcontrol.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/indra/newview/app_settings/logcontrol.xml b/indra/newview/app_settings/logcontrol.xml index c5561166fc..92a241857e 100755 --- a/indra/newview/app_settings/logcontrol.xml +++ b/indra/newview/app_settings/logcontrol.xml @@ -42,8 +42,8 @@ tags - Avatar -- cgit v1.2.3 From ae53d22141288ab1b5ba4a5927d11cf84c59d445 Mon Sep 17 00:00:00 2001 From: "Brad Payne (Vir Linden)" Date: Mon, 29 Apr 2013 16:59:10 -0400 Subject: SH-4140 FIX, SH-3860 FIX - appearance on first-time login should now be reliable without depending on retries of appearance update requests. May still see COF mismatch errors in the log - these will only be fixed, if at all, with AISv3 integration. --- indra/newview/llappearancemgr.cpp | 13 ++++++++++--- indra/newview/llviewerinventory.cpp | 2 -- 2 files changed, 10 insertions(+), 5 deletions(-) diff --git a/indra/newview/llappearancemgr.cpp b/indra/newview/llappearancemgr.cpp index 399cea676c..40ec88f1be 100755 --- a/indra/newview/llappearancemgr.cpp +++ b/indra/newview/llappearancemgr.cpp @@ -2890,7 +2890,7 @@ protected: } if (content["success"].asBoolean()) { - LL_DEBUGS("Avatar") << dumpResponse() << LL_ENDL; + //LL_DEBUGS("Avatar") << dumpResponse() << LL_ENDL; if (gSavedSettings.getBOOL("DebugAvatarAppearanceMessage")) { dumpContents(gAgentAvatarp->getFullname() + "_appearance_request_ok", content); @@ -2907,7 +2907,8 @@ protected: { const LLSD& content = getContent(); LL_WARNS("Avatar") << "appearance update request failed " - << dumpResponse() << LL_ENDL; + << dumpResponse() << LL_ENDL; + if (gSavedSettings.getBOOL("DebugAvatarAppearanceMessage")) { dumpContents(gAgentAvatarp->getFullname() + "_appearance_request_error", content); @@ -3247,6 +3248,13 @@ void show_created_outfit(LLUUID& folder_id, bool show_panel = true) LLAppearanceMgr::getInstance()->updateIsDirty(); gAgentWearables.notifyLoadingFinished(); // New outfit is saved. LLAppearanceMgr::getInstance()->updatePanelOutfitName(""); + + // For SSB, need to update appearance after we add a base outfit + // link, since, the COF version has changed. There is a race + // condition in initial outfit setup which can lead to rez + // failures - SH-3860. + LLPointer cb = new LLUpdateAppearanceOnDestroy; + LLAppearanceMgr::getInstance()->createBaseOutfitLink(folder_id, cb); } LLUUID LLAppearanceMgr::makeNewOutfitLinks(const std::string& new_folder_name, bool show_panel) @@ -3267,7 +3275,6 @@ LLUUID LLAppearanceMgr::makeNewOutfitLinks(const std::string& new_folder_name, b LLPointer cb = new LLBoostFuncInventoryCallback(no_op_inventory_func, boost::bind(show_created_outfit,folder_id,show_panel)); shallowCopyCategoryContents(getCOF(),folder_id, cb); - createBaseOutfitLink(folder_id, cb); dumpCat(folder_id,"COF, new outfit"); diff --git a/indra/newview/llviewerinventory.cpp b/indra/newview/llviewerinventory.cpp index b39dbd51a1..d45512df9c 100755 --- a/indra/newview/llviewerinventory.cpp +++ b/indra/newview/llviewerinventory.cpp @@ -627,12 +627,10 @@ S32 LLViewerInventoryCategory::getVersion() const void LLViewerInventoryCategory::setVersion(S32 version) { -#if 0 if (mPreferredType == LLFolderType::FT_CURRENT_OUTFIT) { llinfos << "cof version change " << mVersion << " => " << version << llendl; } -#endif mVersion = version; } -- cgit v1.2.3 From b322c1dbaceaa9359243e030a125e312c54448f3 Mon Sep 17 00:00:00 2001 From: "Brad Payne (Vir Linden)" Date: Tue, 30 Apr 2013 16:54:52 -0400 Subject: SH-4140 FIX - removed a gratuitous log message --- indra/newview/llviewerinventory.cpp | 4 ---- 1 file changed, 4 deletions(-) diff --git a/indra/newview/llviewerinventory.cpp b/indra/newview/llviewerinventory.cpp index d45512df9c..f9afdee4f9 100755 --- a/indra/newview/llviewerinventory.cpp +++ b/indra/newview/llviewerinventory.cpp @@ -627,10 +627,6 @@ S32 LLViewerInventoryCategory::getVersion() const void LLViewerInventoryCategory::setVersion(S32 version) { - if (mPreferredType == LLFolderType::FT_CURRENT_OUTFIT) - { - llinfos << "cof version change " << mVersion << " => " << version << llendl; - } mVersion = version; } -- cgit v1.2.3 From 7e599539f0855fd949e59340aa6891ebc91ee27a Mon Sep 17 00:00:00 2001 From: prep Date: Wed, 1 May 2013 16:58:02 -0400 Subject: LLAppearance package update --- autobuild.xml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/autobuild.xml b/autobuild.xml index 04ac4b4c9c..fdd2cb2d67 100644 --- a/autobuild.xml +++ b/autobuild.xml @@ -1290,9 +1290,9 @@ archive hash - 5dd6d3070ece946abad8bfd2d95656cb + e452ebec5a7fce6b3345a6682c250c6e url - http://s3-proxy.lindenlab.com/private-builds-secondlife-com/hg/repo/llappearanceutility-source/rev/274933/arch/Linux/installer/llappearanceutility_source-0.1-linux-20130426.tar.bz2 + http://s3-proxy.lindenlab.com/private-builds-secondlife-com/hg/repo/llappearanceutility-source/rev/275124/arch/Linux/installer/llappearanceutility_source-0.1-linux-20130501.tar.bz2 name linux -- cgit v1.2.3 From 89cef0cad260e7c8369070c32478621f1cd22f62 Mon Sep 17 00:00:00 2001 From: "Brad Payne (Vir Linden)" Date: Wed, 1 May 2013 17:55:49 -0400 Subject: SH-4154 WIP - gInventory.validate() has inventory model internal consistency checks --- indra/newview/llinventorymodel.cpp | 197 +++++++++++++++++++++- indra/newview/llinventorymodel.h | 4 + indra/newview/llinventorymodelbackgroundfetch.cpp | 2 + 3 files changed, 202 insertions(+), 1 deletion(-) mode change 100644 => 100755 indra/newview/llinventorymodelbackgroundfetch.cpp diff --git a/indra/newview/llinventorymodel.cpp b/indra/newview/llinventorymodel.cpp index ae8efeecda..f60fd63eee 100755 --- a/indra/newview/llinventorymodel.cpp +++ b/indra/newview/llinventorymodel.cpp @@ -252,6 +252,23 @@ const LLViewerInventoryCategory* LLInventoryModel::getFirstDescendantOf(const LL return NULL; } +bool LLInventoryModel::getObjectTopmostAncestor(const LLUUID& object_id, LLUUID& result) const +{ + LLInventoryObject *object = getObject(object_id); + while (object && object->getParentUUID().notNull()) + { + LLInventoryObject *parent_object = getObject(object->getParentUUID()); + if (!parent_object) + { + llwarns << "unable to trace topmost ancestor, missing item for uuid " << object->getParentUUID() << llendl; + return false; + } + object = parent_object; + } + result = object->getUUID(); + return true; +} + // Get the object by id. Returns NULL if not found. LLInventoryObject* LLInventoryModel::getObject(const LLUUID& id) const { @@ -2083,7 +2100,7 @@ void LLInventoryModel::buildParentChildMap() // implement it, we would need a set or map of uuid pairs // which would be (folder_id, new_parent_id) to be sent up // to the server. - llinfos << "Lost categroy: " << cat->getUUID() << " - " + llinfos << "Lost category: " << cat->getUUID() << " - " << cat->getName() << llendl; ++lost; // plop it into the lost & found. @@ -2102,6 +2119,8 @@ void LLInventoryModel::buildParentChildMap() // it's a protected folder. cat->setParent(gInventory.getRootFolderID()); } + // FIXME note that updateServer() fails with protected + // types, so this will not work as intended in that case. cat->updateServer(TRUE); catsp = getUnlockedCatArray(cat->getParentUUID()); if(catsp) @@ -2247,6 +2266,11 @@ void LLInventoryModel::buildParentChildMap() notifyObservers(); } } + + //if (!gInventory.validate()) + //{ + // llwarns << "model failed validity check!" << llendl; + //} } struct LLUUIDAndName @@ -2917,6 +2941,9 @@ void LLInventoryModel::processBulkUpdateInventory(LLMessageSystem* msg, void**) InventoryCallbackInfo cbinfo = (*inv_it); gInventoryCallbacks.fire(cbinfo.mCallback, cbinfo.mInvID); } + + //gInventory.validate(); + // Don't show the inventory. We used to call showAgentInventory here. //LLFloaterInventory* view = LLFloaterInventory::getActiveInventory(); //if(view) @@ -3363,6 +3390,174 @@ void LLInventoryModel::dumpInventory() const llinfos << "\n**********************\nEnd Inventory Dump" << llendl; } +// Do various integrity checks on model, logging issues found and +// returning an overall good/bad flag. +bool LLInventoryModel::validate() const +{ + bool valid = true; + + if (getRootFolderID().isNull()) + { + llwarns << "no root folder id" << llendl; + valid = false; + } + if (getLibraryRootFolderID().isNull()) + { + llwarns << "no root folder id" << llendl; + valid = false; + } + + if (mCategoryMap.size() + 1 != mParentChildCategoryTree.size()) + { + // ParentChild should be one larger because of the special entry for null uuid. + llinfos << "unexpected sizes: cat map size " << mCategoryMap.size() + << " parent/child " << mParentChildCategoryTree.size() << llendl; + valid = false; + } + S32 cat_lock = 0; + S32 item_lock = 0; + S32 desc_unknown_count = 0; + S32 version_unknown_count = 0; + for(cat_map_t::const_iterator cit = mCategoryMap.begin(); cit != mCategoryMap.end(); ++cit) + { + const LLUUID& cat_id = cit->first; + const LLViewerInventoryCategory *cat = cit->second; + if (!cat) + { + llwarns << "invalid cat" << llendl; + valid = false; + continue; + } + if (cat_id != cat->getUUID()) + { + llwarns << "cat id/index mismatch " << cat_id << " " << cat->getUUID() << llendl; + valid = false; + } + + if (cat->getParentUUID().isNull()) + { + if (cat_id != getRootFolderID() && cat_id != getLibraryRootFolderID()) + { + llwarns << "cat " << cat_id << " has no parent, but is not root (" + << getRootFolderID() << ") or library root (" + << getLibraryRootFolderID() << ")" << llendl; + } + } + cat_array_t* cats; + item_array_t* items; + getDirectDescendentsOf(cat_id,cats,items); + if (!cats || !items) + { + llwarns << "invalid direct descendents for " << cat_id << llendl; + valid = false; + continue; + } + if (cat->getDescendentCount() == LLViewerInventoryCategory::DESCENDENT_COUNT_UNKNOWN) + { + desc_unknown_count++; + } + else if (cats->size() + items->size() != cat->getDescendentCount()) + { + llwarns << "invalid desc count for " << cat_id << " name " << cat->getName() + << " cached " << cat->getDescendentCount() + << " expected " << cats->size() << "+" << items->size() + << "=" << cats->size() +items->size() << llendl; + valid = false; + } + if (cat->getVersion() == LLViewerInventoryCategory::VERSION_UNKNOWN) + { + version_unknown_count++; + } + if (mCategoryLock.count(cat_id)) + { + cat_lock++; + } + if (mItemLock.count(cat_id)) + { + item_lock++; + } + for (S32 i = 0; isize(); i++) + { + LLViewerInventoryItem *item = items->get(i); + + if (!item) + { + llwarns << "null item at index " << i << " for cat " << cat_id << llendl; + valid = false; + continue; + } + + const LLUUID& item_id = item->getUUID(); + + if (item->getParentUUID() != cat_id) + { + llwarns << "wrong parent for " << item_id << " found " + << item->getParentUUID() << " expected " << cat_id + << llendl; + valid = false; + } + + + // Entries in items and mItemMap should correspond. + item_map_t::const_iterator it = mItemMap.find(item_id); + if (it == mItemMap.end()) + { + llwarns << "item " << item_id << " found as child of " + << cat_id << " but not in top level mItemMap" << llendl; + valid = false; + } + else + { + LLViewerInventoryItem *top_item = it->second; + if (top_item != item) + { + llwarns << "item mismatch, item_id " << item_id + << " top level entry is different, uuid " << top_item->getUUID() << llendl; + } + } + + // Topmost ancestor should be root or library. + LLUUID topmost_ancestor_id; + bool found = getObjectTopmostAncestor(item_id, topmost_ancestor_id); + if (!found) + { + llwarns << "unable to find topmost ancestor for " << item_id << llendl; + valid = false; + } + else + { + if (topmost_ancestor_id != getRootFolderID() && + topmost_ancestor_id != getLibraryRootFolderID()) + { + llwarns << "unrecognized top level ancestor for " << item_id + << " got " << topmost_ancestor_id + << " expected " << getRootFolderID() + << " or " << getLibraryRootFolderID() << llendl; + valid = false; + } + } + } + + } + if (cat_lock > 0 || item_lock > 0) + { + llwarns << "Found locks on some categories: sub-cat arrays " + << cat_lock << ", item arrays " << item_lock << llendl; + } + if (desc_unknown_count != 0) + { + llinfos << "Found " << desc_unknown_count << " cats with unknown descendent count" << llendl; + } + if (version_unknown_count != 0) + { + llinfos << "Found " << version_unknown_count << " cats with unknown version" << llendl; + } + + llinfos << "Validate done, valid = " << (U32) valid << llendl; + + return valid; +} + ///---------------------------------------------------------------------------- /// Local function definitions ///---------------------------------------------------------------------------- diff --git a/indra/newview/llinventorymodel.h b/indra/newview/llinventorymodel.h index b7e1888f20..2459f10a37 100755 --- a/indra/newview/llinventorymodel.h +++ b/indra/newview/llinventorymodel.h @@ -227,6 +227,9 @@ public: // Check if one object has a parent chain up to the category specified by UUID. BOOL isObjectDescendentOf(const LLUUID& obj_id, const LLUUID& cat_id) const; + // Follow parent chain to the top. + bool getObjectTopmostAncestor(const LLUUID& object_id, LLUUID& result) const; + //-------------------------------------------------------------------- // Find //-------------------------------------------------------------------- @@ -551,6 +554,7 @@ private: //-------------------------------------------------------------------- public: void dumpInventory() const; + bool validate() const; /** Miscellaneous ** ** diff --git a/indra/newview/llinventorymodelbackgroundfetch.cpp b/indra/newview/llinventorymodelbackgroundfetch.cpp old mode 100644 new mode 100755 index 01b0e647a9..4eeb528c66 --- a/indra/newview/llinventorymodelbackgroundfetch.cpp +++ b/indra/newview/llinventorymodelbackgroundfetch.cpp @@ -172,6 +172,8 @@ void LLInventoryModelBackgroundFetch::setAllFoldersFetched() mRecursiveLibraryFetchStarted) { mAllFoldersFetched = TRUE; + //llinfos << "All folders fetched, validating" << llendl; + //gInventory.validate(); } mFolderFetchActive = false; } -- cgit v1.2.3