From 694b0838bc80efc152e7ecda09ffdc7a944b7079 Mon Sep 17 00:00:00 2001 From: Dave SIMmONs Date: Wed, 1 Jun 2011 11:36:25 -0700 Subject: ER-949: Chat using '/me' style text displayed incorrectly. Reviewed by Kelly --- indra/newview/llnearbychathandler.cpp | 24 +++++++++++++----------- 1 file changed, 13 insertions(+), 11 deletions(-) diff --git a/indra/newview/llnearbychathandler.cpp b/indra/newview/llnearbychathandler.cpp index 11dc496311..f157b20592 100644 --- a/indra/newview/llnearbychathandler.cpp +++ b/indra/newview/llnearbychathandler.cpp @@ -472,7 +472,8 @@ void LLNearbyChatHandler::initChannel() -void LLNearbyChatHandler::processChat(const LLChat& chat_msg, const LLSD &args) +void LLNearbyChatHandler::processChat(const LLChat& chat_msg, // WARNING - not really const, see hack below changing chat_msg.mText + const LLSD &args) { if(chat_msg.mMuted == TRUE) return; @@ -480,7 +481,17 @@ void LLNearbyChatHandler::processChat(const LLChat& chat_msg, const LLSD &args) if(chat_msg.mText.empty()) return;//don't process empty messages + // Handle irc styled messages for toast panel + // HACK ALERT - changes mText, stripping out IRC style "/me" prefixes LLChat& tmp_chat = const_cast(chat_msg); + std::string original_message = tmp_chat.mText; // Save un-modified version of chat text + if (tmp_chat.mChatStyle == CHAT_STYLE_IRC) + { + if(!tmp_chat.mFromName.empty()) + tmp_chat.mText = tmp_chat.mFromName + tmp_chat.mText.substr(3); + else + tmp_chat.mText = tmp_chat.mText.substr(3); + } LLNearbyChat* nearby_chat = LLFloaterReg::getTypedInstance("nearby_chat", LLSD()); { @@ -531,7 +542,7 @@ void LLNearbyChatHandler::processChat(const LLChat& chat_msg, const LLSD &args) LLViewerChat::getChatColor(chat_msg,txt_color); - LLFloaterScriptDebug::addScriptLine(chat_msg.mText, + LLFloaterScriptDebug::addScriptLine(original_message, // Send full message with "/me" style prefix chat_msg.mFromName, txt_color, chat_msg.mFromID); @@ -562,15 +573,6 @@ void LLNearbyChatHandler::processChat(const LLChat& chat_msg, const LLSD &args) || !mChannel->getShowToasts() ) // to prevent toasts in Busy mode return;//no need in toast if chat is visible or if bubble chat is enabled - // Handle irc styled messages for toast panel - if (tmp_chat.mChatStyle == CHAT_STYLE_IRC) - { - if(!tmp_chat.mFromName.empty()) - tmp_chat.mText = tmp_chat.mFromName + tmp_chat.mText.substr(3); - else - tmp_chat.mText = tmp_chat.mText.substr(3); - } - // arrange a channel on a screen if(!mChannel->getVisible()) { -- cgit v1.2.3 From 786da1eb383502a268f71938e16b525a72e01abe Mon Sep 17 00:00:00 2001 From: Ansariel Hiller Date: Sat, 11 Jun 2011 18:10:19 -0400 Subject: VWR-25480 Worldmap: Partial region name search UI bug Patch converted and tested by Jonathan Yap --- doc/contributions.txt | 2 ++ indra/newview/llfloaterworldmap.cpp | 19 +++++++++++++------ 2 files changed, 15 insertions(+), 6 deletions(-) diff --git a/doc/contributions.txt b/doc/contributions.txt index daaffe2dee..96630b1995 100644 --- a/doc/contributions.txt +++ b/doc/contributions.txt @@ -158,6 +158,7 @@ Ann Congrejo CT-193 Ansariel Hiller STORM-1101 + VWR-25480 Ardy Lay STORM-859 VWR-19499 @@ -442,6 +443,7 @@ Jonathan Yap STORM-1095 STORM-1236 STORM-1259 + VWR-25480 Kage Pixel VWR-11 Ken March diff --git a/indra/newview/llfloaterworldmap.cpp b/indra/newview/llfloaterworldmap.cpp index f8a4ce7ad0..b3910982d1 100755 --- a/indra/newview/llfloaterworldmap.cpp +++ b/indra/newview/llfloaterworldmap.cpp @@ -1527,17 +1527,24 @@ void LLFloaterWorldMap::updateSims(bool found_null_sim) mCompletingRegionName = ""; } - // if match found, highlight it and go - if (!match.isUndefined()) + if (num_results > 0) { - list->selectByValue(match); + // if match found, highlight it and go + if (!match.isUndefined()) + { + list->selectByValue(match); + } + // else select first found item + else + { + list->selectFirstItem(); + } getChild("search_results")->setFocus(TRUE); onCommitSearchResult(); } - - // if we found nothing, say "none" - if (num_results == 0) + else { + // if we found nothing, say "none" list->setCommentText(LLTrans::getString("worldmap_results_none_found")); list->operateOnAll(LLCtrlListInterface::OP_DESELECT); } -- cgit v1.2.3 From e2a531791ed2c311e6e95061175ce2a9151ccf9d Mon Sep 17 00:00:00 2001 From: Jonathan Yap Date: Wed, 15 Jun 2011 07:02:28 -0400 Subject: STORM-1334 Console debug data scrolls away too quickly and is hard to read --- doc/contributions.txt | 1 + indra/llui/llconsole.cpp | 13 +++++++------ indra/newview/lldebugview.cpp | 4 +++- indra/newview/skins/default/xui/en/main_view.xml | 15 ++++++++------- 4 files changed, 19 insertions(+), 14 deletions(-) diff --git a/doc/contributions.txt b/doc/contributions.txt index daaffe2dee..f5c0a96966 100644 --- a/doc/contributions.txt +++ b/doc/contributions.txt @@ -442,6 +442,7 @@ Jonathan Yap STORM-1095 STORM-1236 STORM-1259 + STORM-1334 Kage Pixel VWR-11 Ken March diff --git a/indra/llui/llconsole.cpp b/indra/llui/llconsole.cpp index 06bad1f371..04040200d0 100644 --- a/indra/llui/llconsole.cpp +++ b/indra/llui/llconsole.cpp @@ -132,6 +132,9 @@ void LLConsole::setFontSize(S32 size_index) void LLConsole::draw() { + // Units in pixels + static const F32 padding_horizontal = 10; + static const F32 padding_vertical = 3; LLGLSUIDefault gls_ui; // skip lines added more than mLinePersistTime ago @@ -176,11 +179,9 @@ void LLConsole::draw() // draw remaining lines F32 y_pos = 0.f; - LLUIImagePtr imagep = LLUI::getUIImage("Rounded_Square"); + LLUIImagePtr imagep = LLUI::getUIImage("transparent"); -// F32 console_opacity = llclamp(gSavedSettings.getF32("ConsoleBackgroundOpacity"), 0.f, 1.f); F32 console_opacity = llclamp(LLUI::sSettingGroups["config"]->getF32("ConsoleBackgroundOpacity"), 0.f, 1.f); -// LLColor4 color = LLUIColorTable::instance().getColor("ConsoleBackground"); LLColor4 color = LLUIColorTable::instance().getColor("ConsoleBackground"); color.mV[VALPHA] *= console_opacity; @@ -188,8 +189,8 @@ void LLConsole::draw() for(paragraph_it = mParagraphs.rbegin(); paragraph_it != mParagraphs.rend(); paragraph_it++) { - S32 target_height = llfloor( (*paragraph_it).mLines.size() * line_height + 8); - S32 target_width = llfloor( (*paragraph_it).mMaxWidth +15); + S32 target_height = llfloor( (*paragraph_it).mLines.size() * line_height + padding_vertical); + S32 target_width = llfloor( (*paragraph_it).mMaxWidth + padding_horizontal); y_pos += ((*paragraph_it).mLines.size()) * line_height; imagep->drawSolid(-14, (S32)(y_pos + line_height - target_height), target_width, target_height, color); @@ -234,7 +235,7 @@ void LLConsole::draw() y_off += line_height; } } - y_pos += 8; + y_pos += padding_vertical; } } diff --git a/indra/newview/lldebugview.cpp b/indra/newview/lldebugview.cpp index b6d67899f8..aa5d4fc922 100644 --- a/indra/newview/lldebugview.cpp +++ b/indra/newview/lldebugview.cpp @@ -59,10 +59,12 @@ LLDebugView::LLDebugView(const LLDebugView::Params& p) void LLDebugView::init() { + // Horizontal percentage of screen (not window) to draw debug data in + static const F32 debug_console_percentage = 0.75; LLRect r; LLRect rect = getLocalRect(); - r.set(10, rect.getHeight() - 100, rect.getWidth()/2, 100); + r.set(10, rect.getHeight() - 100, rect.getWidth() * debug_console_percentage, 100); LLConsole::Params cp; cp.name("debug console"); cp.max_lines(20); diff --git a/indra/newview/skins/default/xui/en/main_view.xml b/indra/newview/skins/default/xui/en/main_view.xml index 3ead67ca57..a7d1aa963c 100644 --- a/indra/newview/skins/default/xui/en/main_view.xml +++ b/indra/newview/skins/default/xui/en/main_view.xml @@ -135,6 +135,14 @@ name="login_panel_holder" width="1024"/> + + - Date: Wed, 15 Jun 2011 09:23:46 -0700 Subject: Fix VWR-24099: warn user when trying to send too many teleport offers at one time. --- indra/newview/llviewermessage.cpp | 9 +++++++++ indra/newview/skins/default/xui/en/notifications.xml | 13 +++++++++++++ 2 files changed, 22 insertions(+) diff --git a/indra/newview/llviewermessage.cpp b/indra/newview/llviewermessage.cpp index 3832be727f..435b2e063d 100644 --- a/indra/newview/llviewermessage.cpp +++ b/indra/newview/llviewermessage.cpp @@ -6266,6 +6266,15 @@ void send_group_notice(const LLUUID& group_id, bool handle_lure_callback(const LLSD& notification, const LLSD& response) { + if(notification["payload"]["ids"].size() > 250) + { + // More than 250 targets will overload the message. + LLSD args; + args["OFFERS"] = notification["payload"]["ids"].size(); + LLNotificationsUtil::add("TooManyTeleportOffers", args); + return false; + } + std::string text = response["message"].asString(); LLSLURL slurl; LLAgentUI::buildSLURL(slurl); diff --git a/indra/newview/skins/default/xui/en/notifications.xml b/indra/newview/skins/default/xui/en/notifications.xml index ce96c488b4..21680772ba 100644 --- a/indra/newview/skins/default/xui/en/notifications.xml +++ b/indra/newview/skins/default/xui/en/notifications.xml @@ -3696,6 +3696,19 @@ Join me in [REGION] + +You attempted to make [OFFERS] teleport offers; +250 are the most that can be done at one time + group + fail + + + Date: Wed, 15 Jun 2011 15:12:42 -0700 Subject: Fix VWR-24099: disable teleport button when too many friends are selected; we keep the warning dialog as a failsafe. --- indra/newview/llavataractions.cpp | 4 ++++ indra/newview/llviewermessage.cpp | 7 +++++-- indra/newview/skins/default/xui/en/notifications.xml | 4 ++-- 3 files changed, 11 insertions(+), 4 deletions(-) diff --git a/indra/newview/llavataractions.cpp b/indra/newview/llavataractions.cpp index cbbdcb2983..955f19c82c 100755 --- a/indra/newview/llavataractions.cpp +++ b/indra/newview/llavataractions.cpp @@ -773,6 +773,10 @@ bool LLAvatarActions::canOfferTeleport(const LLUUID& id) // static bool LLAvatarActions::canOfferTeleport(const uuid_vec_t& ids) { + // We can't send more than 250 lures in a single message, so disable this + // button when there are too many id's selected. + if(ids.size() > 250) return false; + bool result = true; for (uuid_vec_t::const_iterator it = ids.begin(); it != ids.end(); ++it) { diff --git a/indra/newview/llviewermessage.cpp b/indra/newview/llviewermessage.cpp index 435b2e063d..ae36a2292f 100644 --- a/indra/newview/llviewermessage.cpp +++ b/indra/newview/llviewermessage.cpp @@ -6266,11 +6266,14 @@ void send_group_notice(const LLUUID& group_id, bool handle_lure_callback(const LLSD& notification, const LLSD& response) { - if(notification["payload"]["ids"].size() > 250) + static const unsigned OFFER_RECIPIENT_LIMIT = 250; + if(notification["payload"]["ids"].size() > OFFER_RECIPIENT_LIMIT) { - // More than 250 targets will overload the message. + // More than OFFER_RECIPIENT_LIMIT targets will overload the message + // producing an llerror. LLSD args; args["OFFERS"] = notification["payload"]["ids"].size(); + args["LIMIT"] = static_cast(OFFER_RECIPIENT_LIMIT); LLNotificationsUtil::add("TooManyTeleportOffers", args); return false; } diff --git a/indra/newview/skins/default/xui/en/notifications.xml b/indra/newview/skins/default/xui/en/notifications.xml index 21680772ba..6707a09ddf 100644 --- a/indra/newview/skins/default/xui/en/notifications.xml +++ b/indra/newview/skins/default/xui/en/notifications.xml @@ -3700,8 +3700,8 @@ Join me in [REGION] icon="alertmodal.tga" name="TooManyTeleportOffers" type="alertmodal"> -You attempted to make [OFFERS] teleport offers; -250 are the most that can be done at one time +You attempted to make [OFFERS] teleport offers +which exceeds the limit of [LIMIT]. group fail Date: Thu, 16 Jun 2011 23:53:41 +0300 Subject: STORM-1352 WIP Attempting to fix a crash in LLNearbyChatScreenChannel::showToastsBottom(). Apparently, a nearby chat toast got somehow destroyed while still remaining in the list of active toasts. Attempt to sort active toasts in showToastsBottom() then triggered the crash. I don't know how to reproduce the crash, i.e. force destroying a toast in a way that its onClose() method (which would remove references to the toast) isn't called. So we'll just remove references to the toast whenever it's destroyed. --- indra/newview/llnearbychathandler.cpp | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/indra/newview/llnearbychathandler.cpp b/indra/newview/llnearbychathandler.cpp index 11dc496311..ae44c76038 100644 --- a/indra/newview/llnearbychathandler.cpp +++ b/indra/newview/llnearbychathandler.cpp @@ -268,6 +268,9 @@ bool LLNearbyChatScreenChannel::createPoolToast() toast->setOnFadeCallback(boost::bind(&LLNearbyChatScreenChannel::onToastFade, this, _1)); + // If the toast gets somehow prematurely destroyed, deactivate it to prevent crash (STORM-1352). + toast->setOnToastDestroyedCallback(boost::bind(&LLNearbyChatScreenChannel::onToastDestroyed, this, _1, false)); + LL_DEBUGS("NearbyChat") << "Creating and pooling toast" << llendl; m_toast_pool.push_back(toast->getHandle()); return true; @@ -371,6 +374,8 @@ void LLNearbyChatScreenChannel::arrangeToasts() int sort_toasts_predicate(LLHandle first, LLHandle second) { + if (!first.get() || !second.get()) return 0; // STORM-1352 + F32 v1 = first.get()->getTimeLeftToLive(); F32 v2 = second.get()->getTimeLeftToLive(); return v1 > v2; -- cgit v1.2.3 From 274266badcddc3733c9dc145b2df57dab0455858 Mon Sep 17 00:00:00 2001 From: LanceCorrimal Date: Fri, 17 Jun 2011 09:19:42 +0200 Subject: Changed popups for accepting inv offers from SystemMessage to SystemMessageTip: STORM-323 --- indra/newview/llviewermessage.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/indra/newview/llviewermessage.cpp b/indra/newview/llviewermessage.cpp index 01a5cb18db..743e4e1469 100644 --- a/indra/newview/llviewermessage.cpp +++ b/indra/newview/llviewermessage.cpp @@ -1502,7 +1502,7 @@ bool LLOfferInfo::inventory_offer_callback(const LLSD& notification, const LLSD& log_message = chatHistory_string + " " + LLTrans::getString("InvOfferGaveYou") + " " + mDesc + LLTrans::getString("."); LLSD args; args["MESSAGE"] = log_message; - LLNotificationsUtil::add("SystemMessage", args); + LLNotificationsUtil::add("SystemMessageTip", args); } break; @@ -1676,7 +1676,7 @@ bool LLOfferInfo::inventory_task_offer_callback(const LLSD& notification, const log_message = chatHistory_string + " " + LLTrans::getString("InvOfferGaveYou") + " " + mDesc + LLTrans::getString("."); LLSD args; args["MESSAGE"] = log_message; - LLNotificationsUtil::add("SystemMessage", args); + LLNotificationsUtil::add("SystemMessageTip", args); } // we will want to open this item when it comes back. @@ -1727,7 +1727,7 @@ bool LLOfferInfo::inventory_task_offer_callback(const LLSD& notification, const LLSD args; args["MESSAGE"] = log_message; - LLNotificationsUtil::add("SystemMessage", args); + LLNotificationsUtil::add("SystemMessageTip", args); } if (busy && (!mFromGroup && !mFromObject)) -- cgit v1.2.3 From b91205ccf041df02323519bfdf86784a13d05748 Mon Sep 17 00:00:00 2001 From: Jonathan Yap Date: Sat, 18 Jun 2011 07:00:55 -0400 Subject: STORM-1392 Add Nearby Voice to the Communicate menu --- doc/contributions.txt | 1 + indra/newview/llbottomtray.cpp | 3 ++- indra/newview/skins/default/xui/en/menu_viewer.xml | 10 ++++++++++ 3 files changed, 13 insertions(+), 1 deletion(-) diff --git a/doc/contributions.txt b/doc/contributions.txt index b744f4db3e..8a282c68ed 100644 --- a/doc/contributions.txt +++ b/doc/contributions.txt @@ -446,6 +446,7 @@ Jonathan Yap STORM-1313 STORM-899 STORM-1273 + STORM-1392 Kage Pixel VWR-11 Ken March diff --git a/indra/newview/llbottomtray.cpp b/indra/newview/llbottomtray.cpp index 01d19c5ba0..79e6c7b66b 100644 --- a/indra/newview/llbottomtray.cpp +++ b/indra/newview/llbottomtray.cpp @@ -386,6 +386,7 @@ void LLBottomTray::onChange(EStatusType status, const std::string &channelURI, b { bool voice_status = LLVoiceClient::getInstance()->voiceEnabled() && LLVoiceClient::getInstance()->isVoiceWorking(); getChild("speak_flyout_btn")->setEnabled(voice_status); + gMenuBarView->getChild("Nearby Voice")->setEnabled(voice_status); if (voice_status) { LLFirstUse::speak(true); @@ -570,7 +571,7 @@ BOOL LLBottomTray::postBuild() // it takes some time between logging in to world and connecting to voice channel. getChild("speak_btn")->setEnabled(false); getChild("speak_flyout_btn")->setEnabled(false); - + gMenuBarView->getChild("Nearby Voice")->setEnabled(false); // Registering Chat Bar to receive Voice client status change notifications. LLVoiceClient::getInstance()->addObserver(this); diff --git a/indra/newview/skins/default/xui/en/menu_viewer.xml b/indra/newview/skins/default/xui/en/menu_viewer.xml index 81046e99a0..a0d0c8625e 100644 --- a/indra/newview/skins/default/xui/en/menu_viewer.xml +++ b/indra/newview/skins/default/xui/en/menu_viewer.xml @@ -232,6 +232,16 @@ function="SideTray.PanelPeopleTab" parameter="nearby_panel" /> + + + + Date: Sun, 19 Jun 2011 07:07:31 -0400 Subject: STORM-1396 Storm-787 (mute gestures) also mutes sounds from objects --- doc/contributions.txt | 1 + indra/newview/llviewermessage.cpp | 7 +++++-- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/doc/contributions.txt b/doc/contributions.txt index b744f4db3e..dd47322bac 100644 --- a/doc/contributions.txt +++ b/doc/contributions.txt @@ -446,6 +446,7 @@ Jonathan Yap STORM-1313 STORM-899 STORM-1273 + STORM-1396 Kage Pixel VWR-11 Ken March diff --git a/indra/newview/llviewermessage.cpp b/indra/newview/llviewermessage.cpp index 7ab335314a..c3665f8128 100644 --- a/indra/newview/llviewermessage.cpp +++ b/indra/newview/llviewermessage.cpp @@ -4326,8 +4326,11 @@ void process_sound_trigger(LLMessageSystem *msg, void **) } // Don't play sounds from gestures if they are not enabled. - if (!gSavedSettings.getBOOL("EnableGestureSounds")) return; - + if (object_id == owner_id && !gSavedSettings.getBOOL("EnableGestureSounds")) + { + return; + } + gAudiop->triggerSound(sound_id, owner_id, gain, LLAudioEngine::AUDIO_TYPE_SFX, pos_global); } -- cgit v1.2.3 From 6fa808db363b6d6e06e3b31d4acf4258497fb5ee Mon Sep 17 00:00:00 2001 From: Vadim ProductEngine Date: Mon, 20 Jun 2011 16:56:52 +0300 Subject: STORM-1352 WIP Changed sort functor return type to bool. --- indra/newview/llnearbychathandler.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/indra/newview/llnearbychathandler.cpp b/indra/newview/llnearbychathandler.cpp index ae44c76038..2f4621a600 100644 --- a/indra/newview/llnearbychathandler.cpp +++ b/indra/newview/llnearbychathandler.cpp @@ -372,9 +372,9 @@ void LLNearbyChatScreenChannel::arrangeToasts() } } -int sort_toasts_predicate(LLHandle first, LLHandle second) +static bool sort_toasts_predicate(LLHandle first, LLHandle second) { - if (!first.get() || !second.get()) return 0; // STORM-1352 + if (!first.get() || !second.get()) return false; // STORM-1352 F32 v1 = first.get()->getTimeLeftToLive(); F32 v2 = second.get()->getTimeLeftToLive(); -- cgit v1.2.3 From edc0e31bc29f77a821f5ff8a0cb6cf9ba982eb7d Mon Sep 17 00:00:00 2001 From: Wolfpup Lowenhar Date: Mon, 20 Jun 2011 11:55:46 -0400 Subject: STORM-1393 : Correction for loss of object/prim counts in the Build floater for non-mesh objects. --- doc/contributions.txt | 1 + indra/newview/llfloatertools.cpp | 4 +--- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/doc/contributions.txt b/doc/contributions.txt index b744f4db3e..97f4bf516a 100644 --- a/doc/contributions.txt +++ b/doc/contributions.txt @@ -910,6 +910,7 @@ WolfPup Lowenhar STORM-825 STORM-859 STORM-1098 + STORM-1393 VWR-20741 VWR-20933 Zai Lynch diff --git a/indra/newview/llfloatertools.cpp b/indra/newview/llfloatertools.cpp index 0d798afdcc..33b7777d2e 100644 --- a/indra/newview/llfloatertools.cpp +++ b/indra/newview/llfloatertools.cpp @@ -424,8 +424,7 @@ void LLFloaterTools::refresh() // Refresh object and prim count labels LLLocale locale(LLLocale::USER_LOCALE); -#if 0 - if (gMeshRepo.meshRezEnabled()) + if (!gMeshRepo.meshRezEnabled()) { std::string obj_count_string; LLResMgr::getInstance()->getIntegerString(obj_count_string, LLSelectMgr::getInstance()->getSelection()->getRootObjectCount()); @@ -449,7 +448,6 @@ void LLFloaterTools::refresh() getChildView("RenderingCost")->setEnabled(have_selection && sShowObjectCost); } else -#endif { // Get the number of objects selected std::string root_object_count_string; -- cgit v1.2.3 From d95cc1712f1fd9eb0ab06534b54be9e5449f66ba Mon Sep 17 00:00:00 2001 From: Vadim ProductEngine Date: Tue, 21 Jun 2011 01:22:32 +0300 Subject: STORM-1352 WIP Issue a warning if a NULL chat toast is encountered. --- indra/newview/llnearbychathandler.cpp | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/indra/newview/llnearbychathandler.cpp b/indra/newview/llnearbychathandler.cpp index 2f4621a600..68c8d5854e 100644 --- a/indra/newview/llnearbychathandler.cpp +++ b/indra/newview/llnearbychathandler.cpp @@ -401,7 +401,11 @@ void LLNearbyChatScreenChannel::showToastsBottom() for(toast_vec_t::iterator it = m_active_toasts.begin(); it != m_active_toasts.end(); ++it) { LLToast* toast = it->get(); - if (!toast) continue; + if (!toast) + { + llwarns << "NULL found in the active chat toasts list!" << llendl; + continue; + } S32 toast_top = bottom + toast->getRect().getHeight() + margin; -- cgit v1.2.3 From fae829c8eface8cf356b63cbb82587d6950bdd79 Mon Sep 17 00:00:00 2001 From: "Andrew A. de Laix" Date: Tue, 21 Jun 2011 08:54:34 -0700 Subject: Fix EXP-825: check for null gAgentAvatarp to prevent crash (hopefully). --- indra/newview/lltoolpie.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/indra/newview/lltoolpie.cpp b/indra/newview/lltoolpie.cpp index 9ec4d33036..c38c8bad80 100644 --- a/indra/newview/lltoolpie.cpp +++ b/indra/newview/lltoolpie.cpp @@ -639,6 +639,7 @@ BOOL LLToolPie::handleMouseUp(S32 x, S32 y, MASK mask) if (click_action == CLICK_ACTION_NONE // not doing 1-click action && gSavedSettings.getBOOL("ClickToWalk") // click to walk enabled && !gAgent.getFlying() // don't auto-navigate while flying until that works + && gAgentAvatarp && !gAgentAvatarp->isSitting() && !mBlockClickToWalk // another behavior hasn't cancelled click to walk && !mPick.mPosGlobal.isExactlyZero() // valid coordinates for pick -- cgit v1.2.3 From d4103101fef0b12256f97839eaebc292d06f5b74 Mon Sep 17 00:00:00 2001 From: Dave Parks Date: Tue, 21 Jun 2011 11:17:44 -0500 Subject: SH-208 Disable VBO on all intel graphics chips (stability improvement). --- indra/newview/featuretable.txt | 3 ++- indra/newview/featuretable_xp.txt | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/indra/newview/featuretable.txt b/indra/newview/featuretable.txt index 4da155efda..5384660d4c 100644 --- a/indra/newview/featuretable.txt +++ b/indra/newview/featuretable.txt @@ -1,4 +1,4 @@ -version 29 +version 30 // NOTE: This is mostly identical to featuretable_mac.txt with a few differences // Should be combined into one table @@ -297,6 +297,7 @@ RenderDeferred 0 0 list Intel RenderAnisotropic 1 0 +RenderVBOEnable 1 0 list GeForce2 RenderAnisotropic 1 0 diff --git a/indra/newview/featuretable_xp.txt b/indra/newview/featuretable_xp.txt index abe4ec9928..ce2adac221 100644 --- a/indra/newview/featuretable_xp.txt +++ b/indra/newview/featuretable_xp.txt @@ -1,4 +1,4 @@ -version 29 +version 30 // NOTE: This is mostly identical to featuretable_mac.txt with a few differences // Should be combined into one table @@ -295,6 +295,7 @@ RenderDeferred 0 0 list Intel RenderAnisotropic 1 0 +RenderVBOEnable 1 0 list GeForce2 RenderAnisotropic 1 0 -- cgit v1.2.3 From 24749ecef9dc9673fc31b1a9a2a4c154a017f111 Mon Sep 17 00:00:00 2001 From: Xiaohong Bao Date: Tue, 21 Jun 2011 11:00:53 -0600 Subject: fix for SH-1650: [PUBLIC_JIRA_USERS] Widespread crash-to-desktop via llvertexbuffer.cpp(1005) - "memory allocation for vertex data failed" or Render Pool 15 --- indra/newview/app_settings/settings.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/indra/newview/app_settings/settings.xml b/indra/newview/app_settings/settings.xml index ac6ea0f860..39c389f611 100644 --- a/indra/newview/app_settings/settings.xml +++ b/indra/newview/app_settings/settings.xml @@ -8942,7 +8942,7 @@ Type Boolean Value - 1 + 0 RenderUseStreamVBO -- cgit v1.2.3 From 2ac1fe03e85b6b81076a4cfff86ee2ef5af178c4 Mon Sep 17 00:00:00 2001 From: Dave Parks Date: Tue, 21 Jun 2011 16:11:04 -0500 Subject: SH-1838 Fix for black screen when enabling lighting and shadows on an ATI machine. --- indra/llrender/llgl.cpp | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/indra/llrender/llgl.cpp b/indra/llrender/llgl.cpp index a3aed4dd8a..c224ab0e9b 100644 --- a/indra/llrender/llgl.cpp +++ b/indra/llrender/llgl.cpp @@ -568,6 +568,13 @@ bool LLGLManager::initGL() glGetIntegerv(GL_MAX_SAMPLE_MASK_WORDS, &mMaxSampleMaskWords); } +#if LL_WINDOWS + if (mIsATI) + { //using multisample textures on ATI results in black screen for some reason + mHasTextureMultisample = FALSE; + } +#endif + if (mHasFramebufferObject) { glGetIntegerv(GL_MAX_SAMPLES, &mMaxSamples); -- cgit v1.2.3 From 60867888bae9439beee21e84036d0ad2dd3839e6 Mon Sep 17 00:00:00 2001 From: Xiaohong Bao Date: Tue, 21 Jun 2011 16:57:24 -0600 Subject: fix for SH-369: [PUBLIC-JIRA-USERS] [crashhunters] LLVOAvatar::updateImpostors crash --- indra/llcharacter/llcharacter.cpp | 25 +++++++++++++++++++------ indra/llcharacter/llcharacter.h | 1 + indra/newview/llvoavatar.cpp | 4 ++++ 3 files changed, 24 insertions(+), 6 deletions(-) diff --git a/indra/llcharacter/llcharacter.cpp b/indra/llcharacter/llcharacter.cpp index 5f84be2c5d..c9fb8534f1 100644 --- a/indra/llcharacter/llcharacter.cpp +++ b/indra/llcharacter/llcharacter.cpp @@ -38,7 +38,7 @@ LLStringTable LLCharacter::sVisualParamNames(1024); std::vector< LLCharacter* > LLCharacter::sInstances; - +BOOL LLCharacter::sAllowInstancesChange = TRUE ; //----------------------------------------------------------------------------- // LLCharacter() @@ -51,8 +51,10 @@ LLCharacter::LLCharacter() mAppearanceSerialNum( 0 ), mSkeletonSerialNum( 0 ) { - mMotionController.setCharacter( this ); + llassert_always(sAllowInstancesChange) ; sInstances.push_back(this); + + mMotionController.setCharacter( this ); mPauseRequest = new LLPauseRequestHandle(); } @@ -62,18 +64,29 @@ LLCharacter::LLCharacter() // Class Destructor //----------------------------------------------------------------------------- LLCharacter::~LLCharacter() -{ +{ for (LLVisualParam *param = getFirstVisualParam(); param; param = getNextVisualParam()) { delete param; } - std::vector::iterator iter = std::find(sInstances.begin(), sInstances.end(), this); - if (iter != sInstances.end()) + + U32 i ; + U32 size = sInstances.size() ; + for(i = 0 ; i < size ; i++) { - sInstances.erase(iter); + if(sInstances[i] == this) + { + break ; + } } + + llassert_always(i < size) ; + + llassert_always(sAllowInstancesChange) ; + sInstances[i] = sInstances[size - 1] ; + sInstances.pop_back() ; } diff --git a/indra/llcharacter/llcharacter.h b/indra/llcharacter/llcharacter.h index a6347fcc3c..e81a27c2bc 100644 --- a/indra/llcharacter/llcharacter.h +++ b/indra/llcharacter/llcharacter.h @@ -266,6 +266,7 @@ public: void setSkeletonSerialNum( U32 num ) { mSkeletonSerialNum = num; } static std::vector< LLCharacter* > sInstances; + static BOOL sAllowInstancesChange ; //debug use protected: LLMotionController mMotionController; diff --git a/indra/newview/llvoavatar.cpp b/indra/newview/llvoavatar.cpp index 1b53348b43..8eda6346b0 100644 --- a/indra/newview/llvoavatar.cpp +++ b/indra/newview/llvoavatar.cpp @@ -8242,6 +8242,8 @@ U32 LLVOAvatar::getPartitionType() const //static void LLVOAvatar::updateImpostors() { + LLCharacter::sAllowInstancesChange = FALSE ; + for (std::vector::iterator iter = LLCharacter::sInstances.begin(); iter != LLCharacter::sInstances.end(); ++iter) { @@ -8251,6 +8253,8 @@ void LLVOAvatar::updateImpostors() gPipeline.generateImpostor(avatar); } } + + LLCharacter::sAllowInstancesChange = TRUE ; } BOOL LLVOAvatar::isImpostor() const -- cgit v1.2.3 From cff4c6e8856dabb899473af30ab6d08d8a7dc370 Mon Sep 17 00:00:00 2001 From: Xiaohong Bao Date: Tue, 21 Jun 2011 16:58:55 -0600 Subject: fix for SH-1642: [PUBLIC_JIRA_USERS][crashhunters] crash at LLViewerTextureList::removeImageFromList(LLViewerFetchedTexture *) [secondlife-bin llviewertexturelist.cpp] --- indra/newview/llviewertexturelist.cpp | 19 +++++-------------- indra/newview/llviewertexturelist.h | 7 ++----- 2 files changed, 7 insertions(+), 19 deletions(-) diff --git a/indra/newview/llviewertexturelist.cpp b/indra/newview/llviewertexturelist.cpp index a1d9434d44..d24174adea 100644 --- a/indra/newview/llviewertexturelist.cpp +++ b/indra/newview/llviewertexturelist.cpp @@ -76,7 +76,6 @@ LLStat LLViewerTextureList::sFormattedMemStat(32, TRUE); LLViewerTextureList gTextureList; static LLFastTimer::DeclareTimer FTM_PROCESS_IMAGES("Process Images"); -U32 LLViewerTextureList::sRenderThreadID = 0 ; /////////////////////////////////////////////////////////////////////////////// LLViewerTextureList::LLViewerTextureList() @@ -90,7 +89,6 @@ LLViewerTextureList::LLViewerTextureList() void LLViewerTextureList::init() { - sRenderThreadID = LLThread::currentID() ; mInitialized = TRUE ; sNumImages = 0; mUpdateStats = TRUE; @@ -502,10 +500,9 @@ LLViewerFetchedTexture *LLViewerTextureList::findImage(const LLUUID &image_id) return iter->second; } -void LLViewerTextureList::addImageToList(LLViewerFetchedTexture *image, U32 thread_id) +void LLViewerTextureList::addImageToList(LLViewerFetchedTexture *image) { llassert_always(mInitialized) ; - llassert_always(sRenderThreadID == thread_id); llassert(image); if (image->isInImageList()) { @@ -519,10 +516,9 @@ void LLViewerTextureList::addImageToList(LLViewerFetchedTexture *image, U32 thre image->setInImageList(TRUE) ; } -void LLViewerTextureList::removeImageFromList(LLViewerFetchedTexture *image, U32 thread_id) +void LLViewerTextureList::removeImageFromList(LLViewerFetchedTexture *image) { llassert_always(mInitialized) ; - llassert_always(sRenderThreadID == thread_id); llassert(image); if (!image->isInImageList()) { @@ -659,10 +655,7 @@ void LLViewerTextureList::updateImagesDecodePriorities() const F32 LAZY_FLUSH_TIMEOUT = 30.f; // stop decoding const F32 MAX_INACTIVE_TIME = 50.f; // actually delete S32 min_refs = 3; // 1 for mImageList, 1 for mUUIDMap, 1 for local reference - if (imagep->hasCallbacks()) - { - min_refs++; // Add an extra reference if we're on the loaded callback list - } + S32 num_refs = imagep->getNumRefs(); if (num_refs == min_refs) { @@ -719,9 +712,9 @@ void LLViewerTextureList::updateImagesDecodePriorities() if ((decode_priority_test < old_priority_test * .8f) || (decode_priority_test > old_priority_test * 1.25f)) { - removeImageFromList(imagep, sRenderThreadID); + removeImageFromList(imagep); imagep->setDecodePriority(decode_priority); - addImageToList(imagep, sRenderThreadID); + addImageToList(imagep); } update_counter--; } @@ -893,8 +886,6 @@ void LLViewerTextureList::decodeAllImages(F32 max_time) { LLTimer timer; - llassert_always(sRenderThreadID == LLThread::currentID()); - // Update texture stats and priorities std::vector > image_list; for (image_priority_list_t::iterator iter = mImageList.begin(); diff --git a/indra/newview/llviewertexturelist.h b/indra/newview/llviewertexturelist.h index d02b6be6b5..7f4dd0ae88 100644 --- a/indra/newview/llviewertexturelist.h +++ b/indra/newview/llviewertexturelist.h @@ -121,8 +121,8 @@ private: void addImage(LLViewerFetchedTexture *image); void deleteImage(LLViewerFetchedTexture *image); - void addImageToList(LLViewerFetchedTexture *image, U32 thread_id = LLThread::currentID()); - void removeImageFromList(LLViewerFetchedTexture *image, U32 thread_id = LLThread::currentID()); + void addImageToList(LLViewerFetchedTexture *image); + void removeImageFromList(LLViewerFetchedTexture *image); LLViewerFetchedTexture * getImage(const LLUUID &image_id, BOOL usemipmap = TRUE, @@ -208,9 +208,6 @@ public: private: static S32 sNumImages; static void (*sUUIDCallback)(void**, const LLUUID &); - - //debug use - static U32 sRenderThreadID; }; class LLUIImageList : public LLImageProviderInterface, public LLSingleton -- cgit v1.2.3 From 1e061e56334cf9343909656c8d48830430047353 Mon Sep 17 00:00:00 2001 From: Dave Parks Date: Wed, 22 Jun 2011 16:21:53 -0500 Subject: SH-1848 Integrate changeset to fix typo in shader name preventing shadows being enabled while anti-aliasing is on on platforms where filenames are case sensitive. --- indra/newview/llviewershadermgr.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/indra/newview/llviewershadermgr.cpp b/indra/newview/llviewershadermgr.cpp index da4d0548d0..0e3a0ef507 100644 --- a/indra/newview/llviewershadermgr.cpp +++ b/indra/newview/llviewershadermgr.cpp @@ -1209,7 +1209,7 @@ BOOL LLViewerShaderMgr::loadShadersDeferred() { if (multisample) { - fragment = "deferred/sunlightSSAOMSF.glsl"; + fragment = "deferred/sunLightSSAOMSF.glsl"; } else { @@ -1220,7 +1220,7 @@ BOOL LLViewerShaderMgr::loadShadersDeferred() { if (multisample) { - fragment = "deferred/sunlightMSF.glsl"; + fragment = "deferred/sunLightMSF.glsl"; } else { -- cgit v1.2.3 From 35ba8f36e432a14c35fb63b1eb49ddbc7ebfbde7 Mon Sep 17 00:00:00 2001 From: Roxie Linden Date: Thu, 23 Jun 2011 12:00:31 -0700 Subject: Fix for VOICE-3 [crashhunters] LLVoiceVoiceClient::stateMachine Race condition with parcel changing while shutting down. If a parcel changes, we went into code that requests the cap for the new parcel voice channel info. This happened in any state, not the two states where it is really appropriate. stateRunning or stateNoSession. When shutting down, we may be in stateTerminate, stateLeavingSession, or so on, and we don't want to muck with getting caps and such during that time. --- indra/newview/llvoicevivox.cpp | 303 +++++++++++++++++++++++++---------------- indra/newview/llvoicevivox.h | 15 +- 2 files changed, 195 insertions(+), 123 deletions(-) diff --git a/indra/newview/llvoicevivox.cpp b/indra/newview/llvoicevivox.cpp index 6ee6822e2f..cd2bbad620 100644 --- a/indra/newview/llvoicevivox.cpp +++ b/indra/newview/llvoicevivox.cpp @@ -195,12 +195,13 @@ static LLVivoxVoiceClientFriendsObserver *friendslist_listener = NULL; class LLVivoxVoiceClientCapResponder : public LLHTTPClient::Responder { public: - LLVivoxVoiceClientCapResponder(void){}; + LLVivoxVoiceClientCapResponder(LLVivoxVoiceClient::state requesting_state) : mRequestingState(requesting_state) {}; virtual void error(U32 status, const std::string& reason); // called with bad status codes virtual void result(const LLSD& content); private: + LLVivoxVoiceClient::state mRequestingState; // state }; void LLVivoxVoiceClientCapResponder::error(U32 status, const std::string& reason) @@ -208,6 +209,7 @@ void LLVivoxVoiceClientCapResponder::error(U32 status, const std::string& reason LL_WARNS("Voice") << "LLVivoxVoiceClientCapResponder::error(" << status << ": " << reason << ")" << LL_ENDL; + LLVivoxVoiceClient::getInstance()->sessionTerminate(); } void LLVivoxVoiceClientCapResponder::result(const LLSD& content) @@ -216,12 +218,12 @@ void LLVivoxVoiceClientCapResponder::result(const LLSD& content) LL_DEBUGS("Voice") << "ParcelVoiceInfoRequest response:" << ll_pretty_print_sd(content) << LL_ENDL; + std::string uri; + std::string credentials; + if ( content.has("voice_credentials") ) { LLSD voice_credentials = content["voice_credentials"]; - std::string uri; - std::string credentials; - if ( voice_credentials.has("channel_uri") ) { uri = voice_credentials["channel_uri"].asString(); @@ -231,7 +233,12 @@ void LLVivoxVoiceClientCapResponder::result(const LLSD& content) credentials = voice_credentials["channel_credentials"].asString(); } - + } + + // set the spatial channel. If no voice credentials or uri are + // available, then we simply drop out of voice spatially. + if(LLVivoxVoiceClient::getInstance()->parcelVoiceInfoReceived(mRequestingState)) + { LLVivoxVoiceClient::getInstance()->setSpatialChannel(uri, credentials); } } @@ -551,18 +558,27 @@ void LLVivoxVoiceClient::userAuthorized(const std::string& user_id, const LLUUID void LLVivoxVoiceClient::requestVoiceAccountProvision(S32 retries) { - if ( gAgent.getRegion() && mVoiceEnabled ) + LLViewerRegion *region = gAgent.getRegion(); + + if ( region && mVoiceEnabled ) { std::string url = - gAgent.getRegion()->getCapability( - "ProvisionVoiceAccountRequest"); - - if ( url == "" ) return; - + region->getCapability("ProvisionVoiceAccountRequest"); + + if ( url.empty() ) + { + // we've not received the capability yet, so return. + // the password will remain empty, so we'll remain in + // stateIdle + return; + } + LLHTTPClient::post( - url, - LLSD(), - new LLVivoxVoiceAccountProvisionResponder(retries)); + url, + LLSD(), + new LLVivoxVoiceAccountProvisionResponder(retries)); + + setState(stateConnectorStart); } } @@ -673,7 +689,8 @@ std::string LLVivoxVoiceClient::state2string(LLVivoxVoiceClient::state inState) CASE(stateVoiceFontsWait); CASE(stateVoiceFontsReceived); CASE(stateCreatingSessionGroup); - CASE(stateNoChannel); + CASE(stateNoChannel); + CASE(stateRetrievingParcelVoiceInfo); CASE(stateJoiningSession); CASE(stateSessionJoined); CASE(stateRunning); @@ -741,42 +758,6 @@ void LLVivoxVoiceClient::stateMachine() } } - // Check for parcel boundary crossing - { - LLViewerRegion *region = gAgent.getRegion(); - LLParcel *parcel = LLViewerParcelMgr::getInstance()->getAgentParcel(); - - if(region && parcel) - { - S32 parcelLocalID = parcel->getLocalID(); - std::string regionName = region->getName(); - std::string capURI = region->getCapability("ParcelVoiceInfoRequest"); - -// LL_DEBUGS("Voice") << "Region name = \"" << regionName << "\", parcel local ID = " << parcelLocalID << ", cap URI = \"" << capURI << "\"" << LL_ENDL; - - // The region name starts out empty and gets filled in later. - // Also, the cap gets filled in a short time after the region cross, but a little too late for our purposes. - // If either is empty, wait for the next time around. - if(!regionName.empty()) - { - if(!capURI.empty()) - { - if((parcelLocalID != mCurrentParcelLocalID) || (regionName != mCurrentRegionName)) - { - // We have changed parcels. Initiate a parcel channel lookup. - mCurrentParcelLocalID = parcelLocalID; - mCurrentRegionName = regionName; - - parcelChanged(); - } - } - else - { - LL_WARNS_ONCE("Voice") << "region doesn't have ParcelVoiceInfoRequest capability. This is normal for a short time after teleporting, but bad if it persists for very long." << LL_ENDL; - } - } - } - } switch(getState()) { @@ -1026,22 +1007,9 @@ void LLVivoxVoiceClient::stateMachine() } else if(!mAccountName.empty()) { - LLViewerRegion *region = gAgent.getRegion(); - - if(region) + if ( mAccountPassword.empty() ) { - if ( region->getCapability("ProvisionVoiceAccountRequest") != "" ) - { - if ( mAccountPassword.empty() ) - { - requestVoiceAccountProvision(); - } - setState(stateConnectorStart); - } - else - { - LL_WARNS_ONCE("Voice") << "region doesn't have ProvisionVoiceAccountRequest capability!" << LL_ENDL; - } + requestVoiceAccountProvision(); } } break; @@ -1382,11 +1350,7 @@ void LLVivoxVoiceClient::stateMachine() setState(stateCreatingSessionGroup); sessionGroupCreateSendMessage(); #else - // Not using session groups -- skip the stateCreatingSessionGroup state. - setState(stateNoChannel); - - // Initial kick-off of channel lookup logic - parcelChanged(); + setState(stateNoChannel); #endif break; @@ -1399,19 +1363,29 @@ void LLVivoxVoiceClient::stateMachine() } else if(!mMainSessionGroupHandle.empty()) { - setState(stateNoChannel); - // Start looped recording (needed for "panic button" anti-griefing tool) recordingLoopStart(); - - // Initial kick-off of channel lookup logic - parcelChanged(); + setState(stateNoChannel); } break; + + //MARK: stateRetrievingParcelVoiceInfo + case stateRetrievingParcelVoiceInfo: + // wait until parcel voice info is received. + if(mSessionTerminateRequested || !mVoiceEnabled) + { + // if a terminate request has been received, + // bail and go to the stateSessionTerminated + // state. If the cap request is still pending, + // the responder will check to see if we've moved + // to a new session and won't change any state. + setState(stateSessionTerminated); + } + break; + //MARK: stateNoChannel case stateNoChannel: - LL_DEBUGS("Voice") << "State No Channel" << LL_ENDL; mSpatialJoiningNum = 0; // Do this here as well as inside sendPositionalUpdate(). @@ -1432,6 +1406,16 @@ void LLVivoxVoiceClient::stateMachine() { setState(stateCaptureBufferPaused); } + else if(checkParcelChanged() || (mNextAudioSession == NULL)) + { + // the parcel is changed, or we have no pending audio sessions, + // so try to request the parcel voice info + // if we have the cap, we move to the appropriate state + if(requestParcelVoiceInfo()) + { + setState(stateRetrievingParcelVoiceInfo); + } + } else if(sessionNeedsRelog(mNextAudioSession)) { requestRelog(); @@ -1466,32 +1450,28 @@ void LLVivoxVoiceClient::stateMachine() notifyStatusObservers(LLVoiceClientStatusObserver::STATUS_JOINING); setState(stateJoiningSession); } - else if(!mSpatialSessionURI.empty()) - { - // If we're not headed elsewhere and have a spatial URI, return to spatial. - switchChannel(mSpatialSessionURI, true, false, false, mSpatialSessionCredentials); - } break; - + //MARK: stateJoiningSession case stateJoiningSession: // waiting for session handle - - // If this is true we have problem with connection to voice server (EXT-4313). - // See descriptions of mSpatialJoiningNum and MAX_NORMAL_JOINING_SPATIAL_NUM. - if(mSpatialJoiningNum == MAX_NORMAL_JOINING_SPATIAL_NUM) + + // If this is true we have problem with connection to voice server (EXT-4313). + // See descriptions of mSpatialJoiningNum and MAX_NORMAL_JOINING_SPATIAL_NUM. + if(mSpatialJoiningNum == MAX_NORMAL_JOINING_SPATIAL_NUM) { - // Notify observers to let them know there is problem with voice - notifyStatusObservers(LLVoiceClientStatusObserver::STATUS_VOICE_DISABLED); - llwarns << "There seems to be problem with connection to voice server. Disabling voice chat abilities." << llendl; + // Notify observers to let them know there is problem with voice + notifyStatusObservers(LLVoiceClientStatusObserver::STATUS_VOICE_DISABLED); + llwarns << "There seems to be problem with connection to voice server. Disabling voice chat abilities." << llendl; } - - // Increase mSpatialJoiningNum only for spatial sessions- it's normal to reach this case for - // example for p2p many times while waiting for response, so it can't be used to detect errors - if(mAudioSession && mAudioSession->mIsSpatial) + + // Increase mSpatialJoiningNum only for spatial sessions- it's normal to reach this case for + // example for p2p many times while waiting for response, so it can't be used to detect errors + if(mAudioSession && mAudioSession->mIsSpatial) { - mSpatialJoiningNum++; + + mSpatialJoiningNum++; } - + // joinedAudioSession() will transition from here to stateSessionJoined. if(!mVoiceEnabled) { @@ -1511,12 +1491,13 @@ void LLVivoxVoiceClient::stateMachine() } } } - break; - + break; + //MARK: stateSessionJoined case stateSessionJoined: // session handle received - mSpatialJoiningNum = 0; + + mSpatialJoiningNum = 0; // It appears that I need to wait for BOTH the SessionGroup.AddSession response and the SessionStateChangeEvent with state 4 // before continuing from this state. They can happen in either order, and if I don't wait for both, things can get stuck. // For now, the SessionGroup.AddSession response handler sets mSessionHandle and the SessionStateChangeEvent handler transitions to stateSessionJoined. @@ -1553,7 +1534,7 @@ void LLVivoxVoiceClient::stateMachine() sessionMediaDisconnectSendMessage(mAudioSession); setState(stateSessionTerminated); } - } + } break; //MARK: stateRunning @@ -1565,6 +1546,7 @@ void LLVivoxVoiceClient::stateMachine() } else { + if(!inSpatialChannel()) { // When in a non-spatial channel, never send positional updates. @@ -1572,8 +1554,22 @@ void LLVivoxVoiceClient::stateMachine() } else { + if(checkParcelChanged()) + { + // if the parcel has changed, attempted to request the + // cap for the parcel voice info. If we can't request it + // then we don't have the cap URL so we do nothing and will + // recheck next time around + if(requestParcelVoiceInfo()) + { + // we did get the cap, and we made the request, + // so go wait for the response. + setState(stateRetrievingParcelVoiceInfo); + } + } // Do the calculation that enforces the listener<->speaker tether (and also updates the real camera position) enforceTether(); + } // Do notifications for expiring Voice Fonts. @@ -3840,7 +3836,7 @@ void LLVivoxVoiceClient::participantUpdatedEvent( // also initialize voice moderate_mode depend on Agent's participant. See EXT-6937. // *TODO: remove once a way to request the current voice channel moderation mode is implemented. - if (gAgentID == participant->mAvatarID) + if (gAgent.getID() == participant->mAvatarID) { speaker_manager->initVoiceModerateMode(); } @@ -4073,7 +4069,7 @@ void LLVivoxVoiceClient::messageEvent( } LL_DEBUGS("Voice") << "adding message, name " << session->mName << " session " << session->mIMSessionID << ", target " << session->mCallerID << LL_ENDL; - gIMMgr->addMessage(session->mIMSessionID, + LLIMMgr::getInstance()->addMessage(session->mIMSessionID, session->mCallerID, session->mName.c_str(), message.c_str(), @@ -4447,24 +4443,91 @@ LLVivoxVoiceClient::participantState* LLVivoxVoiceClient::findParticipantByID(co } -void LLVivoxVoiceClient::parcelChanged() + +// Check for parcel boundary crossing +bool LLVivoxVoiceClient::checkParcelChanged(bool update) { - if(getState() >= stateNoChannel) + LLViewerRegion *region = gAgent.getRegion(); + LLParcel *parcel = LLViewerParcelMgr::getInstance()->getAgentParcel(); + + if(region && parcel) { - // If the user is logged in, start a channel lookup. - LL_DEBUGS("Voice") << "sending ParcelVoiceInfoRequest (" << mCurrentRegionName << ", " << mCurrentParcelLocalID << ")" << LL_ENDL; + S32 parcelLocalID = parcel->getLocalID(); + std::string regionName = region->getName(); + + // LL_DEBUGS("Voice") << "Region name = \"" << regionName << "\", parcel local ID = " << parcelLocalID << ", cap URI = \"" << capURI << "\"" << LL_ENDL; + + // The region name starts out empty and gets filled in later. + // Also, the cap gets filled in a short time after the region cross, but a little too late for our purposes. + // If either is empty, wait for the next time around. + if(!regionName.empty()) + { + if((parcelLocalID != mCurrentParcelLocalID) || (regionName != mCurrentRegionName)) + { + // We have changed parcels. Initiate a parcel channel lookup. + if (update) + { + mCurrentParcelLocalID = parcelLocalID; + mCurrentRegionName = regionName; + } + return true; + } + } + } + return false; +} + +bool LLVivoxVoiceClient::parcelVoiceInfoReceived(state requesting_state) +{ + // pop back to the state we were in when the parcel changed and we managed to + // do the request. + if(getState() == stateRetrievingParcelVoiceInfo) + { + setState(requesting_state); + return true; + } + else + { + // we've dropped out of stateRetrievingParcelVoiceInfo + // before we received the cap result, due to a terminate + // or transition to a non-voice channel. Don't switch channels. + return false; + } +} + - std::string url = gAgent.getRegion()->getCapability("ParcelVoiceInfoRequest"); +bool LLVivoxVoiceClient::requestParcelVoiceInfo() +{ + LL_DEBUGS("Voice") << "sending ParcelVoiceInfoRequest (" << mCurrentRegionName << ", " << mCurrentParcelLocalID << ")" << LL_ENDL; + + // grab the cap for parcel voice info from the region. + LLViewerRegion * region = gAgent.getRegion(); + if (region == NULL) + { + return false; + } + // grab the cap. + std::string url = gAgent.getRegion()->getCapability("ParcelVoiceInfoRequest"); + if (!url.empty()) + { + // if we've already retrieved the cap from the region, go ahead and make the request, + // and return true so we can go into the state that waits for the response. + checkParcelChanged(true); LLSD data; + LL_DEBUGS("Voice") << "sending ParcelVoiceInfoRequest (" << mCurrentRegionName << ", " << mCurrentParcelLocalID << ")" << LL_ENDL; + LLHTTPClient::post( - url, - data, - new LLVivoxVoiceClientCapResponder); + url, + data, + new LLVivoxVoiceClientCapResponder(getState())); + return true; } - else + else { - // The transition to stateNoChannel needs to kick this off again. - LL_INFOS("Voice") << "not logged in yet, deferring" << LL_ENDL; + + // we don't have the cap yet, so return false so the caller can try again later. + LL_DEBUGS("Voice") << "ParcelVoiceInfoRequest cap not yet available, deferring" << LL_ENDL; + return false; } } @@ -4488,6 +4551,7 @@ void LLVivoxVoiceClient::switchChannel( case stateJoinSessionFailed: case stateJoinSessionFailedWaiting: case stateNoChannel: + case stateRetrievingParcelVoiceInfo: // Always switch to the new URI from these states. needsSwitch = true; break; @@ -4560,13 +4624,10 @@ void LLVivoxVoiceClient::switchChannel( mNextAudioSession->mIsP2P = is_p2p; } - if(getState() <= stateNoChannel) - { - // We're already set up to join a channel, just needed to fill in the session URI - } - else + if(getState() >= stateRetrievingParcelVoiceInfo) { - // State machine will come around and rejoin if uri/handle is not empty. + // If we're already in a channel, or if we're joining one, terminate + // so we can rejoin with the new session data. sessionTerminate(); } } @@ -6267,13 +6328,13 @@ void LLVivoxVoiceClient::avatarNameResolved(const LLUUID &id, const std::string { session->mTextInvitePending = false; - // We don't need to call gIMMgr->addP2PSession() here. The first incoming message will create the panel. + // We don't need to call LLIMMgr::getInstance()->addP2PSession() here. The first incoming message will create the panel. } if(session->mVoiceInvitePending) { session->mVoiceInvitePending = false; - gIMMgr->inviteToSession( + LLIMMgr::getInstance()->inviteToSession( session->mIMSessionID, session->mName, session->mCallerID, diff --git a/indra/newview/llvoicevivox.h b/indra/newview/llvoicevivox.h index 471545de56..1142a1a49c 100644 --- a/indra/newview/llvoicevivox.h +++ b/indra/newview/llvoicevivox.h @@ -380,7 +380,8 @@ protected: stateVoiceFontsWait, // Awaiting the list of voice fonts stateVoiceFontsReceived, // List of voice fonts received stateCreatingSessionGroup, // Creating the main session group - stateNoChannel, // + stateNoChannel, // Need to join a channel + stateRetrievingParcelVoiceInfo, // waiting for parcel voice info request to return with spatial credentials stateJoiningSession, // waiting for session handle stateSessionJoined, // session handle received stateRunning, // in session, steady state @@ -620,6 +621,8 @@ protected: void sessionMediaDisconnectSendMessage(sessionState *session); void sessionTextDisconnectSendMessage(sessionState *session); + + // Pokes the state machine to leave the audio session next time around. void sessionTerminate(); @@ -629,6 +632,12 @@ protected: // Does the actual work to get out of the audio session void leaveAudioSession(); + // notifies the voice client that we've received parcel voice info + bool parcelVoiceInfoReceived(state requesting_state); + + friend class LLVivoxVoiceClientCapResponder; + + void lookupName(const LLUUID &id); void onAvatarNameCache(const LLUUID& id, const LLAvatarName& av_name); void avatarNameResolved(const LLUUID &id, const std::string &name); @@ -733,9 +742,11 @@ private: bool mCaptureDeviceDirty; bool mRenderDeviceDirty; + + bool checkParcelChanged(bool update = false); // This should be called when the code detects we have changed parcels. // It initiates the call to the server that gets the parcel channel. - void parcelChanged(); + bool requestParcelVoiceInfo(); void switchChannel(std::string uri = std::string(), bool spatial = true, bool no_reconnect = false, bool is_p2p = false, std::string hash = ""); void joinSession(sessionState *session); -- cgit v1.2.3 From 253642ccff9b08da5e62449ff62b23e986dcb77d Mon Sep 17 00:00:00 2001 From: Dave Parks Date: Thu, 23 Jun 2011 23:06:36 -0500 Subject: SH-1903 Don't use indexed texture rendering when GL version is < 3.1 (fixes bad performance on cards with old drivers) --- indra/llrender/llglslshader.cpp | 10 ++++++++++ indra/llrender/llshadermgr.cpp | 7 ++++++- indra/newview/llvovolume.cpp | 5 +++++ 3 files changed, 21 insertions(+), 1 deletion(-) diff --git a/indra/llrender/llglslshader.cpp b/indra/llrender/llglslshader.cpp index 8e99f62de6..ad2c662dfc 100644 --- a/indra/llrender/llglslshader.cpp +++ b/indra/llrender/llglslshader.cpp @@ -109,6 +109,11 @@ BOOL LLGLSLShader::createShader(vector * attributes, // Create program mProgramObject = glCreateProgramObjectARB(); + if (gGLManager.mGLVersion < 3.1f) + { //force indexed texture channels to 1 if GL version is old (performance improvement for drivers with poor branching shader model support) + mFeatures.mIndexedTextureChannels = llmin(mFeatures.mIndexedTextureChannels, 1); + } + //compile new source vector< pair >::iterator fileIter = mShaderFiles.begin(); for ( ; fileIter != mShaderFiles.end(); fileIter++ ) @@ -131,6 +136,11 @@ BOOL LLGLSLShader::createShader(vector * attributes, return FALSE; } + if (gGLManager.mGLVersion < 3.1f) + { //attachShaderFeatures may have set the number of indexed texture channels, so set to 1 again + mFeatures.mIndexedTextureChannels = llmin(mFeatures.mIndexedTextureChannels, 1); + } + // Map attributes and uniforms if (success) { diff --git a/indra/llrender/llshadermgr.cpp b/indra/llrender/llshadermgr.cpp index bdc103b917..3910cd779c 100644 --- a/indra/llrender/llshadermgr.cpp +++ b/indra/llrender/llshadermgr.cpp @@ -524,7 +524,12 @@ GLhandleARB LLShaderMgr::loadShaderFile(const std::string& filename, S32 & shade text[count++] = strdup("{\n"); - if (gGLManager.mGLVersion >= 3.f) + if (texture_index_channels == 1) + { //don't use flow control, that's silly + text[count++] = strdup("return texture2D(tex0, texcoord);\n"); + text[count++] = strdup("}\n"); + } + else if (gGLManager.mGLVersion >= 3.f) { text[count++] = strdup("\tswitch (int(vary_texture_index+0.25))\n"); text[count++] = strdup("\t{\n"); diff --git a/indra/newview/llvovolume.cpp b/indra/newview/llvovolume.cpp index c5e2c56e4b..e6da8eb89d 100644 --- a/indra/newview/llvovolume.cpp +++ b/indra/newview/llvovolume.cpp @@ -4495,6 +4495,11 @@ void LLVolumeGeometryManager::genDrawInfo(LLSpatialGroup* group, U32 mask, std:: S32 texture_index_channels = gGLManager.mNumTextureImageUnits-1; //always reserve one for shiny for now just for simplicity + if (gGLManager.mGLVersion < 3.1f) + { + texture_index_channels = 1; + } + if (LLPipeline::sRenderDeferred && distance_sort) { texture_index_channels = gDeferredAlphaProgram.mFeatures.mIndexedTextureChannels; -- cgit v1.2.3 From ad4b559f9fb7c39a090898207c46d4c77d3560bf Mon Sep 17 00:00:00 2001 From: Dave Parks Date: Fri, 24 Jun 2011 15:30:48 -0500 Subject: SH-1903 Fix for silly shader compiler error. --- indra/llrender/llshadermgr.cpp | 29 +++++++++++++++++++++-------- indra/newview/llviewershadermgr.cpp | 5 +++++ 2 files changed, 26 insertions(+), 8 deletions(-) diff --git a/indra/llrender/llshadermgr.cpp b/indra/llrender/llshadermgr.cpp index 3910cd779c..b4e7aaa9b4 100644 --- a/indra/llrender/llshadermgr.cpp +++ b/indra/llrender/llshadermgr.cpp @@ -542,6 +542,8 @@ GLhandleARB LLShaderMgr::loadShaderFile(const std::string& filename, S32 & shade } text[count++] = strdup("\t}\n"); + text[count++] = strdup("\treturn vec4(0,0,0,0);\n"); + text[count++] = strdup("}\n"); } else { @@ -562,10 +564,10 @@ GLhandleARB LLShaderMgr::loadShaderFile(const std::string& filename, S32 & shade std::string if_str = llformat("if (ti == %d) return texture2D(tex%d, texcoord);\n", i, i); text[count++] = strdup(if_str.c_str()); } - } - text[count++] = strdup("\treturn vec4(0,0,0,0);\n"); - text[count++] = strdup("}\n"); + text[count++] = strdup("\treturn vec4(0,0,0,0);\n"); + text[count++] = strdup("}\n"); + } } //copy file into memory @@ -610,11 +612,6 @@ GLhandleARB LLShaderMgr::loadShaderFile(const std::string& filename, S32 & shade } } - //free memory - for (GLuint i = 0; i < count; i++) - { - free(text[i]); - } if (error == GL_NO_ERROR) { //check for errors @@ -628,6 +625,16 @@ GLhandleARB LLShaderMgr::loadShaderFile(const std::string& filename, S32 & shade //an error occured, print log LL_WARNS("ShaderLoading") << "GLSL Compilation Error: (" << error << ") in " << filename << LL_ENDL; dumpObjectLog(ret); + + std::stringstream ostr; + //dump shader source for debugging + for (GLuint i = 0; i < count; i++) + { + ostr << i << ": " << text[i]; + } + + LL_WARNS("ShaderLoading") << "\n" << ostr.str() << llendl; + ret = 0; } } @@ -638,6 +645,12 @@ GLhandleARB LLShaderMgr::loadShaderFile(const std::string& filename, S32 & shade } stop_glerror(); + //free memory + for (GLuint i = 0; i < count; i++) + { + free(text[i]); + } + //successfully loaded, save results if (ret) { diff --git a/indra/newview/llviewershadermgr.cpp b/indra/newview/llviewershadermgr.cpp index 0e3a0ef507..592923ee07 100644 --- a/indra/newview/llviewershadermgr.cpp +++ b/indra/newview/llviewershadermgr.cpp @@ -722,6 +722,11 @@ BOOL LLViewerShaderMgr::loadBasicShaders() shaders.reserve(13); S32 ch = gGLManager.mNumTextureImageUnits-1; + if (gGLManager.mGLVersion < 3.1f) + { //force to 1 texture index channel for old drivers + ch = 1; + } + std::vector index_channels; index_channels.push_back(-1); shaders.push_back( make_pair( "windlight/atmosphericsVarsF.glsl", mVertexShaderLevel[SHADER_WINDLIGHT] ) ); index_channels.push_back(-1); shaders.push_back( make_pair( "windlight/gammaF.glsl", mVertexShaderLevel[SHADER_WINDLIGHT]) ); -- cgit v1.2.3 From d66545d17ff1aa30a3840928fa38a919ddec0a53 Mon Sep 17 00:00:00 2001 From: Jonathan Yap Date: Sat, 25 Jun 2011 11:08:36 -0400 Subject: STORM-1326 [ALL LANGS] (Spanish) [HARDCODED] Selling land, advice with "Anyone" in English. --- doc/contributions.txt | 1 + indra/newview/llfloaterauction.cpp | 3 ++- indra/newview/llfloatersellland.cpp | 3 ++- indra/newview/skins/default/xui/en/strings.xml | 3 +++ 4 files changed, 8 insertions(+), 2 deletions(-) diff --git a/doc/contributions.txt b/doc/contributions.txt index b744f4db3e..ce7afd2b84 100644 --- a/doc/contributions.txt +++ b/doc/contributions.txt @@ -446,6 +446,7 @@ Jonathan Yap STORM-1313 STORM-899 STORM-1273 + STORM-1326 Kage Pixel VWR-11 Ken March diff --git a/indra/newview/llfloaterauction.cpp b/indra/newview/llfloaterauction.cpp index c95b046707..c6743ca13b 100644 --- a/indra/newview/llfloaterauction.cpp +++ b/indra/newview/llfloaterauction.cpp @@ -55,6 +55,7 @@ #include "llrender.h" #include "llsdutil.h" #include "llsdutil_math.h" +#include "lltrans.h" ///---------------------------------------------------------------------------- /// Local function declarations, constants, enums, and typedefs @@ -457,7 +458,7 @@ void LLFloaterAuction::onClickSellToAnyone(void* data) LLSD args; args["LAND_SIZE"] = llformat("%d", area); args["SALE_PRICE"] = llformat("%d", sale_price); - args["NAME"] = "Anyone"; + args["NAME"] = LLTrans::getString("Anyone"); LLNotification::Params params("ConfirmLandSaleChange"); // Re-use existing dialog params.substitutions(args) diff --git a/indra/newview/llfloatersellland.cpp b/indra/newview/llfloatersellland.cpp index 8558a1277c..3434841d09 100644 --- a/indra/newview/llfloatersellland.cpp +++ b/indra/newview/llfloatersellland.cpp @@ -41,6 +41,7 @@ #include "llviewerparcelmgr.h" #include "lluictrlfactory.h" #include "llviewerwindow.h" +#include "lltrans.h" class LLAvatarName; @@ -451,7 +452,7 @@ void LLFloaterSellLandUI::doSellLand(void *userdata) // Do a confirmation S32 sale_price = self->getChild("price")->getValue(); S32 area = parcel->getArea(); - std::string authorizedBuyerName = "Anyone"; + std::string authorizedBuyerName = LLTrans::getString("Anyone"); bool sell_to_anyone = true; if ("user" == self->getChild("sell_to")->getValue().asString()) { diff --git a/indra/newview/skins/default/xui/en/strings.xml b/indra/newview/skins/default/xui/en/strings.xml index 71f48c833d..143a989d32 100644 --- a/indra/newview/skins/default/xui/en/strings.xml +++ b/indra/newview/skins/default/xui/en/strings.xml @@ -2250,6 +2250,9 @@ Returns a string with the requested data about the region mainland teen + + anyone + error -- cgit v1.2.3 From 9a40b84beded2bb0d0d2adb062b1611bdeb756ed Mon Sep 17 00:00:00 2001 From: Jonathan Yap Date: Sat, 25 Jun 2011 16:37:10 -0400 Subject: STORM-1302 (all langs) [TRANSLATED BUT IN ENG] (Spanish) Side Menu > Gente tab > MIS AMIGOS tab > buttons "Call", "Share" and "Teleport" and their tooltips --- doc/contributions.txt | 1 + indra/newview/skins/default/xui/da/panel_people.xml | 8 ++++---- indra/newview/skins/default/xui/de/panel_people.xml | 8 ++++---- indra/newview/skins/default/xui/en/panel_people.xml | 8 ++++---- indra/newview/skins/default/xui/es/panel_people.xml | 8 ++++---- indra/newview/skins/default/xui/fr/panel_people.xml | 8 ++++---- indra/newview/skins/default/xui/it/panel_people.xml | 8 ++++---- indra/newview/skins/default/xui/ja/panel_people.xml | 8 ++++---- indra/newview/skins/default/xui/pl/panel_people.xml | 8 ++++---- indra/newview/skins/default/xui/pt/panel_people.xml | 8 ++++---- indra/newview/skins/default/xui/zh/panel_people.xml | 8 ++++---- 11 files changed, 41 insertions(+), 40 deletions(-) diff --git a/doc/contributions.txt b/doc/contributions.txt index b744f4db3e..cc376df3ea 100644 --- a/doc/contributions.txt +++ b/doc/contributions.txt @@ -446,6 +446,7 @@ Jonathan Yap STORM-1313 STORM-899 STORM-1273 + STORM-1302 Kage Pixel VWR-11 Ken March diff --git a/indra/newview/skins/default/xui/da/panel_people.xml b/indra/newview/skins/default/xui/da/panel_people.xml index 925492b2d7..66a128cd13 100644 --- a/indra/newview/skins/default/xui/da/panel_people.xml +++ b/indra/newview/skins/default/xui/da/panel_people.xml @@ -66,16 +66,16 @@ Leder du efter nogen at være sammen med? Prøv [secondlife:///app/worldmap Verd