From 41c0a95365428a8486c37a9c175acc29653d9639 Mon Sep 17 00:00:00 2001 From: andreykproductengine Date: Tue, 26 Jun 2018 20:19:38 +0300 Subject: [PATCH 1/6] MAINT-8395 Better loging --- indra/newview/lltexturecache.cpp | 70 ++++++++++++++++++++++++++++++-- indra/newview/lltexturecache.h | 2 +- 2 files changed, 68 insertions(+), 4 deletions(-) diff --git a/indra/newview/lltexturecache.cpp b/indra/newview/lltexturecache.cpp index dd5dce3279..633e025478 100644 --- a/indra/newview/lltexturecache.cpp +++ b/indra/newview/lltexturecache.cpp @@ -615,7 +615,7 @@ bool LLTextureCacheRemoteWorker::doWrite() if(idx >= 0) { // write to the fast cache. - if(!mCache->writeToFastCache(idx, mRawImage, mRawDiscardLevel)) + if(!mCache->writeToFastCache(mID, idx, mRawImage, mRawDiscardLevel)) { LL_WARNS() << "writeToFastCache failed" << LL_ENDL; mDataSize = -1; // failed @@ -1998,8 +1998,48 @@ LLPointer LLTextureCache::readFromFastCache(const LLUUID& id, S32& d return raw; } +#if LL_WINDOWS + +static const U32 STATUS_MSC_EXCEPTION = 0xE06D7363; // compiler specific + +U32 exception_dupe_filter(U32 code, struct _EXCEPTION_POINTERS *exception_infop) +{ + if (code == STATUS_MSC_EXCEPTION) + { + // C++ exception, go on + return EXCEPTION_CONTINUE_SEARCH; + } + else + { + // handle it + return EXCEPTION_EXECUTE_HANDLER; + } +} + +//due to unwinding +void dupe(LLPointer &raw) +{ + raw = raw->duplicate(); +} + +void logExceptionDupplicate(LLPointer &raw) +{ + __try + { + dupe(raw); + } + __except (exception_dupe_filter(GetExceptionCode(), GetExceptionInformation())) + { + // convert to C++ styled exception + char integer_string[32]; + sprintf(integer_string, "SEH, code: %lu\n", GetExceptionCode()); + throw std::exception(integer_string); + } +} +#endif + //return the fast cache location -bool LLTextureCache::writeToFastCache(S32 id, LLPointer raw, S32 discardlevel) +bool LLTextureCache::writeToFastCache(LLUUID image_id, S32 id, LLPointer raw, S32 discardlevel) { //rescale image if needed if (raw.isNull() || raw->isBufferInvalid() || !raw->getData()) @@ -2027,7 +2067,31 @@ bool LLTextureCache::writeToFastCache(S32 id, LLPointer raw, S32 dis if(w * h *c > 0) //valid { //make a duplicate to keep the original raw image untouched. - raw = raw->duplicate(); + + try + { +#if LL_WINDOWS + // Temporary diagnostics for scale/duplicate crash + logExceptionDupplicate(raw); +#else + raw = raw->duplicate(); +#endif + } + catch (...) + { + removeFromCache(image_id); + LL_ERRS() << "Failed to cache image: " << image_id + << " local id: " << id + << " Exception: " << boost::current_exception_diagnostic_information() + << " Image new width: " << w + << " Image new height: " << h + << " Image new components: " << c + << " Image discard difference: " << i + << LL_ENDL; + + return false; + } + if (raw->isBufferInvalid()) { LL_WARNS() << "Invalid image duplicate buffer" << LL_ENDL; diff --git a/indra/newview/lltexturecache.h b/indra/newview/lltexturecache.h index 95f9afc2bc..987b9375c0 100644 --- a/indra/newview/lltexturecache.h +++ b/indra/newview/lltexturecache.h @@ -179,7 +179,7 @@ private: void openFastCache(bool first_time = false); void closeFastCache(bool forced = false); - bool writeToFastCache(S32 id, LLPointer raw, S32 discardlevel); + bool writeToFastCache(LLUUID image_id, S32 cache_id, LLPointer raw, S32 discardlevel); private: // Internal From 5346e7909ff6d462ee3c28504030b33b3e497d0f Mon Sep 17 00:00:00 2001 From: andreykproductengine Date: Mon, 2 Jul 2018 20:09:36 +0300 Subject: [PATCH 2/6] MAINT-8618 Viewer attempting to edit action when it has no permission --- indra/newview/llpanelpermissions.cpp | 39 ++++++++++++++++++---------- 1 file changed, 25 insertions(+), 14 deletions(-) diff --git a/indra/newview/llpanelpermissions.cpp b/indra/newview/llpanelpermissions.cpp index fc44ce340c..ef16427713 100644 --- a/indra/newview/llpanelpermissions.cpp +++ b/indra/newview/llpanelpermissions.cpp @@ -1210,23 +1210,34 @@ void LLPanelPermissions::setAllSaleInfo() LLSaleInfo new_sale_info(sale_type, price); LLSelectMgr::getInstance()->selectionSetObjectSaleInfo(new_sale_info); - struct f : public LLSelectedObjectFunctor + // Note: won't work right if a root and non-root are both single-selected (here and other places). + BOOL is_perm_modify = (LLSelectMgr::getInstance()->getSelection()->getFirstRootNode() + && LLSelectMgr::getInstance()->selectGetRootsModify()) + || LLSelectMgr::getInstance()->selectGetModify(); + BOOL is_nonpermanent_enforced = (LLSelectMgr::getInstance()->getSelection()->getFirstRootNode() + && LLSelectMgr::getInstance()->selectGetRootsNonPermanentEnforced()) + || LLSelectMgr::getInstance()->selectGetNonPermanentEnforced(); + + if (is_perm_modify && is_nonpermanent_enforced) { - virtual bool apply(LLViewerObject* object) + struct f : public LLSelectedObjectFunctor { - return object->getClickAction() == CLICK_ACTION_BUY - || object->getClickAction() == CLICK_ACTION_TOUCH; + virtual bool apply(LLViewerObject* object) + { + return object->getClickAction() == CLICK_ACTION_BUY + || object->getClickAction() == CLICK_ACTION_TOUCH; + } + } check_actions; + + // Selection should only contain objects that are of target + // action already or of action we are aiming to remove. + bool default_actions = LLSelectMgr::getInstance()->getSelection()->applyToObjects(&check_actions); + + if (default_actions && old_sale_info.isForSale() != new_sale_info.isForSale()) + { + U8 new_click_action = new_sale_info.isForSale() ? CLICK_ACTION_BUY : CLICK_ACTION_TOUCH; + LLSelectMgr::getInstance()->selectionSetClickAction(new_click_action); } - } check_actions; - - // Selection should only contain objects that are of target - // action already or of action we are aiming to remove. - bool default_actions = LLSelectMgr::getInstance()->getSelection()->applyToObjects(&check_actions); - - if (default_actions && old_sale_info.isForSale() != new_sale_info.isForSale()) - { - U8 new_click_action = new_sale_info.isForSale() ? CLICK_ACTION_BUY : CLICK_ACTION_TOUCH; - LLSelectMgr::getInstance()->selectionSetClickAction(new_click_action); } } From 922c5fe2fcd5ad7e9265606a2c083d2f2a05399b Mon Sep 17 00:00:00 2001 From: eli Date: Mon, 2 Jul 2018 17:11:08 -0700 Subject: [PATCH 3/6] FIX INTL-93 translate Viewer Set51 from viewer-bear, for 9 languages --- .../floater_preferences_graphics_advanced.xml | 11 +++++++++-- .../xui/de/menu_people_blocked_gear.xml | 1 + .../skins/default/xui/de/notifications.xml | 2 +- .../skins/default/xui/de/panel_group_roles.xml | 10 ++++++++++ .../xui/de/panel_preferences_privacy.xml | 2 +- .../default/xui/de/panel_preferences_setup.xml | 4 ++-- .../xui/de/panel_preferences_uploads.xml | 3 +++ .../skins/default/xui/de/role_actions.xml | 18 +++++++++--------- .../floater_preferences_graphics_advanced.xml | 11 +++++++++-- .../xui/es/menu_people_blocked_gear.xml | 1 + .../skins/default/xui/es/notifications.xml | 2 +- .../skins/default/xui/es/panel_group_roles.xml | 10 ++++++++++ .../default/xui/es/panel_preferences_setup.xml | 4 ++-- .../xui/es/panel_preferences_uploads.xml | 3 +++ .../skins/default/xui/es/role_actions.xml | 18 +++++++++--------- .../floater_preferences_graphics_advanced.xml | 11 +++++++++-- .../xui/fr/menu_people_blocked_gear.xml | 1 + .../skins/default/xui/fr/notifications.xml | 2 +- .../skins/default/xui/fr/panel_group_roles.xml | 10 ++++++++++ .../xui/fr/panel_preferences_privacy.xml | 2 +- .../default/xui/fr/panel_preferences_setup.xml | 6 +++--- .../xui/fr/panel_preferences_uploads.xml | 3 +++ .../skins/default/xui/fr/role_actions.xml | 18 +++++++++--------- .../floater_preferences_graphics_advanced.xml | 11 +++++++++-- .../xui/it/menu_people_blocked_gear.xml | 1 + .../skins/default/xui/it/notifications.xml | 2 +- .../skins/default/xui/it/panel_group_roles.xml | 10 ++++++++++ .../xui/it/panel_preferences_privacy.xml | 2 +- .../default/xui/it/panel_preferences_setup.xml | 6 +++--- .../xui/it/panel_preferences_uploads.xml | 3 +++ .../skins/default/xui/it/role_actions.xml | 18 +++++++++--------- .../floater_preferences_graphics_advanced.xml | 11 +++++++++-- .../xui/ja/menu_people_blocked_gear.xml | 1 + .../skins/default/xui/ja/notifications.xml | 2 +- .../skins/default/xui/ja/panel_group_roles.xml | 10 ++++++++++ .../default/xui/ja/panel_preferences_setup.xml | 6 +++--- .../xui/ja/panel_preferences_uploads.xml | 3 +++ .../skins/default/xui/ja/role_actions.xml | 18 +++++++++--------- .../floater_preferences_graphics_advanced.xml | 11 +++++++++-- .../xui/pt/menu_people_blocked_gear.xml | 1 + .../skins/default/xui/pt/notifications.xml | 2 +- .../skins/default/xui/pt/panel_group_roles.xml | 10 ++++++++++ .../default/xui/pt/panel_preferences_setup.xml | 4 ++-- .../xui/pt/panel_preferences_uploads.xml | 3 +++ .../skins/default/xui/pt/role_actions.xml | 18 +++++++++--------- .../floater_preferences_graphics_advanced.xml | 13 ++++++++++--- .../xui/ru/menu_people_blocked_gear.xml | 1 + .../skins/default/xui/ru/notifications.xml | 2 +- .../skins/default/xui/ru/panel_group_roles.xml | 10 ++++++++++ .../default/xui/ru/panel_preferences_setup.xml | 6 +++--- .../xui/ru/panel_preferences_uploads.xml | 3 +++ .../skins/default/xui/ru/role_actions.xml | 18 +++++++++--------- .../floater_preferences_graphics_advanced.xml | 11 +++++++++-- .../xui/tr/menu_people_blocked_gear.xml | 1 + .../skins/default/xui/tr/notifications.xml | 2 +- .../skins/default/xui/tr/panel_group_roles.xml | 10 ++++++++++ .../xui/tr/panel_preferences_privacy.xml | 2 +- .../default/xui/tr/panel_preferences_setup.xml | 4 ++-- .../xui/tr/panel_preferences_uploads.xml | 3 +++ .../skins/default/xui/tr/role_actions.xml | 18 +++++++++--------- .../floater_preferences_graphics_advanced.xml | 11 +++++++++-- .../xui/zh/menu_people_blocked_gear.xml | 1 + .../skins/default/xui/zh/notifications.xml | 2 +- .../skins/default/xui/zh/panel_group_roles.xml | 10 ++++++++++ .../default/xui/zh/panel_preferences_setup.xml | 4 ++-- .../xui/zh/panel_preferences_uploads.xml | 3 +++ .../skins/default/xui/zh/role_actions.xml | 18 +++++++++--------- 67 files changed, 324 insertions(+), 135 deletions(-) diff --git a/indra/newview/skins/default/xui/de/floater_preferences_graphics_advanced.xml b/indra/newview/skins/default/xui/de/floater_preferences_graphics_advanced.xml index 65a7e255f9..1361366bd5 100644 --- a/indra/newview/skins/default/xui/de/floater_preferences_graphics_advanced.xml +++ b/indra/newview/skins/default/xui/de/floater_preferences_graphics_advanced.xml @@ -31,7 +31,7 @@ Niedrig - + Hardware @@ -56,6 +56,9 @@ (Neustart erforderlich) + + Netz + Niedrig @@ -72,6 +75,9 @@ Niedrig + + Shader + @@ -111,5 +117,6 @@