diff --git a/indra/newview/llappviewer.cpp b/indra/newview/llappviewer.cpp index b9750e9194..2a210ea5d5 100644 --- a/indra/newview/llappviewer.cpp +++ b/indra/newview/llappviewer.cpp @@ -1866,12 +1866,10 @@ bool LLAppViewer::doFrame() saveFinalSnapshot(); } - // Cut down wait on logout; Need to terminate voice here because we need gServicePump! if (LLVoiceClient::instanceExists()) { LLVoiceClient::getInstance()->terminate(); } - // delete gServicePump; @@ -1976,13 +1974,6 @@ bool LLAppViewer::cleanup() // Give any remaining SLPlugin instances a chance to exit cleanly. LLPluginProcessParent::shutdown(); - // Cut down wait on logout; Need to terminate voice earlier because we need gServicePump! - //if (LLVoiceClient::instanceExists()) - //{ - // LLVoiceClient::getInstance()->terminate(); - //} - // - disconnectViewer(); LL_INFOS() << "Viewer disconnected" << LL_ENDL; diff --git a/indra/newview/llpanelpermissions.cpp b/indra/newview/llpanelpermissions.cpp index 8c4624fac1..0583436ca7 100644 --- a/indra/newview/llpanelpermissions.cpp +++ b/indra/newview/llpanelpermissions.cpp @@ -1437,23 +1437,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); } showMarkForSale(FALSE); diff --git a/indra/newview/lltexturecache.cpp b/indra/newview/lltexturecache.cpp index d579fd66aa..68181e96cc 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 @@ -2036,8 +2036,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()) @@ -2065,7 +2105,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 f1628451b8..34e43eeedf 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 diff --git a/indra/newview/llviewermenu.cpp b/indra/newview/llviewermenu.cpp index 683bb638ba..63d0cc5cec 100644 --- a/indra/newview/llviewermenu.cpp +++ b/indra/newview/llviewermenu.cpp @@ -4497,12 +4497,19 @@ class LLSelfSitDown : public view_listener_t } }; + + +bool show_sitdown_self() +{ + return isAgentAvatarValid() && !gAgentAvatarp->isSitting(); +} + bool enable_sitdown_self() { // [RLVa:KB] - Checked: 2010-08-28 (RLVa-1.2.1a) | Added: RLVa-1.2.1a - return isAgentAvatarValid() && !gAgentAvatarp->isSitting() && !gAgentAvatarp->isEditingAppearance() && !gAgent.getFlying() && !gRlvHandler.hasBehaviour(RLV_BHVR_SIT); + return show_sitdown_self() && !gAgentAvatarp->isEditingAppearance() && !gAgent.getFlying() && !gRlvHandler.hasBehaviour(RLV_BHVR_SIT); // [/RLVa:KB] -// return isAgentAvatarValid() && !gAgentAvatarp->isSitting() && !gAgentAvatarp->isEditingAppearance() && !gAgent.getFlying(); +// return show_sitdown_self() && !gAgentAvatarp->isEditingAppearance() && !gAgent.getFlying(); } // Force sit -KC @@ -11543,7 +11550,8 @@ void initialize_menus() view_listener_t::addMenu(new LLSelfStandUp(), "Self.StandUp"); enable.add("Self.EnableStandUp", boost::bind(&enable_standup_self)); view_listener_t::addMenu(new LLSelfSitDown(), "Self.SitDown"); - enable.add("Self.EnableSitDown", boost::bind(&enable_sitdown_self)); + enable.add("Self.EnableSitDown", boost::bind(&enable_sitdown_self)); + enable.add("Self.ShowSitDown", boost::bind(&show_sitdown_self)); view_listener_t::addMenu(new FSSelfForceSit(), "Self.ForceSit"); //KC enable.add("Self.EnableForceSit", boost::bind(&enable_forcesit_self)); //KC view_listener_t::addMenu(new FSSelfCheckForceSit(), "Self.getForceSit"); //KC diff --git a/indra/newview/llvoicevivox.cpp b/indra/newview/llvoicevivox.cpp index 25d905f216..eafbf83841 100644 --- a/indra/newview/llvoicevivox.cpp +++ b/indra/newview/llvoicevivox.cpp @@ -593,12 +593,10 @@ void LLVivoxVoiceClient::connectorShutdown() writeString(stream.str()); } - // Cut down wait on logout else { mShutdownComplete = true; } - // } void LLVivoxVoiceClient::userAuthorized(const std::string& user_id, const LLUUID &agentID) @@ -1169,17 +1167,26 @@ bool LLVivoxVoiceClient::breakVoiceConnection(bool corowait) retval = result.has("connector"); } else - { // If we are not doing a corowait then we must sleep until the connector has responded + { + mRelogRequested = false; //stop the control coro + // If we are not doing a corowait then we must sleep until the connector has responded // otherwise we may very well close the socket too early. #if LL_WINDOWS - int count = 0; - while (!mShutdownComplete && 10 > count++) - { // Rider: This comes out to a max wait time of 10 seconds. - // The situation that brings us here is a call from ::terminate() - // and so the viewer is attempting to go away. Don't slow it down - // longer than this. + if (!mShutdownComplete) + { + // The situation that brings us here is a call from ::terminate() + // At this point message system is already down so we can't wait for + // the message, yet we need to receive "connector shutdown response". + // Either wait a bit and emulate it or check gMessageSystem for specific message _sleep(1000); // Cut down wait on logout + //if (mConnected) + //{ + // mConnected = false; + // LLSD vivoxevent(LLSDMap("connector", LLSD::Boolean(false))); + // LLEventPumps::instance().post("vivoxClientPump", vivoxevent); + //} + //mShutdownComplete = true; // Need to check messages on the service pump for the connector shutdown response // which sets mShutdownComplete to true! while (gMessageSystem->checkAllMessages(gFrameCount, gServicePump)) @@ -3405,7 +3412,7 @@ void LLVivoxVoiceClient::connectorShutdownResponse(int statusCode, std::string & } mConnected = false; - mShutdownComplete = true; // Cut down wait on logout + mShutdownComplete = true; LLSD vivoxevent(LLSDMap("connector", LLSD::Boolean(false))); diff --git a/indra/newview/llvosky.cpp b/indra/newview/llvosky.cpp index b72a07c3d4..b60a8466d8 100644 --- a/indra/newview/llvosky.cpp +++ b/indra/newview/llvosky.cpp @@ -1076,7 +1076,7 @@ BOOL LLVOSky::updateSky() LLHeavenBody::setInterpVal( mInterpVal ); calcAtmospherics(); - if (!gPipeline.canUseWindLightShaders() && (mForceUpdate || total_no_tiles == frame)) + if (mForceUpdate || total_no_tiles == frame) { LLSkyTex::stepCurrent(); 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 @@