From d290f2c512a3bdbb526fc0fc00e17a9c8bdc0693 Mon Sep 17 00:00:00 2001 From: andreykproductengine Date: Mon, 21 Aug 2017 17:41:41 +0300 Subject: [PATCH 01/16] BUG-134134 Additional logging --- indra/newview/llappviewer.cpp | 2 ++ indra/newview/lltexturecache.cpp | 1 + 2 files changed, 3 insertions(+) diff --git a/indra/newview/llappviewer.cpp b/indra/newview/llappviewer.cpp index ee4eed347d..958876fb0a 100644 --- a/indra/newview/llappviewer.cpp +++ b/indra/newview/llappviewer.cpp @@ -4422,6 +4422,7 @@ bool LLAppViewer::initCache() if (gSavedSettings.getBOOL("PurgeCacheOnStartup") || gSavedSettings.getBOOL("PurgeCacheOnNextStartup")) { + LL_INFOS("AppCache") << "Startup cache purge requested: " << (gSavedSettings.getBOOL("PurgeCacheOnStartup") ? "ALWAYS" : "ONCE") << LL_ENDL; gSavedSettings.setBOOL("PurgeCacheOnNextStartup", false); mPurgeCache = true; // STORM-1141 force purgeAllTextures to get called to prevent a crash here. -brad @@ -4436,6 +4437,7 @@ bool LLAppViewer::initCache() std::string new_cache_location = gSavedSettings.getString("NewCacheLocation"); if (new_cache_location != cache_location) { + LL_INFOS("AppCache") << "Cache location changed, cache needs purging" << LL_ENDL; gDirUtilp->setCacheDir(gSavedSettings.getString("CacheLocation")); purgeCache(); // purge old cache gSavedSettings.setString("CacheLocation", new_cache_location); diff --git a/indra/newview/lltexturecache.cpp b/indra/newview/lltexturecache.cpp index 5561fddb9d..8b90a0a737 100644 --- a/indra/newview/lltexturecache.cpp +++ b/indra/newview/lltexturecache.cpp @@ -1470,6 +1470,7 @@ void LLTextureCache::readHeaderCache() { if (!mReadOnly) { + LL_INFOS() << "Texture Cache version mismatch, Purging." << LL_ENDL; purgeAllTextures(false); } } From d775f9b63dd842613abe254fd80451fb318502c1 Mon Sep 17 00:00:00 2001 From: Mnikolenko Productengine Date: Wed, 23 Aug 2017 18:45:45 +0300 Subject: [PATCH 02/16] MAINT-7732 FIXED Crash in LLLiveLSLEditor::loadScriptText --- indra/newview/llpreviewscript.cpp | 10 +++++++++- indra/newview/llpreviewscript.h | 1 + 2 files changed, 10 insertions(+), 1 deletion(-) diff --git a/indra/newview/llpreviewscript.cpp b/indra/newview/llpreviewscript.cpp index b7fea4e982..3c5e2544bb 100644 --- a/indra/newview/llpreviewscript.cpp +++ b/indra/newview/llpreviewscript.cpp @@ -584,6 +584,14 @@ void LLScriptEdCore::setScriptText(const std::string& text, BOOL is_valid) } } +void LLScriptEdCore::makeEditorPristine() +{ + if (mEditor) + { + mEditor->makePristine(); + } +} + bool LLScriptEdCore::loadScriptText(const std::string& filename) { if (filename.empty()) @@ -2026,7 +2034,7 @@ void LLLiveLSLEditor::loadScriptText(LLVFS *vfs, const LLUUID &uuid, LLAssetType buffer[file_length] = '\0'; mScriptEd->setScriptText(LLStringExplicit(&buffer[0]), TRUE); - mScriptEd->mEditor->makePristine(); + mScriptEd->makeEditorPristine(); mScriptEd->setScriptName(getItem()->getName()); } diff --git a/indra/newview/llpreviewscript.h b/indra/newview/llpreviewscript.h index 6b31125641..8178bb9325 100644 --- a/indra/newview/llpreviewscript.h +++ b/indra/newview/llpreviewscript.h @@ -90,6 +90,7 @@ public: bool canLoadOrSaveToFile( void* userdata ); void setScriptText(const std::string& text, BOOL is_valid); + void makeEditorPristine(); bool loadScriptText(const std::string& filename); bool writeToFile(const std::string& filename); void sync(); From 1b264af38ca835f4dc64e965846a71313d4be781 Mon Sep 17 00:00:00 2001 From: andreykproductengine Date: Wed, 23 Aug 2017 18:39:47 +0300 Subject: [PATCH 03/16] MAINT-7737 Fixed memory leak in Outfit Gallery --- indra/newview/lloutfitgallery.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/indra/newview/lloutfitgallery.cpp b/indra/newview/lloutfitgallery.cpp index 0d289e6d87..cca65f2ce1 100644 --- a/indra/newview/lloutfitgallery.cpp +++ b/indra/newview/lloutfitgallery.cpp @@ -1215,6 +1215,7 @@ void LLOutfitGallery::uploadPhoto(LLUUID outfit_id) upload_pending_name, callback, expected_upload_cost, nruserdata); mOutfitLinkPending = outfit_id; } + delete unit; } } From 04618144ffd5d456c9365c5153c4357ea74c6797 Mon Sep 17 00:00:00 2001 From: andreykproductengine Date: Wed, 23 Aug 2017 21:20:45 +0300 Subject: [PATCH 04/16] MAINT-7665 Remove menu option should delete both links and images --- indra/newview/llappearancemgr.cpp | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/indra/newview/llappearancemgr.cpp b/indra/newview/llappearancemgr.cpp index 12159738d8..e9b2a43f38 100644 --- a/indra/newview/llappearancemgr.cpp +++ b/indra/newview/llappearancemgr.cpp @@ -1572,9 +1572,15 @@ void LLAppearanceMgr::removeOutfitPhoto(const LLUUID& outfit_id) LLInventoryModel::EXCLUDE_TRASH); BOOST_FOREACH(LLViewerInventoryItem* outfit_item, outfit_item_array) { - // Note: removing only links LLViewerInventoryItem* linked_item = outfit_item->getLinkedItem(); - if (linked_item != NULL && linked_item->getActualType() == LLAssetType::AT_TEXTURE) + if (linked_item != NULL) + { + if (linked_item->getActualType() == LLAssetType::AT_TEXTURE) + { + gInventory.removeItem(outfit_item->getUUID()); + } + } + else if (outfit_item->getActualType() == LLAssetType::AT_TEXTURE) { gInventory.removeItem(outfit_item->getUUID()); } From 2c02c89b5805fc63b09e5a5215a771b43b59ce8e Mon Sep 17 00:00:00 2001 From: Mnikolenko Productengine Date: Fri, 25 Aug 2017 11:50:02 +0300 Subject: [PATCH 05/16] MAINT-7683 Use viewer autopilot instead of simulator autopilot for "click-to-walk" action. --- indra/newview/lltoolpie.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/indra/newview/lltoolpie.cpp b/indra/newview/lltoolpie.cpp index b829741b3c..f7b063b398 100644 --- a/indra/newview/lltoolpie.cpp +++ b/indra/newview/lltoolpie.cpp @@ -485,7 +485,8 @@ void LLToolPie::walkToClickedLocation() mAutoPilotDestination->setColor(LLColor4U(170, 210, 190)); mAutoPilotDestination->setDuration(3.f); - handle_go_to(); + LLVector3d pos = LLToolPie::getInstance()->getPick().mPosGlobal; + gAgent.startAutoPilotGlobal(pos, std::string(), NULL, NULL, NULL, 0.f, 0.03f, FALSE); } // When we get object properties after left-clicking on an object From cbd4c0196fc32f94c6f9a41d161b65f4609985d4 Mon Sep 17 00:00:00 2001 From: andreykproductengine Date: Thu, 17 Aug 2017 15:32:01 +0300 Subject: [PATCH 06/16] SL-683 Instrument viewer cache --- indra/newview/lltextureinfo.cpp | 48 +++++++++++++++++++++++++++++++- indra/newview/lltexturestats.cpp | 3 ++ indra/newview/llviewerregion.cpp | 6 +++- indra/newview/llviewerregion.h | 6 +++- indra/newview/llvocache.h | 3 ++ 5 files changed, 63 insertions(+), 3 deletions(-) diff --git a/indra/newview/lltextureinfo.cpp b/indra/newview/lltextureinfo.cpp index 473d8ce709..5f1e14e406 100644 --- a/indra/newview/lltextureinfo.cpp +++ b/indra/newview/lltextureinfo.cpp @@ -26,10 +26,19 @@ #include "llviewerprecompiledheaders.h" +#include "llagent.h" +#include "llmeshrepository.h" +#include "llsdutil.h" #include "lltextureinfo.h" +#include "lltexturecache.h" +#include "lltexturefetch.h" #include "lltexturestats.h" -#include "llviewercontrol.h" #include "lltrace.h" +#include "llviewercontrol.h" +#include "llviewerregion.h" +#include "llviewerstats.h" +#include "llvocache.h" +#include "llworld.h" static LLTrace::CountStatHandle sTextureDownloadsStarted("texture_downloads_started", "number of texture downloads initiated"); static LLTrace::CountStatHandle sTextureDownloadsCompleted("texture_downloads_completed", "number of texture downloads completed"); @@ -175,6 +184,43 @@ void LLTextureInfo::setRequestCompleteTimeAndLog(const LLUUID& id, U64Microsecon endTime << completeTime; texture_data["end_time"] = endTime.str(); texture_data["averages"] = getAverages(); + + // Texture cache + LLSD texture_cache; + U32 cache_read = 0, cache_write = 0, res_wait = 0; + F64 cache_hit_rate = 0; + LLAppViewer::getTextureFetch()->getStateStats(&cache_read, &cache_write, &res_wait); + if (cache_read > 0 || cache_write > 0) + { + cache_hit_rate = cache_read / (cache_read + cache_write); + } + texture_cache["cache_read"] = LLSD::Integer(cache_read); + texture_cache["cache_write"] = LLSD::Integer(cache_write); + texture_cache["hit_rate"] = LLSD::Real(cache_hit_rate); + texture_cache["entries"] = LLSD::Integer(LLAppViewer::getTextureCache()->getEntries()); + texture_cache["space_max"] = ll_sd_from_U64((U64)LLAppViewer::getTextureCache()->getMaxUsage().value()); // bytes + texture_cache["space_used"] = ll_sd_from_U64((U64)LLAppViewer::getTextureCache()->getUsage().value()); // bytes + texture_data["texture_cache"] = texture_cache; + + // VO and mesh cache + LLSD object_cache; + object_cache["vo_entries_max"] = LLSD::Integer(LLVOCache::getInstance()->getCacheEntriesMax()); + object_cache["vo_entries_curent"] = LLSD::Integer(LLVOCache::getInstance()->getCacheEntries()); + object_cache["vo_active_entries"] = LLSD::Integer(LLWorld::getInstance()->getNumOfActiveCachedObjects()); + U64 region_hit_count = gAgent.getRegion() != NULL ? gAgent.getRegion()->getRegionCacheHitCount() : 0; + U64 region_miss_count = gAgent.getRegion() != NULL ? gAgent.getRegion()->getRegionCacheMissCount() : 0; + F64 region_vocache_hit_rate = 0; + if (region_hit_count > 0 || region_miss_count > 0) + { + region_vocache_hit_rate = region_hit_count / (region_hit_count + region_miss_count); + } + object_cache["vo_region_hitcount"] = ll_sd_from_U64(region_hit_count); + object_cache["vo_region_misscount"] = ll_sd_from_U64(region_miss_count); + object_cache["vo_region_hitrate"] = LLSD::Real(region_vocache_hit_rate); + object_cache["mesh_reads"] = LLSD::Integer(LLMeshRepository::sCacheReads); + object_cache["mesh_writes"] = LLSD::Integer(LLMeshRepository::sCacheWrites); + texture_data["object_cache"] = object_cache; + send_texture_stats_to_sim(texture_data); resetTextureStatistics(); } diff --git a/indra/newview/lltexturestats.cpp b/indra/newview/lltexturestats.cpp index 8ded148e17..b55b4d9ca4 100644 --- a/indra/newview/lltexturestats.cpp +++ b/indra/newview/lltexturestats.cpp @@ -30,6 +30,7 @@ #include "llagent.h" #include "lltexturefetch.h" #include "lltexturestats.h" +#include "llversioninfo.h" #include "llviewerregion.h" #include "llcorehttputil.h" @@ -45,6 +46,8 @@ void send_texture_stats_to_sim(const LLSD &texture_stats) LLUUID agent_id = gAgent.getID(); texture_stats_report["agent_id"] = agent_id; texture_stats_report["region_id"] = gAgent.getRegion()->getRegionID(); + texture_stats_report["viewer_channel"] = LLVersionInfo::getChannel(); + texture_stats_report["viewer_version"] = LLVersionInfo::getVersion(); texture_stats_report["stats_data"] = texture_stats; std::string texture_cap_url = gAgent.getRegion()->getCapability("TextureStats"); diff --git a/indra/newview/llviewerregion.cpp b/indra/newview/llviewerregion.cpp index eb37613c95..3fd2af87de 100644 --- a/indra/newview/llviewerregion.cpp +++ b/indra/newview/llviewerregion.cpp @@ -532,7 +532,9 @@ LLViewerRegion::LLViewerRegion(const U64 &handle, mDead(FALSE), mLastVisitedEntry(NULL), mInvisibilityCheckHistory(-1), - mPaused(FALSE) + mPaused(FALSE), + mRegionCacheHitCount(0), + mRegionCacheMissCount(0) { mWidth = region_width_meters; mImpl->mOriginGlobal = from_region_handle(handle); @@ -2440,6 +2442,7 @@ LLVOCacheEntry* LLViewerRegion::getCacheEntry(U32 local_id, bool valid) void LLViewerRegion::addCacheMiss(U32 id, LLViewerRegion::eCacheMissType miss_type) { + mRegionCacheMissCount++; #if 0 mCacheMissList.insert(CacheMissItem(id, miss_type)); #else @@ -2491,6 +2494,7 @@ bool LLViewerRegion::probeCache(U32 local_id, U32 crc, U32 flags, U8 &cache_miss if (entry->getCRC() == crc) { // Record a hit + mRegionCacheHitCount++; entry->recordHit(); cache_miss_type = CACHE_MISS_TYPE_NONE; entry->setUpdateFlags(flags); diff --git a/indra/newview/llviewerregion.h b/indra/newview/llviewerregion.h index 61ce5b454d..69fb9c4d4e 100644 --- a/indra/newview/llviewerregion.h +++ b/indra/newview/llviewerregion.h @@ -338,6 +338,8 @@ public: LLVOCacheEntry* getCacheEntryForOctree(U32 local_id); LLVOCacheEntry* getCacheEntry(U32 local_id, bool valid = true); bool probeCache(U32 local_id, U32 crc, U32 flags, U8 &cache_miss_type); + U64 getRegionCacheHitCount() { return mRegionCacheHitCount; } + U64 getRegionCacheMissCount() { return mRegionCacheMissCount; } void requestCacheMisses(); void addCacheMissFull(const U32 local_id); //update object cache if the object receives a full-update or terse update @@ -534,7 +536,9 @@ private: typedef std::list cache_miss_list_t; }; CacheMissItem::cache_miss_list_t mCacheMissList; - + U64 mRegionCacheHitCount; + U64 mRegionCacheMissCount; + caps_received_signal_t mCapabilitiesReceivedSignal; caps_received_signal_t mSimulatorFeaturesReceivedSignal; diff --git a/indra/newview/llvocache.h b/indra/newview/llvocache.h index 230a81fb76..7d450c5231 100644 --- a/indra/newview/llvocache.h +++ b/indra/newview/llvocache.h @@ -268,6 +268,9 @@ public: void setReadOnly(bool read_only) {mReadOnly = read_only;} + U32 getCacheEntries() { return mNumEntries; } + U32 getCacheEntriesMax() { return mCacheSize; } + private: void setDirNames(ELLPath location); // determine the cache filename for the region from the region handle From b3ceeb6d9cf92613a06337b5985e225c612e53d5 Mon Sep 17 00:00:00 2001 From: Oz Linden Date: Thu, 24 Aug 2017 10:37:59 -0400 Subject: [PATCH 07/16] MAINT-7594: add platform name string and address size to login request for crash stats (and add request parameter logging at DEBUG) --- indra/newview/llappviewer.cpp | 2 +- indra/newview/lllogininstance.cpp | 29 ++++- indra/newview/lllogininstance.h | 3 +- indra/newview/tests/lllogininstance_test.cpp | 107 +------------------ 4 files changed, 29 insertions(+), 112 deletions(-) diff --git a/indra/newview/llappviewer.cpp b/indra/newview/llappviewer.cpp index 37340a42b6..069b79bb50 100644 --- a/indra/newview/llappviewer.cpp +++ b/indra/newview/llappviewer.cpp @@ -734,7 +734,7 @@ LLAppViewer::LLAppViewer() // LLLoginInstance::instance().setUpdaterService(mUpdater.get()); - LLLoginInstance::instance().setPlatformInfo(gPlatform, getOSInfo().getOSVersionString()); + LLLoginInstance::instance().setPlatformInfo(gPlatform, getOSInfo().getOSVersionString(), getOSInfo().getOSStringSimple()); } LLAppViewer::~LLAppViewer() diff --git a/indra/newview/lllogininstance.cpp b/indra/newview/lllogininstance.cpp index b4d0bb6823..bacd88e0e0 100644 --- a/indra/newview/lllogininstance.cpp +++ b/indra/newview/lllogininstance.cpp @@ -59,10 +59,16 @@ #include "llupdaterservice.h" #include "llevents.h" #include "llappviewer.h" +#include "llsdserialize.h" #include #include +// this can be removed once it is defined by the build for all forks +#ifndef ADDRESS_SIZE +# define ADDRESS_SIZE 32 +#endif + class LLLoginInstance::Disposable { public: virtual ~Disposable() {} @@ -493,10 +499,12 @@ LLLoginInstance::LLLoginInstance() : } void LLLoginInstance::setPlatformInfo(const std::string platform, - const std::string platform_version) + const std::string platform_version, + const std::string platform_name) { mPlatform = platform; mPlatformVersion = platform_version; + mPlatformVersionName = platform_name; } LLLoginInstance::~LLLoginInstance() @@ -565,7 +573,6 @@ void LLLoginInstance::constructAuthParams(LLPointer user_credentia requested_options.append("event_notifications"); requested_options.append("classified_categories"); requested_options.append("adult_compliant"); - //requested_options.append("inventory-targets"); requested_options.append("buddy-list"); requested_options.append("newuser-config"); requested_options.append("ui-config"); @@ -587,8 +594,7 @@ void LLLoginInstance::constructAuthParams(LLPointer user_credentia requested_options.append("god-connect"); } - // (re)initialize the request params with creds. - LLSD request_params = user_credential->getLoginParams(); + LLSD request_params; unsigned char hashed_unique_id_string[MD5HEX_STR_SIZE]; if ( ! llHashedUniqueID(hashed_unique_id_string) ) @@ -605,11 +611,26 @@ void LLLoginInstance::constructAuthParams(LLPointer user_credentia request_params["version"] = LLVersionInfo::getVersion(); request_params["channel"] = LLVersionInfo::getChannel(); request_params["platform"] = mPlatform; + request_params["address_size"] = ADDRESS_SIZE; request_params["platform_version"] = mPlatformVersion; + request_params["platform_string"] = mPlatformVersionName; request_params["id0"] = mSerialNumber; request_params["host_id"] = gSavedSettings.getString("HostID"); request_params["extended_errors"] = true; // request message_id and message_args + // log request_params _before_ adding the credentials + LL_DEBUGS("LLLogin") << "Login parameters: " << LLSDOStreamer(request_params) << LL_ENDL; + + // Copy the credentials into the request after logging the rest + LLSD credentials(user_credential->getLoginParams()); + for (LLSD::map_const_iterator it = credentials.beginMap(); + it != credentials.endMap(); + it++ + ) + { + request_params[it->first] = it->second; + } + mRequestData.clear(); mRequestData["method"] = "login_to_simulator"; mRequestData["params"] = request_params; diff --git a/indra/newview/lllogininstance.h b/indra/newview/lllogininstance.h index 282ddc1cea..1adea67189 100644 --- a/indra/newview/lllogininstance.h +++ b/indra/newview/lllogininstance.h @@ -67,7 +67,7 @@ public: void setSerialNumber(const std::string& sn) { mSerialNumber = sn; } void setLastExecEvent(int lee) { mLastExecEvent = lee; } void setLastExecDuration(S32 duration) { mLastExecDuration = duration; } - void setPlatformInfo(const std::string platform, const std::string platform_version); + void setPlatformInfo(const std::string platform, const std::string platform_version, const std::string platform_name); void setNotificationsInterface(LLNotificationsInterface* ni) { mNotifications = ni; } LLNotificationsInterface& getNotificationsInterface() const { return *mNotifications; } @@ -105,6 +105,7 @@ private: S32 mLastExecDuration; std::string mPlatform; std::string mPlatformVersion; + std::string mPlatformVersionName; UpdaterLauncherCallback mUpdaterLauncher; LLEventDispatcher mDispatcher; LLUpdaterService * mUpdaterService; diff --git a/indra/newview/tests/lllogininstance_test.cpp b/indra/newview/tests/lllogininstance_test.cpp index b603157ca7..978678a09c 100644 --- a/indra/newview/tests/lllogininstance_test.cpp +++ b/indra/newview/tests/lllogininstance_test.cpp @@ -362,7 +362,7 @@ namespace tut accountCredential->setCredentialData(identifier, authenticator); logininstance->setNotificationsInterface(¬ifications); - logininstance->setPlatformInfo("win", "1.3.5"); + logininstance->setPlatformInfo("win", "1.3.5", "Windows Bogus Version 100.6.6.6"); } LLLoginInstance* logininstance; @@ -478,109 +478,4 @@ namespace tut ensure_equals("Default for agree to tos", gLoginCreds["params"]["read_critical"].asBoolean(), false); } - template<> template<> - void lllogininstance_object::test<3>() - { - set_test_name("Test Mandatory Update User Accepts"); - - // Part 1 - Mandatory Update, with User accepts response. - // Test connect with update needed. - logininstance->connect(agentCredential); - - ensure_equals("Default connect uri", gLoginURI, VIEWERLOGIN_URI); - - // Update needed failure response. - LLSD response; - response["state"] = "offline"; - response["change"] = "fail.login"; - response["progress"] = 0.0; - response["transfer_rate"] = 7; - response["data"]["reason"] = "update"; - gTestPump.post(response); - - ensure_equals("Notification added", notifications.addedCount(), 1); - - notifications.sendYesResponse(); - - ensure("Disconnected", !(logininstance->authSuccess())); - } - - template<> template<> - void lllogininstance_object::test<4>() - { - set_test_name("Test Mandatory Update User Decline"); - - // Test connect with update needed. - logininstance->connect(agentCredential); - - ensure_equals("Default connect uri", gLoginURI, VIEWERLOGIN_URI); - - // Update needed failure response. - LLSD response; - response["state"] = "offline"; - response["change"] = "fail.login"; - response["progress"] = 0.0; - response["transfer_rate"] = 7; - response["data"]["reason"] = "update"; - gTestPump.post(response); - - ensure_equals("Notification added", notifications.addedCount(), 1); - notifications.sendNoResponse(); - - ensure("Disconnected", !(logininstance->authSuccess())); - } - - template<> template<> - void lllogininstance_object::test<6>() - { - set_test_name("Test Optional Update User Accept"); - - // Part 3 - Mandatory Update, with bogus response. - // Test connect with update needed. - logininstance->connect(agentCredential); - - ensure_equals("Default connect uri", gLoginURI, VIEWERLOGIN_URI); - - // Update needed failure response. - LLSD response; - response["state"] = "offline"; - response["change"] = "fail.login"; - response["progress"] = 0.0; - response["transfer_rate"] = 7; - response["data"]["reason"] = "optional"; - gTestPump.post(response); - - ensure_equals("Notification added", notifications.addedCount(), 1); - notifications.sendYesResponse(); - - ensure("Disconnected", !(logininstance->authSuccess())); - } - - template<> template<> - void lllogininstance_object::test<7>() - { - set_test_name("Test Optional Update User Denies"); - - // Part 3 - Mandatory Update, with bogus response. - // Test connect with update needed. - logininstance->connect(agentCredential); - - ensure_equals("Default connect uri", gLoginURI, VIEWERLOGIN_URI); - - // Update needed failure response. - LLSD response; - response["state"] = "offline"; - response["change"] = "fail.login"; - response["progress"] = 0.0; - response["transfer_rate"] = 7; - response["data"]["reason"] = "optional"; - gTestPump.post(response); - - ensure_equals("Notification added", notifications.addedCount(), 1); - notifications.sendNoResponse(); - - // User skips, should be reconnecting. - ensure_equals("reconnect uri", gLoginURI, VIEWERLOGIN_URI); - ensure_equals("skipping optional update", gLoginCreds["params"]["skipoptional"].asBoolean(), true); - } } From e46f66ff31607d7580be3cae3fef9d070b9ba0d0 Mon Sep 17 00:00:00 2001 From: Mnikolenko Productengine Date: Fri, 25 Aug 2017 17:02:33 +0300 Subject: [PATCH 08/16] MAINT-7752 FIXED Crash in LLPreviewNotecard::handleSaveChangesDialog --- indra/newview/llpreview.cpp | 3 ++- indra/newview/llpreview.h | 3 ++- indra/newview/llpreviewgesture.cpp | 11 ++++++++--- indra/newview/llpreviewnotecard.cpp | 10 +++++++--- indra/newview/llpreviewscript.cpp | 12 +++++++++--- indra/newview/llpreviewscript.h | 1 + 6 files changed, 29 insertions(+), 11 deletions(-) diff --git a/indra/newview/llpreview.cpp b/indra/newview/llpreview.cpp index fb21b980dc..fc2de4844e 100644 --- a/indra/newview/llpreview.cpp +++ b/indra/newview/llpreview.cpp @@ -62,7 +62,8 @@ LLPreview::LLPreview(const LLSD& key) mUserResized(FALSE), mCloseAfterSave(FALSE), mAssetStatus(PREVIEW_ASSET_UNLOADED), - mDirty(TRUE) + mDirty(TRUE), + mSaveDialogShown(FALSE) { mAuxItem = new LLInventoryItem; // don't necessarily steal focus on creation -- sometimes these guys pop up without user action diff --git a/indra/newview/llpreview.h b/indra/newview/llpreview.h index 49c114720b..b41aa2be1a 100644 --- a/indra/newview/llpreview.h +++ b/indra/newview/llpreview.h @@ -121,7 +121,8 @@ protected: // for LLInventoryObserver virtual void changed(U32 mask); BOOL mDirty; - + BOOL mSaveDialogShown; + protected: LLUUID mItemUUID; diff --git a/indra/newview/llpreviewgesture.cpp b/indra/newview/llpreviewgesture.cpp index ff9a70d05c..787bd68e58 100644 --- a/indra/newview/llpreviewgesture.cpp +++ b/indra/newview/llpreviewgesture.cpp @@ -234,9 +234,13 @@ BOOL LLPreviewGesture::canClose() } else { - // Bring up view-modal dialog: Save changes? Yes, No, Cancel - LLNotificationsUtil::add("SaveChanges", LLSD(), LLSD(), - boost::bind(&LLPreviewGesture::handleSaveChangesDialog, this, _1, _2) ); + if(!mSaveDialogShown) + { + mSaveDialogShown = TRUE; + // Bring up view-modal dialog: Save changes? Yes, No, Cancel + LLNotificationsUtil::add("SaveChanges", LLSD(), LLSD(), + boost::bind(&LLPreviewGesture::handleSaveChangesDialog, this, _1, _2) ); + } return FALSE; } } @@ -264,6 +268,7 @@ void LLPreviewGesture::onVisibilityChanged ( const LLSD& new_visibility ) bool LLPreviewGesture::handleSaveChangesDialog(const LLSD& notification, const LLSD& response) { + mSaveDialogShown = FALSE; S32 option = LLNotificationsUtil::getSelectedOption(notification, response); switch(option) { diff --git a/indra/newview/llpreviewnotecard.cpp b/indra/newview/llpreviewnotecard.cpp index 510d91839d..850c3b350d 100644 --- a/indra/newview/llpreviewnotecard.cpp +++ b/indra/newview/llpreviewnotecard.cpp @@ -153,9 +153,12 @@ BOOL LLPreviewNotecard::canClose() } else { - // Bring up view-modal dialog: Save changes? Yes, No, Cancel - LLNotificationsUtil::add("SaveChanges", LLSD(), LLSD(), boost::bind(&LLPreviewNotecard::handleSaveChangesDialog,this, _1, _2)); - + if(!mSaveDialogShown) + { + mSaveDialogShown = TRUE; + // Bring up view-modal dialog: Save changes? Yes, No, Cancel + LLNotificationsUtil::add("SaveChanges", LLSD(), LLSD(), boost::bind(&LLPreviewNotecard::handleSaveChangesDialog,this, _1, _2)); + } return FALSE; } } @@ -639,6 +642,7 @@ void LLPreviewNotecard::onSaveComplete(const LLUUID& asset_uuid, void* user_data bool LLPreviewNotecard::handleSaveChangesDialog(const LLSD& notification, const LLSD& response) { + mSaveDialogShown = FALSE; S32 option = LLNotificationsUtil::getSelectedOption(notification, response); switch(option) { diff --git a/indra/newview/llpreviewscript.cpp b/indra/newview/llpreviewscript.cpp index 3c5e2544bb..2476b6d6ed 100644 --- a/indra/newview/llpreviewscript.cpp +++ b/indra/newview/llpreviewscript.cpp @@ -376,7 +376,8 @@ LLScriptEdCore::LLScriptEdCore( mLive(live), mContainer(container), mHasScriptData(FALSE), - mScriptRemoved(FALSE) + mScriptRemoved(FALSE), + mSaveDialogShown(FALSE) { setFollowsAll(); setBorderVisible(FALSE); @@ -855,8 +856,12 @@ BOOL LLScriptEdCore::canClose() } else { - // Bring up view-modal dialog: Save changes? Yes, No, Cancel - LLNotificationsUtil::add("SaveChanges", LLSD(), LLSD(), boost::bind(&LLScriptEdCore::handleSaveChangesDialog, this, _1, _2)); + if(!mSaveDialogShown) + { + mSaveDialogShown = TRUE; + // Bring up view-modal dialog: Save changes? Yes, No, Cancel + LLNotificationsUtil::add("SaveChanges", LLSD(), LLSD(), boost::bind(&LLScriptEdCore::handleSaveChangesDialog, this, _1, _2)); + } return FALSE; } } @@ -869,6 +874,7 @@ void LLScriptEdCore::setEnableEditing(bool enable) bool LLScriptEdCore::handleSaveChangesDialog(const LLSD& notification, const LLSD& response ) { + mSaveDialogShown = FALSE; S32 option = LLNotificationsUtil::getSelectedOption(notification, response); switch( option ) { diff --git a/indra/newview/llpreviewscript.h b/indra/newview/llpreviewscript.h index 8178bb9325..a185d85889 100644 --- a/indra/newview/llpreviewscript.h +++ b/indra/newview/llpreviewscript.h @@ -167,6 +167,7 @@ private: LLLiveLSLFile* mLiveFile; LLUUID mAssociatedExperience; BOOL mScriptRemoved; + BOOL mSaveDialogShown; LLScriptEdContainer* mContainer; // parent view From c21b3bbaccdad847611c5af78f612a3db2f47cc1 Mon Sep 17 00:00:00 2001 From: andreykproductengine Date: Fri, 25 Aug 2017 20:26:25 +0300 Subject: [PATCH 09/16] MAINT-7739 Make LLOSInfo a Singleton --- indra/llcommon/llsys.h | 5 +++-- indra/newview/llappviewer.cpp | 23 +++++++++++++---------- indra/newview/llappviewer.h | 4 ---- indra/newview/llfeaturemanager.cpp | 4 ++-- indra/newview/llpanellogin.cpp | 2 +- indra/newview/llstartup.cpp | 2 +- indra/newview/llviewerstats.cpp | 2 +- indra/newview/llweb.cpp | 2 +- 8 files changed, 22 insertions(+), 22 deletions(-) diff --git a/indra/llcommon/llsys.h b/indra/llcommon/llsys.h index 962367f69f..294d0066ca 100644 --- a/indra/llcommon/llsys.h +++ b/indra/llcommon/llsys.h @@ -37,13 +37,14 @@ // #include "llsd.h" +#include "llsingleton.h" #include #include -class LL_COMMON_API LLOSInfo +class LL_COMMON_API LLOSInfo : public LLSingleton { + LLSINGLETON(LLOSInfo); public: - LLOSInfo(); void stream(std::ostream& s) const; const std::string& getOSString() const; diff --git a/indra/newview/llappviewer.cpp b/indra/newview/llappviewer.cpp index 958876fb0a..51d7ad1138 100644 --- a/indra/newview/llappviewer.cpp +++ b/indra/newview/llappviewer.cpp @@ -733,7 +733,7 @@ LLAppViewer::LLAppViewer() // LLLoginInstance::instance().setUpdaterService(mUpdater.get()); - LLLoginInstance::instance().setPlatformInfo(gPlatform, getOSInfo().getOSVersionString()); + LLLoginInstance::instance().setPlatformInfo(gPlatform, LLOSInfo::instance().getOSVersionString()); } LLAppViewer::~LLAppViewer() @@ -3110,7 +3110,7 @@ void LLAppViewer::initUpdater() mUpdater->initialize(channel, version, gPlatform, - getOSInfo().getOSVersionString(), + LLOSInfo::instance().getOSVersionString(), unique_id, willing_to_test ); @@ -3192,10 +3192,13 @@ bool LLAppViewer::initWindow() #ifdef LL_DARWIN - //Satisfy both MAINT-3135 (OSX 10.6 and earlier) MAINT-3288 (OSX 10.7 and later) - if (getOSInfo().mMajorVer == 10 && getOSInfo().mMinorVer < 7) - if ( getOSInfo().mMinorVer == 6 && getOSInfo().mBuild < 8 ) - gViewerWindow->getWindow()->setOldResize(true); + //Satisfy both MAINT-3135 (OSX 10.6 and earlier) MAINT-3288 (OSX 10.7 and later) + LLOSInfo& os_info = LLOSInfo::instance(); + if (os_info.mMajorVer == 10 && os_info.mMinorVer < 7) + { + if ( os_info.mMinorVer == 6 && os_info.mBuild < 8 ) + gViewerWindow->getWindow()->setOldResize(true); + } #endif if (gSavedSettings.getBOOL("WindowMaximized")) @@ -3337,7 +3340,7 @@ LLSD LLAppViewer::getViewerInfo() const info["CPU"] = gSysCPU.getCPUString(); info["MEMORY_MB"] = LLSD::Integer(gSysMemory.getPhysicalMemoryKB().valueInUnits()); // Moved hack adjustment to Windows memory size into llsys.cpp - info["OS_VERSION"] = LLAppViewer::instance()->getOSInfo().getOSString(); + info["OS_VERSION"] = LLOSInfo::instance().getOSString(); info["GRAPHICS_CARD_VENDOR"] = (const char*)(glGetString(GL_VENDOR)); info["GRAPHICS_CARD"] = (const char*)(glGetString(GL_RENDERER)); @@ -3659,7 +3662,7 @@ void LLAppViewer::writeSystemInfo() gDebugInfo["RAMInfo"]["Physical"] = (LLSD::Integer)(gSysMemory.getPhysicalMemoryKB().value()); gDebugInfo["RAMInfo"]["Allocated"] = (LLSD::Integer)(gMemoryAllocated.valueInUnits()); - gDebugInfo["OSInfo"] = getOSInfo().getOSStringSimple(); + gDebugInfo["OSInfo"] = LLOSInfo::instance().getOSStringSimple(); // The user is not logged on yet, but record the current grid choice login url // which may have been the intended grid. @@ -3701,8 +3704,8 @@ void LLAppViewer::writeSystemInfo() // query some system information LL_INFOS("SystemInfo") << "CPU info:\n" << gSysCPU << LL_ENDL; LL_INFOS("SystemInfo") << "Memory info:\n" << gSysMemory << LL_ENDL; - LL_INFOS("SystemInfo") << "OS: " << getOSInfo().getOSStringSimple() << LL_ENDL; - LL_INFOS("SystemInfo") << "OS info: " << getOSInfo() << LL_ENDL; + LL_INFOS("SystemInfo") << "OS: " << LLOSInfo::instance().getOSStringSimple() << LL_ENDL; + LL_INFOS("SystemInfo") << "OS info: " << LLOSInfo::instance() << LL_ENDL; gDebugInfo["SettingsFilename"] = gSavedSettings.getString("ClientSettingsFile"); gDebugInfo["ViewerExePath"] = gDirUtilp->getExecutablePathAndName(); diff --git a/indra/newview/llappviewer.h b/indra/newview/llappviewer.h index c36d8cd9fd..520ff68a02 100644 --- a/indra/newview/llappviewer.h +++ b/indra/newview/llappviewer.h @@ -98,8 +98,6 @@ public: void writeDebugInfo(bool isStatic=true); - const LLOSInfo& getOSInfo() const { return mSysOSInfo; } - void setServerReleaseNotesURL(const std::string& url) { mServerReleaseNotesURL = url; } LLSD getViewerInfo() const; std::string getViewerInfoString() const; @@ -270,8 +268,6 @@ private: std::string mLogoutMarkerFileName; LLAPRFile mLogoutMarkerFile; // A file created to indicate the app is running. - - LLOSInfo mSysOSInfo; bool mReportedCrash; std::string mServerReleaseNotesURL; diff --git a/indra/newview/llfeaturemanager.cpp b/indra/newview/llfeaturemanager.cpp index d4ba230feb..ae4ce298a0 100644 --- a/indra/newview/llfeaturemanager.cpp +++ b/indra/newview/llfeaturemanager.cpp @@ -486,7 +486,7 @@ void LLFeatureManager::fetchFeatureTableCoro(std::string tableName) #if LL_WINDOWS - std::string os_string = LLAppViewer::instance()->getOSInfo().getOSStringSimple(); + std::string os_string = LLOSInfo::instance().getOSStringSimple(); std::string filename; if (os_string.find("Microsoft Windows XP") == 0) @@ -767,7 +767,7 @@ void LLFeatureManager::applyBaseMasks() } #if LL_DARWIN - const LLOSInfo& osInfo = LLAppViewer::instance()->getOSInfo(); + const LLOSInfo& osInfo = LLOSInfo::instance(); if (osInfo.mMajorVer == 10 && osInfo.mMinorVer < 7) { maskFeatures("OSX_10_6_8"); diff --git a/indra/newview/llpanellogin.cpp b/indra/newview/llpanellogin.cpp index f8a5bbb036..a88c10521c 100644 --- a/indra/newview/llpanellogin.cpp +++ b/indra/newview/llpanellogin.cpp @@ -791,7 +791,7 @@ void LLPanelLogin::loadLoginPage() params["grid"] = LLGridManager::getInstance()->getGridId(); // add OS info - params["os"] = LLAppViewer::instance()->getOSInfo().getOSStringSimple(); + params["os"] = LLOSInfo::instance().getOSStringSimple(); // sourceid params["sourceid"] = gSavedSettings.getString("sourceid"); diff --git a/indra/newview/llstartup.cpp b/indra/newview/llstartup.cpp index fcde03244a..8295ce029b 100644 --- a/indra/newview/llstartup.cpp +++ b/indra/newview/llstartup.cpp @@ -345,7 +345,7 @@ bool idle_startup() const std::string delims (" "); std::string system; int begIdx, endIdx; - std::string osString = LLAppViewer::instance()->getOSInfo().getOSStringSimple(); + std::string osString = LLOSInfo::instance().getOSStringSimple(); begIdx = osString.find_first_not_of (delims); endIdx = osString.find_first_of (delims, begIdx); diff --git a/indra/newview/llviewerstats.cpp b/indra/newview/llviewerstats.cpp index dd44697dcd..7f88d5e30f 100644 --- a/indra/newview/llviewerstats.cpp +++ b/indra/newview/llviewerstats.cpp @@ -489,7 +489,7 @@ void send_stats() LLSD &system = body["system"]; system["ram"] = (S32) gSysMemory.getPhysicalMemoryKB().value(); - system["os"] = LLAppViewer::instance()->getOSInfo().getOSStringSimple(); + system["os"] = LLOSInfo::instance().getOSStringSimple(); system["cpu"] = gSysCPU.getCPUString(); unsigned char MACAddress[MAC_ADDRESS_BYTES]; LLUUID::getNodeID(MACAddress); diff --git a/indra/newview/llweb.cpp b/indra/newview/llweb.cpp index ec82765b96..b816225b07 100644 --- a/indra/newview/llweb.cpp +++ b/indra/newview/llweb.cpp @@ -192,7 +192,7 @@ std::string LLWeb::expandURLSubstitutions(const std::string &url, substitution["CHANNEL"] = LLVersionInfo::getChannel(); substitution["GRID"] = LLGridManager::getInstance()->getGridId(); substitution["GRID_LOWERCASE"] = utf8str_tolower(LLGridManager::getInstance()->getGridId()); - substitution["OS"] = LLAppViewer::instance()->getOSInfo().getOSStringSimple(); + substitution["OS"] = LLOSInfo::instance().getOSStringSimple(); substitution["SESSION_ID"] = gAgent.getSessionID(); substitution["FIRST_LOGIN"] = gAgent.isFirstLogin(); From 8ed869a22e372b0fc1eefdd010e97994e97417c9 Mon Sep 17 00:00:00 2001 From: AndreyL ProductEngine Date: Tue, 29 Aug 2017 01:52:14 +0300 Subject: [PATCH 10/16] MAINT-7625 Fixed wrong warning when deleting an empty folder --- indra/newview/llfolderviewmodelinventory.cpp | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/indra/newview/llfolderviewmodelinventory.cpp b/indra/newview/llfolderviewmodelinventory.cpp index e9f80b795a..d53cf2a9a3 100644 --- a/indra/newview/llfolderviewmodelinventory.cpp +++ b/indra/newview/llfolderviewmodelinventory.cpp @@ -258,6 +258,15 @@ bool LLFolderViewModelItemInventory::filter( LLFolderViewFilter& filter) { // This is where filter check on the item done (CHUI-849) const bool passed_filter = filter.check(this); + if (passed_filter && mChildren.empty()) // Update the latest filter generation for empty folders + { + LLFolderViewModelItemInventory* view_model = this; + while (view_model && view_model->mMostFilteredDescendantGeneration < filter_generation) + { + view_model->mMostFilteredDescendantGeneration = filter_generation; + view_model = static_cast(view_model->mParent); + } + } setPassedFilter(passed_filter, filter_generation, filter.getStringMatchOffset(this), filter.getFilterStringSize()); continue_filtering = !filter.isTimedOut(); } From a0b57c0cd7621fa8575d8f05eaa958323aa106fc Mon Sep 17 00:00:00 2001 From: andreykproductengine Date: Tue, 29 Aug 2017 16:45:29 +0300 Subject: [PATCH 11/16] SL-776 Disk cache purge not purging headers if headers are corrupt or on version mismatch --- indra/newview/lltexturecache.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/indra/newview/lltexturecache.cpp b/indra/newview/lltexturecache.cpp index 8b90a0a737..e8b3842ae5 100644 --- a/indra/newview/lltexturecache.cpp +++ b/indra/newview/lltexturecache.cpp @@ -1615,9 +1615,9 @@ void LLTextureCache::purgeAllTextures(bool purge_directories) gDirUtilp->deleteFilesInDir(dirname, mask); } } + gDirUtilp->deleteFilesInDir(mTexturesDirName, mask); // headers, fast cache if (purge_directories) { - gDirUtilp->deleteFilesInDir(mTexturesDirName, mask); LLFile::rmdir(mTexturesDirName); } } From 9831f7fb3afa29609a01ef95b605885644bf1921 Mon Sep 17 00:00:00 2001 From: daianakproductengine Date: Tue, 29 Aug 2017 18:47:08 +0300 Subject: [PATCH 12/16] MAINT-6080 Fixed YouTube videos in In-Game Browser persist after closing browser window --- indra/media_plugins/cef/media_plugin_cef.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/indra/media_plugins/cef/media_plugin_cef.cpp b/indra/media_plugins/cef/media_plugin_cef.cpp index 4eb29c98f9..ec1454308c 100644 --- a/indra/media_plugins/cef/media_plugin_cef.cpp +++ b/indra/media_plugins/cef/media_plugin_cef.cpp @@ -440,6 +440,7 @@ void MediaPluginCEF::receiveMessage(const char* message_string) } else if (message_name == "cleanup") { + mVolumeCatcher.setVolume(0); mLLCEFLib->requestExit(); } else if (message_name == "shm_added") From 8f49a267da657459510479273f28465f1d34c53b Mon Sep 17 00:00:00 2001 From: andreykproductengine Date: Tue, 29 Aug 2017 19:47:20 +0300 Subject: [PATCH 13/16] MAINT-7691 Crash report is not generated/sent if appdata path contains unicode symbols --- indra/llcrashlogger/llcrashlogger.cpp | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/indra/llcrashlogger/llcrashlogger.cpp b/indra/llcrashlogger/llcrashlogger.cpp index dca49be051..d8365eed94 100644 --- a/indra/llcrashlogger/llcrashlogger.cpp +++ b/indra/llcrashlogger/llcrashlogger.cpp @@ -155,9 +155,9 @@ std::string getStartupStateFromLog(std::string& sllog) bool LLCrashLogger::readFromXML(LLSD& dest, const std::string& filename ) { - std::string db_file_name = gDirUtilp->getExpandedFilename(LL_PATH_DUMP,filename); - std::ifstream log_file(db_file_name.c_str()); - + std::string db_file_name = gDirUtilp->getExpandedFilename(LL_PATH_DUMP,filename); + llifstream log_file(db_file_name.c_str()); + // Look for it in the given file if (log_file.is_open()) { @@ -186,7 +186,7 @@ bool LLCrashLogger::readMinidump(std::string minidump_path) { size_t length=0; - std::ifstream minidump_stream(minidump_path.c_str(), std::ios_base::in | std::ios_base::binary); + llifstream minidump_stream(minidump_path.c_str(), std::ios_base::in | std::ios_base::binary); if(minidump_stream.is_open()) { minidump_stream.seekg(0, std::ios::end); @@ -287,7 +287,7 @@ void LLCrashLogger::gatherFiles() if (!file.empty()) { LL_DEBUGS("CRASHREPORT") << "trying to read " << itr->first << ": " << file << LL_ENDL; - std::ifstream f(file.c_str()); + llifstream f(file.c_str()); if(f.is_open()) { std::stringstream s; @@ -342,7 +342,7 @@ void LLCrashLogger::gatherFiles() if ( ( iter->length() > 30 ) && (iter->rfind(".dmp") == (iter->length()-4) ) ) { std::string fullname = pathname + *iter; - std::ifstream fdat( fullname.c_str(), std::ifstream::binary); + llifstream fdat(fullname.c_str(), std::ifstream::binary); if (fdat) { char buf[5]; From 4cc976289318c5ba1c67e871ead5b466d98c0d2e Mon Sep 17 00:00:00 2001 From: Mnikolenko Productengine Date: Wed, 30 Aug 2017 11:12:52 +0300 Subject: [PATCH 14/16] MAINT-7757 FIXED [MAC] Crash in LLViewerWindow::saveImageNumbered --- indra/newview/llviewerwindow.cpp | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/indra/newview/llviewerwindow.cpp b/indra/newview/llviewerwindow.cpp index a2c5fa2630..b052a48424 100644 --- a/indra/newview/llviewerwindow.cpp +++ b/indra/newview/llviewerwindow.cpp @@ -4401,6 +4401,11 @@ BOOL LLViewerWindow::saveImageNumbered(LLImageFormatted *image, BOOL force_picke LLViewerWindow::sSnapshotDir = gDirUtilp->getDirName(filepath); } + if(LLViewerWindow::sSnapshotDir.empty()) + { + return FALSE; + } + // Check if there is enough free space to save snapshot #ifdef LL_WINDOWS boost::filesystem::space_info b_space = boost::filesystem::space(utf8str_to_utf16str(sSnapshotDir)); From bcb3bea0a9fe610e8007e67b6ad26ae10f4cb431 Mon Sep 17 00:00:00 2001 From: Mnikolenko Productengine Date: Wed, 30 Aug 2017 16:49:52 +0300 Subject: [PATCH 15/16] MAINT-7760 FIXED Crash in LLViewerChatterBoxInvitation::post(..) --- indra/newview/llimview.cpp | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/indra/newview/llimview.cpp b/indra/newview/llimview.cpp index feef726630..d62b6300cb 100644 --- a/indra/newview/llimview.cpp +++ b/indra/newview/llimview.cpp @@ -3671,8 +3671,7 @@ public: } //K now we want to accept the invitation - std::string url = gAgent.getRegion()->getCapability( - "ChatSessionRequest"); + std::string url = gAgent.getRegionCapability("ChatSessionRequest"); if ( url != "" ) { From 9d9c04b0448e33b104f6e5b5cb1aea3df63bca9d Mon Sep 17 00:00:00 2001 From: andreykproductengine Date: Wed, 30 Aug 2017 17:44:21 +0300 Subject: [PATCH 16/16] MAINT-7691 One more crashreported issue with unicode in windows --- indra/llcrashlogger/llcrashlock.cpp | 14 ++++++++++++-- indra/llcrashlogger/llcrashlogger.cpp | 2 +- 2 files changed, 13 insertions(+), 3 deletions(-) diff --git a/indra/llcrashlogger/llcrashlock.cpp b/indra/llcrashlogger/llcrashlock.cpp index 7dde1fcd69..77abfbcf0f 100644 --- a/indra/llcrashlogger/llcrashlock.cpp +++ b/indra/llcrashlogger/llcrashlock.cpp @@ -188,12 +188,22 @@ LLSD LLCrashLock::getProcessList() //static bool LLCrashLock::fileExists(std::string filename) { - return boost::filesystem::exists(filename.c_str()); +#ifdef LL_WINDOWS // or BOOST_WINDOWS_API + boost::filesystem::path file_path(utf8str_to_utf16str(filename)); +#else + boost::filesystem::path file_path(filename); +#endif + return boost::filesystem::exists(file_path); } void LLCrashLock::cleanupProcess(std::string proc_dir) { - boost::filesystem::remove_all(proc_dir); +#ifdef LL_WINDOWS // or BOOST_WINDOWS_API + boost::filesystem::path dir_path(utf8str_to_utf16str(proc_dir)); +#else + boost::filesystem::path dir_path(proc_dir); +#endif + boost::filesystem::remove_all(dir_path); } bool LLCrashLock::putProcessList(const LLSD& proc_sd) diff --git a/indra/llcrashlogger/llcrashlogger.cpp b/indra/llcrashlogger/llcrashlogger.cpp index d8365eed94..1d58dba9ab 100644 --- a/indra/llcrashlogger/llcrashlogger.cpp +++ b/indra/llcrashlogger/llcrashlogger.cpp @@ -462,7 +462,7 @@ bool LLCrashLogger::sendCrashLog(std::string dump_dir) updateApplication("Sending reports..."); - std::ofstream out_file(report_file.c_str()); + llofstream out_file(report_file.c_str()); LLSDSerialize::toPrettyXML(post_data, out_file); out_file.flush(); out_file.close();