From 3892a84cfc1c9f7c99b3d1838b9d574a47b77900 Mon Sep 17 00:00:00 2001 From: Dave Parks Date: Wed, 16 Dec 2009 12:31:24 -0600 Subject: Tracking down stalls in llpumpio and agent updates. --- indra/newview/llappviewer.cpp | 33 ++++++++++++++++++++++++++------- 1 file changed, 26 insertions(+), 7 deletions(-) (limited to 'indra/newview/llappviewer.cpp') diff --git a/indra/newview/llappviewer.cpp b/indra/newview/llappviewer.cpp index 43c8c679c6..6ec4266925 100644 --- a/indra/newview/llappviewer.cpp +++ b/indra/newview/llappviewer.cpp @@ -922,6 +922,11 @@ static LLFastTimer::DeclareTimer FTM_LFS("LFS Thread"); static LLFastTimer::DeclareTimer FTM_PAUSE_THREADS("Pause Threads"); static LLFastTimer::DeclareTimer FTM_IDLE("Idle"); static LLFastTimer::DeclareTimer FTM_PUMP("Pump"); +static LLFastTimer::DeclareTimer FTM_PUMP_ARES("Ares"); +static LLFastTimer::DeclareTimer FTM_PUMP_SERVICE("Service"); +static LLFastTimer::DeclareTimer FTM_SERVICE_CALLBACK("Callback"); +static LLFastTimer::DeclareTimer FTM_AGENT_AUTOPILOT("Autopilot"); +static LLFastTimer::DeclareTimer FTM_AGENT_UPDATE("Update"); bool LLAppViewer::mainLoop() { @@ -1033,10 +1038,20 @@ bool LLAppViewer::mainLoop() LLMemType mt_ip(LLMemType::MTYPE_IDLE_PUMP); pingMainloopTimeout("Main:ServicePump"); LLFastTimer t4(FTM_PUMP); - gAres->process(); - // this pump is necessary to make the login screen show up - gServicePump->pump(); - gServicePump->callback(); + { + LLFastTimer t(FTM_PUMP_ARES); + gAres->process(); + } + { + LLFastTimer t(FTM_PUMP_SERVICE); + // this pump is necessary to make the login screen show up + gServicePump->pump(); + + { + LLFastTimer t(FTM_SERVICE_CALLBACK); + gServicePump->callback(); + } + } } resumeMainloopTimeout(); @@ -3495,9 +3510,12 @@ void LLAppViewer::idle() gAgent.moveYaw(-1.f); } - // Handle automatic walking towards points - gAgentPilot.updateTarget(); - gAgent.autoPilot(&yaw); + { + LLFastTimer t(FTM_AGENT_AUTOPILOT); + // Handle automatic walking towards points + gAgentPilot.updateTarget(); + gAgent.autoPilot(&yaw); + } static LLFrameTimer agent_update_timer; static U32 last_control_flags; @@ -3508,6 +3526,7 @@ void LLAppViewer::idle() if (flags_changed || (agent_update_time > (1.0f / (F32) AGENT_UPDATES_PER_SECOND))) { + LLFastTimer t(FTM_AGENT_UPDATE); // Send avatar and camera info last_control_flags = gAgent.getControlFlags(); send_agent_update(TRUE); -- cgit v1.2.3 From 6abecf1228010d83c2df8d14057950fb51e37320 Mon Sep 17 00:00:00 2001 From: palange Date: Mon, 1 Feb 2010 11:23:30 -0800 Subject: pushing to private repo to move to windows development. --- indra/newview/llappviewer.cpp | 4 ---- 1 file changed, 4 deletions(-) (limited to 'indra/newview/llappviewer.cpp') diff --git a/indra/newview/llappviewer.cpp b/indra/newview/llappviewer.cpp index becc30832d..21d908035f 100644 --- a/indra/newview/llappviewer.cpp +++ b/indra/newview/llappviewer.cpp @@ -324,10 +324,6 @@ const char *VFS_INDEX_FILE_BASE = "index.db2.x."; static std::string gWindowTitle; -std::string gLoginPage; -std::vector gLoginURIs; -static std::string gHelperURI; - LLAppViewer::LLUpdaterInfo *LLAppViewer::sUpdaterInfo = NULL ; void idle_afk_check() -- cgit v1.2.3 From 58f813a136a5a889e01b39e96714af91402321ba Mon Sep 17 00:00:00 2001 From: "Mark Palange (Mani)" Date: Tue, 2 Feb 2010 14:45:42 -0800 Subject: merge --- indra/newview/llappviewer.cpp | 59 ++++++++++++++++++++++++------------------- 1 file changed, 33 insertions(+), 26 deletions(-) (limited to 'indra/newview/llappviewer.cpp') diff --git a/indra/newview/llappviewer.cpp b/indra/newview/llappviewer.cpp index 21d908035f..8507c62d27 100644 --- a/indra/newview/llappviewer.cpp +++ b/indra/newview/llappviewer.cpp @@ -71,7 +71,7 @@ #include "lluicolortable.h" #include "llurldispatcher.h" #include "llurlhistory.h" -#include "llfirstuse.h" +//#include "llfirstuse.h" #include "llrender.h" #include "llteleporthistory.h" #include "lllocationhistory.h" @@ -313,6 +313,7 @@ void init_default_trans_args() { default_trans_args.insert("SECOND_LIFE"); // World default_trans_args.insert("APP_NAME"); + default_trans_args.insert("CAPITALIZED_APP_NAME"); default_trans_args.insert("SECOND_LIFE_GRID"); default_trans_args.insert("SUPPORT_SITE"); } @@ -921,7 +922,6 @@ bool LLAppViewer::mainLoop() { LLMemType mt1(LLMemType::MTYPE_MAIN); mMainloopTimeout = new LLWatchdogTimeout(); - // *FIX:Mani - Make this a setting, once new settings exist in this branch. //------------------------------------------- // Run main loop until time to quit @@ -931,12 +931,13 @@ bool LLAppViewer::mainLoop() gServicePump = new LLPumpIO(gAPRPoolp); LLHTTPClient::setPump(*gServicePump); LLCurl::setCAFile(gDirUtilp->getCAFile()); + LLCurl::setSSLVerify(! gSavedSettings.getBOOL("NoVerifySSLCert")); // Note: this is where gLocalSpeakerMgr and gActiveSpeakerMgr used to be instantiated. LLVoiceChannel::initClass(); LLVoiceClient::init(gServicePump); - + LLTimer frameTimer,idleTimer; LLTimer debugTime; LLViewerJoystick* joystick(LLViewerJoystick::getInstance()); @@ -1371,7 +1372,7 @@ bool LLAppViewer::cleanup() if( gViewerWindow) gViewerWindow->shutdownViews(); - llinfos << "Cleaning up Inevntory" << llendflush; + llinfos << "Cleaning up Inventory" << llendflush; // Cleanup Inventory after the UI since it will delete any remaining observers // (Deleted observers should have already removed themselves) @@ -1473,10 +1474,17 @@ bool LLAppViewer::cleanup() LLUIColorTable::instance().saveUserSettings(); - // PerAccountSettingsFile should be empty if no use has been logged on. + // PerAccountSettingsFile should be empty if no user has been logged on. // *FIX:Mani This should get really saved in a "logoff" mode. - gSavedPerAccountSettings.saveToFile(gSavedSettings.getString("PerAccountSettingsFile"), TRUE); - llinfos << "Saved settings" << llendflush; + if (gSavedSettings.getString("PerAccountSettingsFile").empty()) + { + llinfos << "Not saving per-account settings; don't know the account name yet." << llendl; + } + else + { + gSavedPerAccountSettings.saveToFile(gSavedSettings.getString("PerAccountSettingsFile"), TRUE); + llinfos << "Saved settings" << llendflush; + } std::string crash_settings_filename = gDirUtilp->getExpandedFilename(LL_PATH_USER_SETTINGS, CRASH_SETTINGS_FILE); // save all settings, even if equals defaults @@ -1910,26 +1918,25 @@ bool LLAppViewer::initConfiguration() // These are warnings that appear on the first experience of that condition. // They are already set in the settings_default.xml file, but still need to be added to LLFirstUse // for disable/reset ability - LLFirstUse::addConfigVariable("FirstBalanceIncrease"); - LLFirstUse::addConfigVariable("FirstBalanceDecrease"); - LLFirstUse::addConfigVariable("FirstSit"); - LLFirstUse::addConfigVariable("FirstMap"); - LLFirstUse::addConfigVariable("FirstGoTo"); - LLFirstUse::addConfigVariable("FirstBuild"); +// LLFirstUse::addConfigVariable("FirstBalanceIncrease"); +// LLFirstUse::addConfigVariable("FirstBalanceDecrease"); +// LLFirstUse::addConfigVariable("FirstSit"); +// LLFirstUse::addConfigVariable("FirstMap"); +// LLFirstUse::addConfigVariable("FirstGoTo"); +// LLFirstUse::addConfigVariable("FirstBuild"); // LLFirstUse::addConfigVariable("FirstLeftClickNoHit"); - LLFirstUse::addConfigVariable("FirstTeleport"); - LLFirstUse::addConfigVariable("FirstOverrideKeys"); - LLFirstUse::addConfigVariable("FirstAttach"); - LLFirstUse::addConfigVariable("FirstAppearance"); - LLFirstUse::addConfigVariable("FirstInventory"); - LLFirstUse::addConfigVariable("FirstSandbox"); - LLFirstUse::addConfigVariable("FirstFlexible"); - LLFirstUse::addConfigVariable("FirstDebugMenus"); - LLFirstUse::addConfigVariable("FirstStreamingMusic"); - LLFirstUse::addConfigVariable("FirstStreamingVideo"); - LLFirstUse::addConfigVariable("FirstSculptedPrim"); - LLFirstUse::addConfigVariable("FirstVoice"); - LLFirstUse::addConfigVariable("FirstMedia"); +// LLFirstUse::addConfigVariable("FirstTeleport"); +// LLFirstUse::addConfigVariable("FirstOverrideKeys"); +// LLFirstUse::addConfigVariable("FirstAttach"); +// LLFirstUse::addConfigVariable("FirstAppearance"); +// LLFirstUse::addConfigVariable("FirstInventory"); +// LLFirstUse::addConfigVariable("FirstSandbox"); +// LLFirstUse::addConfigVariable("FirstFlexible"); +// LLFirstUse::addConfigVariable("FirstDebugMenus"); +// LLFirstUse::addConfigVariable("FirstStreamingMedia"); +// LLFirstUse::addConfigVariable("FirstSculptedPrim"); +// LLFirstUse::addConfigVariable("FirstVoice"); +// LLFirstUse::addConfigVariable("FirstMedia"); // - read command line settings. LLControlGroupCLP clp; -- cgit v1.2.3 From 658ccc3e85487f9f24ff3b5926e60d6cce7f42e0 Mon Sep 17 00:00:00 2001 From: Roxie Linden Date: Wed, 7 Apr 2010 11:08:04 -0700 Subject: Re-insert backed out SLE checkin so we can fix it --- indra/newview/llappviewer.cpp | 124 +++++++++++++----------------------------- 1 file changed, 37 insertions(+), 87 deletions(-) (limited to 'indra/newview/llappviewer.cpp') diff --git a/indra/newview/llappviewer.cpp b/indra/newview/llappviewer.cpp index 43c8c679c6..2a355474b1 100644 --- a/indra/newview/llappviewer.cpp +++ b/indra/newview/llappviewer.cpp @@ -153,7 +153,7 @@ #include "llworld.h" #include "llhudeffecttrail.h" #include "llvectorperfoptions.h" -#include "llurlsimstring.h" +#include "llslurl.h" #include "llwatchdog.h" // Included so that constants/settings might be initialized @@ -193,6 +193,9 @@ #include "llparcel.h" #include "llavatariconctrl.h" +// Include for security api initialization +#include "llsecapi.h" + // *FIX: These extern globals should be cleaned up. // The globals either represent state/config/resource-storage of either // this app, or another 'component' of the viewer. App globals should be @@ -507,35 +510,6 @@ public: } }; -void LLAppViewer::initGridChoice() -{ - // Load up the initial grid choice from: - // - hard coded defaults... - // - command line settings... - // - if dev build, persisted settings... - - // Set the "grid choice", this is specified by command line. - std::string grid_choice = gSavedSettings.getString("CmdLineGridChoice"); - LLViewerLogin::getInstance()->setGridChoice(grid_choice); - - // Load last server choice by default - // ignored if the command line grid choice has been set - if(grid_choice.empty()) - { - S32 server = gSavedSettings.getS32("ServerChoice"); - server = llclamp(server, 0, (S32)GRID_INFO_COUNT - 1); - if(server == GRID_INFO_OTHER) - { - std::string custom_server = gSavedSettings.getString("CustomServer"); - LLViewerLogin::getInstance()->setGridChoice(custom_server); - } - else if(server != (S32)GRID_INFO_NONE) - { - LLViewerLogin::getInstance()->setGridChoice((EGridInfo)server); - } - } -} - //virtual bool LLAppViewer::initSLURLHandler() { @@ -647,7 +621,6 @@ bool LLAppViewer::init() LLCurl::initClass(); initThreads(); - writeSystemInfo(); // Build a string representing the current version number. @@ -777,10 +750,6 @@ bool LLAppViewer::init() return false; } - // Always fetch the Ethernet MAC address, needed both for login - // and password load. - LLUUID::getNodeID(gMACAddress); - // Prepare for out-of-memory situations, during which we will crash on // purpose and save a dump. #if LL_WINDOWS && LL_RELEASE_FOR_DOWNLOAD && LL_USE_SMARTHEAP @@ -892,6 +861,7 @@ bool LLAppViewer::init() } } + // save the graphics card gDebugInfo["GraphicsCard"] = LLFeatureManager::getInstance()->getGPUString(); @@ -902,6 +872,17 @@ bool LLAppViewer::init() gSimFrames = (F32)gFrameCount; LLViewerJoystick::getInstance()->init(false); + + try { + initializeSecHandler(); + } + catch (LLProtectedDataException ex) + { + LLNotificationsUtil::add("CorruptedProtectedDataStore"); + } + LLHTTPClient::setCertVerifyCallback(secapiSSLCertVerifyCallback); + + gGLActive = FALSE; if (gSavedSettings.getBOOL("QAMode") && gSavedSettings.getS32("QAModeEventHostPort") > 0) { @@ -936,13 +917,11 @@ bool LLAppViewer::mainLoop() gServicePump = new LLPumpIO(gAPRPoolp); LLHTTPClient::setPump(*gServicePump); LLCurl::setCAFile(gDirUtilp->getCAFile()); - LLCurl::setSSLVerify(! gSavedSettings.getBOOL("NoVerifySSLCert")); - + // Note: this is where gLocalSpeakerMgr and gActiveSpeakerMgr used to be instantiated. LLVoiceChannel::initClass(); - LLVoiceClient::init(gServicePump); - + LLVoiceClient::getInstance()->init(gServicePump); LLTimer frameTimer,idleTimer; LLTimer debugTime; LLViewerJoystick* joystick(LLViewerJoystick::getInstance()); @@ -1273,7 +1252,7 @@ bool LLAppViewer::cleanup() // to ensure shutdown order LLMortician::setZealous(TRUE); - LLVoiceClient::terminate(); + LLVoiceClient::getInstance()->terminate(); disconnectViewer(); @@ -1472,13 +1451,6 @@ bool LLAppViewer::cleanup() llinfos << "Saving Data" << llendflush; - // Quitting with "Remember Password" turned off should always stomp your - // saved password, whether or not you successfully logged in. JC - if (!gSavedSettings.getBOOL("RememberPassword")) - { - LLStartUp::deletePasswordFromDisk(); - } - // Store the time of our current logoff gSavedPerAccountSettings.setU32("LastLogoff", time_corrected()); @@ -2047,7 +2019,6 @@ bool LLAppViewer::initConfiguration() } } - initGridChoice(); // If we have specified crash on startup, set the global so we'll trigger the crash at the right time if(clp.hasOption("crashonstartup")) @@ -2141,30 +2112,17 @@ bool LLAppViewer::initConfiguration() // injection and steal passwords. Phoenix. SL-55321 if(clp.hasOption("url")) { - std::string slurl = clp.getOption("url")[0]; - if (LLSLURL::isSLURLCommand(slurl)) - { - LLStartUp::sSLURLCommand = slurl; - } - else - { - LLURLSimString::setString(slurl); - } + LLStartUp::setStartSLURL(LLSLURL(clp.getOption("url")[0])); + if(LLStartUp::getStartSLURL().getType() == LLSLURL::LOCATION) + { + LLGridManager::getInstance()->setGridChoice(LLStartUp::getStartSLURL().getGrid()); + + } } else if(clp.hasOption("slurl")) { - std::string slurl = clp.getOption("slurl")[0]; - if(LLSLURL::isSLURL(slurl)) - { - if (LLSLURL::isSLURLCommand(slurl)) - { - LLStartUp::sSLURLCommand = slurl; - } - else - { - LLURLSimString::setString(slurl); - } - } + LLSLURL start_slurl(clp.getOption("slurl")[0]); + LLStartUp::setStartSLURL(start_slurl); } const LLControlVariable* skinfolder = gSavedSettings.getControl("SkinCurrent"); @@ -2245,18 +2203,10 @@ bool LLAppViewer::initConfiguration() // don't call anotherInstanceRunning() when doing URL handoff, as // it relies on checking a marker file which will not work when running // out of different directories - std::string slurl; - if (!LLStartUp::sSLURLCommand.empty()) - { - slurl = LLStartUp::sSLURLCommand; - } - else if (LLURLSimString::parse()) - { - slurl = LLURLSimString::getURL(); - } - if (!slurl.empty()) + + if (LLStartUp::getStartSLURL().isValid()) { - if (sendURLToOtherInstance(slurl)) + if (sendURLToOtherInstance(LLStartUp::getStartSLURL().getSLURLString())) { // successfully handed off URL to existing instance, exit return false; @@ -2312,9 +2262,9 @@ bool LLAppViewer::initConfiguration() // need to do this here - need to have initialized global settings first std::string nextLoginLocation = gSavedSettings.getString( "NextLoginLocation" ); - if ( nextLoginLocation.length() ) + if ( !nextLoginLocation.empty() ) { - LLURLSimString::setString( nextLoginLocation ); + LLStartUp::setStartSLURL(LLSLURL(nextLoginLocation)); }; gLastRunVersion = gSavedSettings.getString("LastRunVersion"); @@ -2535,7 +2485,7 @@ void LLAppViewer::writeSystemInfo() // The user is not logged on yet, but record the current grid choice login url // which may have been the intended grid. This can b - gDebugInfo["GridName"] = LLViewerLogin::getInstance()->getGridLabel(); + gDebugInfo["GridName"] = LLGridManager::getInstance()->getGridLabel(); // *FIX:Mani - move this ddown in llappviewerwin32 #ifdef LL_WINDOWS @@ -3886,7 +3836,7 @@ void LLAppViewer::sendLogoutRequest() gLogoutMaxTime = LOGOUT_REQUEST_TIME; mLogoutRequestSent = TRUE; - gVoiceClient->leaveChannel(); + LLVoiceClient::getInstance()->leaveChannel(); //Set internal status variables and marker files gLogoutInProgress = TRUE; @@ -4306,7 +4256,7 @@ void LLAppViewer::launchUpdater() #endif // *TODO change userserver to be grid on both viewer and sim, since // userserver no longer exists. - query_map["userserver"] = LLViewerLogin::getInstance()->getGridLabel(); + query_map["userserver"] = LLGridManager::getInstance()->getGridLabel(); query_map["channel"] = gSavedSettings.getString("VersionChannelName"); // *TODO constantize this guy // *NOTE: This URL is also used in win_setup/lldownloader.cpp @@ -4319,10 +4269,10 @@ void LLAppViewer::launchUpdater() LLAppViewer::sUpdaterInfo = new LLAppViewer::LLUpdaterInfo() ; // if a sim name was passed in via command line parameter (typically through a SLURL) - if ( LLURLSimString::sInstance.mSimString.length() ) + if ( LLStartUp::getStartSLURL().getType() == LLSLURL::LOCATION ) { // record the location to start at next time - gSavedSettings.setString( "NextLoginLocation", LLURLSimString::sInstance.mSimString ); + gSavedSettings.setString( "NextLoginLocation", LLStartUp::getStartSLURL().getSLURLString()); }; #if LL_WINDOWS -- cgit v1.2.3 From 063a7a531a66ad1d83e644217a9488682d94b231 Mon Sep 17 00:00:00 2001 From: "Brad Payne (Vir Linden)" Date: Fri, 23 Apr 2010 16:00:12 -0400 Subject: Improved default animations - work in progress --- indra/newview/llappviewer.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'indra/newview/llappviewer.cpp') diff --git a/indra/newview/llappviewer.cpp b/indra/newview/llappviewer.cpp index 2f9bbb1407..b78d968e0e 100644 --- a/indra/newview/llappviewer.cpp +++ b/indra/newview/llappviewer.cpp @@ -3243,11 +3243,11 @@ bool LLAppViewer::initCache() { LLVFile::initClass(); - //llinfos << "Static VFS listing" << llendl; - //gStaticVFS->listFiles(); + llinfos << "======= Static VFS listing ========" << llendl; + gStaticVFS->listFiles(); - //llinfos << "regular VFS listing" << llendl; - //gVFS->listFiles(); + llinfos << "========= regular VFS listing =====" << llendl; + gVFS->listFiles(); return true; } -- cgit v1.2.3 From 9e5fe84c9e6f6027878d70350c8f60e4c2be7e48 Mon Sep 17 00:00:00 2001 From: "Brad Payne (Vir Linden)" Date: Fri, 7 May 2010 15:10:50 -0400 Subject: For EXT-6953: Evaluate and implement Richard's improved default animations. Cleanup and log spam reduction. --- indra/newview/llappviewer.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'indra/newview/llappviewer.cpp') diff --git a/indra/newview/llappviewer.cpp b/indra/newview/llappviewer.cpp index b78d968e0e..c013831c83 100644 --- a/indra/newview/llappviewer.cpp +++ b/indra/newview/llappviewer.cpp @@ -3243,11 +3243,11 @@ bool LLAppViewer::initCache() { LLVFile::initClass(); - llinfos << "======= Static VFS listing ========" << llendl; - gStaticVFS->listFiles(); + //llinfos << "======= Static VFS listing ========" << llendl; + //gStaticVFS->listFiles(); - llinfos << "========= regular VFS listing =====" << llendl; - gVFS->listFiles(); + //llinfos << "========= regular VFS listing =====" << llendl; + //gVFS->listFiles(); return true; } -- cgit v1.2.3 From e319e13a9759e758791d0aecab7f7b72d58a9a7b Mon Sep 17 00:00:00 2001 From: "Brad Payne (Vir Linden)" Date: Tue, 18 May 2010 21:06:45 -0400 Subject: EXT-6953 WIP - cache dumping option to help with updating static vfs cache with new contents --- indra/newview/llappviewer.cpp | 46 ++++++++++++++++++++++++++++++++++++++----- 1 file changed, 41 insertions(+), 5 deletions(-) (limited to 'indra/newview/llappviewer.cpp') diff --git a/indra/newview/llappviewer.cpp b/indra/newview/llappviewer.cpp index 82b6f1286f..d7632e69e8 100644 --- a/indra/newview/llappviewer.cpp +++ b/indra/newview/llappviewer.cpp @@ -2979,6 +2979,42 @@ S32 LLAppViewer::getCacheVersion() return cache_version ; } +void dumpVFSCaches() +{ + llinfos << "======= Dumping Static VFS ========" << llendl; + gStaticVFS->listFiles(); +#if LL_WINDOWS + WCHAR w_str[MAX_PATH]; + GetCurrentDirectory(MAX_PATH, w_str); + S32 res = LLFile::mkdir("StaticVFSDump"); + if (res == -1) + { + if (errno != EEXIST) + { + llwarns << "Couldn't create StaticVFSDump" << llendl; + } + } + SetCurrentDirectory(utf8str_to_utf16str("StaticVFSDump").c_str()); + gStaticVFS->dumpFiles(); + SetCurrentDirectory(w_str); +#endif + + llinfos << "========= Dumping regular VFS ====" << llendl; + gVFS->listFiles(); +#if LL_WINDOWS + res = LLFile::mkdir("VFSDump"); + if (res == -1) + { + if (errno != EEXIST) + { + llwarns << "Couldn't create VFSDump" << llendl; + } + } + SetCurrentDirectory(utf8str_to_utf16str("VFSDump").c_str()); + gVFS->dumpFiles(); + SetCurrentDirectory(w_str); +#endif +} bool LLAppViewer::initCache() { mPurgeCache = false; @@ -3196,11 +3232,11 @@ bool LLAppViewer::initCache() { LLVFile::initClass(); - //llinfos << "======= Static VFS listing ========" << llendl; - //gStaticVFS->listFiles(); - - //llinfos << "========= regular VFS listing =====" << llendl; - //gVFS->listFiles(); + if (gSavedSettings.getBOOL("DumpVFSCaches")) + { + dumpVFSCaches(); + + } return true; } -- cgit v1.2.3 From 719edddf0498752a0295502d62710823d1a72cc7 Mon Sep 17 00:00:00 2001 From: "Andrew A. de Laix" Date: Fri, 21 May 2010 09:38:29 -0700 Subject: Switch Darwin to use breakpad minidump rather than os generated crash stack. --- indra/newview/llappviewer.cpp | 2 ++ 1 file changed, 2 insertions(+) (limited to 'indra/newview/llappviewer.cpp') diff --git a/indra/newview/llappviewer.cpp b/indra/newview/llappviewer.cpp index f7f7cb599e..56486c788b 100644 --- a/indra/newview/llappviewer.cpp +++ b/indra/newview/llappviewer.cpp @@ -2587,6 +2587,8 @@ void LLAppViewer::handleViewerCrash() gDebugInfo["FirstLogin"] = (LLSD::Boolean) gAgent.isFirstLogin(); gDebugInfo["FirstRunThisInstall"] = gSavedSettings.getBOOL("FirstRunThisInstall"); + if(pApp->minidump_path[0] != 0) gDebugInfo["MinidumpPath"] = pApp->minidump_path; + if(gLogoutInProgress) { gDebugInfo["LastExecEvent"] = LAST_EXEC_LOGOUT_CRASH; -- cgit v1.2.3 From f24c312f8369fbc6ec4eb0607e7e8ea636aacb82 Mon Sep 17 00:00:00 2001 From: "Andrew A. de Laix" Date: Mon, 24 May 2010 15:59:26 -0700 Subject: so long llwindebug, we hardly knew ye. --- indra/newview/llappviewer.cpp | 5 ----- 1 file changed, 5 deletions(-) (limited to 'indra/newview/llappviewer.cpp') diff --git a/indra/newview/llappviewer.cpp b/indra/newview/llappviewer.cpp index 56486c788b..e9ec0b8b77 100644 --- a/indra/newview/llappviewer.cpp +++ b/indra/newview/llappviewer.cpp @@ -104,7 +104,6 @@ #include #if LL_WINDOWS - #include "llwindebug.h" # include // For _SH_DENYWR in initMarkerFile #else # include // For initMarkerFile support @@ -3288,10 +3287,6 @@ void LLAppViewer::badNetworkHandler() mPurgeOnExit = TRUE; -#if LL_WINDOWS - // Generates the minidump. - LLWinDebug::generateCrashStacks(NULL); -#endif LLAppViewer::handleSyncViewerCrash(); LLAppViewer::handleViewerCrash(); -- cgit v1.2.3 From 5a52c5eb8a5cc4e1215911bac9121891dd802d45 Mon Sep 17 00:00:00 2001 From: "Andrew A. de Laix" Date: Tue, 25 May 2010 13:32:12 -0700 Subject: Mac crash behavior matches windows and linux: report on crash (not after restart). This is OK because we use Breakpad generated minidumps instead of OS generated ones. --- indra/newview/llappviewer.cpp | 26 ++++---------------------- 1 file changed, 4 insertions(+), 22 deletions(-) (limited to 'indra/newview/llappviewer.cpp') diff --git a/indra/newview/llappviewer.cpp b/indra/newview/llappviewer.cpp index e9ec0b8b77..418b587321 100644 --- a/indra/newview/llappviewer.cpp +++ b/indra/newview/llappviewer.cpp @@ -102,6 +102,8 @@ // Third party library includes #include +#include + #if LL_WINDOWS # include // For _SH_DENYWR in initMarkerFile @@ -2281,17 +2283,7 @@ void LLAppViewer::checkForCrash(void) { #if LL_SEND_CRASH_REPORTS - //*NOTE:Mani The current state of the crash handler has the MacOSX - // sending all crash reports as freezes, in order to let - // the MacOSX CrashRepoter generate stacks before spawning the - // SL crash logger. - // The Linux and Windows clients generate their own stacks and - // spawn the SL crash logger immediately. This may change in the future. -#if LL_DARWIN - if(gLastExecEvent != LAST_EXEC_NORMAL) -#else if (gLastExecEvent == LAST_EXEC_FROZE) -#endif { llinfos << "Last execution froze, requesting to send crash report." << llendl; // @@ -2552,9 +2544,6 @@ void LLAppViewer::handleViewerCrash() return; } pApp->mReportedCrash = TRUE; - - // Make sure the watchdog gets turned off... -// pApp->destroyMainloopTimeout(); // SJB: Bah. This causes the crash handler to hang, not sure why. //We already do this in writeSystemInfo(), but we do it again here to make /sure/ we have a version //to check against no matter what @@ -2665,10 +2654,6 @@ void LLAppViewer::handleViewerCrash() LLError::logToFile(""); -// On Mac, we send the report on the next run, since we need macs crash report -// for a stack trace, so we have to let it the app fail. -#if !LL_DARWIN - // Remove the marker file, since otherwise we'll spawn a process that'll keep it locked if(gDebugInfo["LastExecEvent"].asInteger() == LAST_EXEC_LOGOUT_CRASH) { @@ -2681,8 +2666,6 @@ void LLAppViewer::handleViewerCrash() // Call to pure virtual, handled by platform specific llappviewer instance. pApp->handleCrashReporting(); - -#endif //!LL_DARWIN return; } @@ -3287,9 +3270,6 @@ void LLAppViewer::badNetworkHandler() mPurgeOnExit = TRUE; - LLAppViewer::handleSyncViewerCrash(); - LLAppViewer::handleViewerCrash(); - std::ostringstream message; message << "The viewer has detected mangled network data indicative\n" @@ -3302,6 +3282,8 @@ void LLAppViewer::badNetworkHandler() "If the problem continues, see the Tech Support FAQ at: \n" "www.secondlife.com/support"; forceDisconnect(message.str()); + + LLApp::instance()->getExceptionHandler()->WriteMinidump(); } // This routine may get called more than once during the shutdown process. -- cgit v1.2.3 From 6a39149fec72e3a105d7a47b8a9f5aa2a0bfba87 Mon Sep 17 00:00:00 2001 From: "Andrew A. de Laix" Date: Tue, 25 May 2010 15:08:36 -0700 Subject: Added configuration setting to send crash reports to configured url rather than through the grid. --- indra/newview/llappviewer.cpp | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'indra/newview/llappviewer.cpp') diff --git a/indra/newview/llappviewer.cpp b/indra/newview/llappviewer.cpp index 418b587321..7cdd8ca309 100644 --- a/indra/newview/llappviewer.cpp +++ b/indra/newview/llappviewer.cpp @@ -2545,6 +2545,13 @@ void LLAppViewer::handleViewerCrash() } pApp->mReportedCrash = TRUE; + // Insert crash host url (url to post crash log to) if configured. + std::string crashHostUrl = gSavedSettings.get("CrashHostUrl"); + if(crashHostUrl != "") + { + gDebugInfo["CrashHostUrl"] = crashHostUrl; + } + //We already do this in writeSystemInfo(), but we do it again here to make /sure/ we have a version //to check against no matter what gDebugInfo["ClientInfo"]["Name"] = gSavedSettings.getString("VersionChannelName"); -- cgit v1.2.3 From a63b6dd93c1ef78e647dbd221a5a3b14ff363102 Mon Sep 17 00:00:00 2001 From: Lynx Linden Date: Wed, 26 May 2010 14:43:27 +0100 Subject: Hooked up Google Breakpad for the Linux client too. Using Alain's Darwin reporter callback was all that was needed. Also replaced the call that exposed the breakpad exception class with a call to just write out the minidump, as that was the only reason for exposing it. Now clients don't need to know about Google Breakpad. --- indra/newview/llappviewer.cpp | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) (limited to 'indra/newview/llappviewer.cpp') diff --git a/indra/newview/llappviewer.cpp b/indra/newview/llappviewer.cpp index 7cdd8ca309..0484659793 100644 --- a/indra/newview/llappviewer.cpp +++ b/indra/newview/llappviewer.cpp @@ -102,7 +102,6 @@ // Third party library includes #include -#include #if LL_WINDOWS @@ -2582,7 +2581,10 @@ void LLAppViewer::handleViewerCrash() gDebugInfo["FirstLogin"] = (LLSD::Boolean) gAgent.isFirstLogin(); gDebugInfo["FirstRunThisInstall"] = gSavedSettings.getBOOL("FirstRunThisInstall"); - if(pApp->minidump_path[0] != 0) gDebugInfo["MinidumpPath"] = pApp->minidump_path; + if(pApp->minidump_path[0] != 0) + { + gDebugInfo["MinidumpPath"] = pApp->minidump_path; + } if(gLogoutInProgress) { @@ -3290,7 +3292,7 @@ void LLAppViewer::badNetworkHandler() "www.secondlife.com/support"; forceDisconnect(message.str()); - LLApp::instance()->getExceptionHandler()->WriteMinidump(); + LLApp::instance()->writeMiniDump(); } // This routine may get called more than once during the shutdown process. -- cgit v1.2.3 From cca5aa48ae07a2d0e4f4a26e647b360c098cd831 Mon Sep 17 00:00:00 2001 From: karina Date: Wed, 26 May 2010 23:46:42 -0700 Subject: Add new mechanism for getting a unique machine id. --- indra/newview/llappviewer.cpp | 2 ++ 1 file changed, 2 insertions(+) (limited to 'indra/newview/llappviewer.cpp') diff --git a/indra/newview/llappviewer.cpp b/indra/newview/llappviewer.cpp index f7f7cb599e..5756eade87 100644 --- a/indra/newview/llappviewer.cpp +++ b/indra/newview/llappviewer.cpp @@ -195,6 +195,7 @@ // Include for security api initialization #include "llsecapi.h" +#include "llmachineid.h" // *FIX: These extern globals should be cleaned up. // The globals either represent state/config/resource-storage of either @@ -619,6 +620,7 @@ bool LLAppViewer::init() // *NOTE:Mani - LLCurl::initClass is not thread safe. // Called before threads are created. LLCurl::initClass(); + LLMachineID::init(); initThreads(); writeSystemInfo(); -- cgit v1.2.3 From 05761d785335f08dc176aa6ebb7f0cd45d1298ab Mon Sep 17 00:00:00 2001 From: Lynx Linden Date: Thu, 27 May 2010 15:04:06 +0100 Subject: Removed the SyncErrorHandler from llapp and llappviewer*. This was only used for the Linux client to dump a stack trace to stack_trace.log, which is no longer needed now that we are using Google Breakpad. I also removed all of the stack printing code from llappviewerlinux.cpp. --- indra/newview/llappviewer.cpp | 7 ------- 1 file changed, 7 deletions(-) (limited to 'indra/newview/llappviewer.cpp') diff --git a/indra/newview/llappviewer.cpp b/indra/newview/llappviewer.cpp index 0484659793..1ad180a024 100644 --- a/indra/newview/llappviewer.cpp +++ b/indra/newview/llappviewer.cpp @@ -2513,13 +2513,6 @@ void LLAppViewer::writeSystemInfo() writeDebugInfo(); // Save out debug_info.log early, in case of crash. } -void LLAppViewer::handleSyncViewerCrash() -{ - LLAppViewer* pApp = LLAppViewer::instance(); - // Call to pure virtual, handled by platform specific llappviewer instance. - pApp->handleSyncCrashTrace(); -} - void LLAppViewer::handleViewerCrash() { llinfos << "Handle viewer crash entry." << llendl; -- cgit v1.2.3 From aa9c621cb90de75e919f36ba0f6db9d8bd447601 Mon Sep 17 00:00:00 2001 From: "Brad Payne (Vir Linden)" Date: Thu, 27 May 2010 15:19:26 -0400 Subject: EXT-6953 WIP - cleanup --- indra/newview/llappviewer.cpp | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) (limited to 'indra/newview/llappviewer.cpp') diff --git a/indra/newview/llappviewer.cpp b/indra/newview/llappviewer.cpp index d7632e69e8..475a075d7e 100644 --- a/indra/newview/llappviewer.cpp +++ b/indra/newview/llappviewer.cpp @@ -2981,9 +2981,10 @@ S32 LLAppViewer::getCacheVersion() void dumpVFSCaches() { - llinfos << "======= Dumping Static VFS ========" << llendl; + llinfos << "======= Static VFS ========" << llendl; gStaticVFS->listFiles(); #if LL_WINDOWS + llinfos << "======= Dumping static VFS to StaticVFSDump ========" << llendl; WCHAR w_str[MAX_PATH]; GetCurrentDirectory(MAX_PATH, w_str); S32 res = LLFile::mkdir("StaticVFSDump"); @@ -2991,7 +2992,7 @@ void dumpVFSCaches() { if (errno != EEXIST) { - llwarns << "Couldn't create StaticVFSDump" << llendl; + llwarns << "Couldn't create dir StaticVFSDump" << llendl; } } SetCurrentDirectory(utf8str_to_utf16str("StaticVFSDump").c_str()); @@ -2999,15 +3000,16 @@ void dumpVFSCaches() SetCurrentDirectory(w_str); #endif - llinfos << "========= Dumping regular VFS ====" << llendl; + llinfos << "========= Dynamic VFS ====" << llendl; gVFS->listFiles(); #if LL_WINDOWS + llinfos << "========= Dumping dynamic VFS to VFSDump ====" << llendl; res = LLFile::mkdir("VFSDump"); if (res == -1) { if (errno != EEXIST) { - llwarns << "Couldn't create VFSDump" << llendl; + llwarns << "Couldn't create dir VFSDump" << llendl; } } SetCurrentDirectory(utf8str_to_utf16str("VFSDump").c_str()); @@ -3232,11 +3234,12 @@ bool LLAppViewer::initCache() { LLVFile::initClass(); +#ifndef LL_RELEASE_FOR_DOWNLOAD if (gSavedSettings.getBOOL("DumpVFSCaches")) { dumpVFSCaches(); - } +#endif return true; } -- cgit v1.2.3 From 4fb77380279bdf853b7f213ba8997511720468dd Mon Sep 17 00:00:00 2001 From: Lynx Linden Date: Fri, 28 May 2010 15:10:52 +0100 Subject: Write breakpad minidump files to the SL log directory. Also, clean out old minidump files when we start up. --- indra/newview/llappviewer.cpp | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) (limited to 'indra/newview/llappviewer.cpp') diff --git a/indra/newview/llappviewer.cpp b/indra/newview/llappviewer.cpp index 00a2678a9a..3528deb9e0 100644 --- a/indra/newview/llappviewer.cpp +++ b/indra/newview/llappviewer.cpp @@ -602,6 +602,14 @@ bool LLAppViewer::init() if (!initConfiguration()) return false; + // write Google Breakpad minidump files to our log directory + std::string logdir = gDirUtilp->getExpandedFilename(LL_PATH_LOGS, ""); + logdir += gDirUtilp->getDirDelimiter(); + setMiniDumpDir(logdir); + + // remove any old minidump files from the log directory + gDirUtilp->deleteFilesInDir(logdir, "*-*-*-*-*.dmp"); + // Although initLogging() is the right place to mess with // setFatalFunction(), we can't query gSavedSettings until after // initConfiguration(). @@ -2574,9 +2582,10 @@ void LLAppViewer::handleViewerCrash() gDebugInfo["FirstLogin"] = (LLSD::Boolean) gAgent.isFirstLogin(); gDebugInfo["FirstRunThisInstall"] = gSavedSettings.getBOOL("FirstRunThisInstall"); - if(pApp->minidump_path[0] != 0) + char *minidump_file = pApp->getMiniDumpFilename(); + if(minidump_file && minidump_file[0] != 0) { - gDebugInfo["MinidumpPath"] = pApp->minidump_path; + gDebugInfo["MinidumpPath"] = minidump_file; } if(gLogoutInProgress) -- cgit v1.2.3 From 05626c3371395d76b1f2e6b7fcbe64ef12f7d974 Mon Sep 17 00:00:00 2001 From: Yuri Chebotarev Date: Fri, 28 May 2010 20:13:18 +0300 Subject: EXT-7013 FIX time formatting function didn't work for some parameters for Japanise (like weekdays). reviewed by Vadim Savchuk https://codereview.productengine.com/secondlife/r/457/ --HG-- branch : product-engine --- indra/newview/llappviewer.cpp | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) (limited to 'indra/newview/llappviewer.cpp') diff --git a/indra/newview/llappviewer.cpp b/indra/newview/llappviewer.cpp index f7f7cb599e..7b17933b5c 100644 --- a/indra/newview/llappviewer.cpp +++ b/indra/newview/llappviewer.cpp @@ -890,7 +890,16 @@ bool LLAppViewer::init() } LLViewerMedia::initClass(); - + + LLStringOps::setupWeekDaysNames(LLTrans::getString("dateTimeWeekdaysNames")); + LLStringOps::setupWeekDaysShortNames(LLTrans::getString("dateTimeWeekdaysShortNames")); + LLStringOps::setupMonthNames(LLTrans::getString("dateTimeMonthNames")); + LLStringOps::setupMonthShortNames(LLTrans::getString("dateTimeMonthShortNames")); + LLStringOps::setupDayFormat(LLTrans::getString("dateTimeDayFormat")); + + LLStringOps::sAM = LLTrans::getString("dateTimeAM"); + LLStringOps::sPM = LLTrans::getString("dateTimePM"); + return true; } -- cgit v1.2.3 From d71ea5ffd94ed1dc1b6ad6f4b57fc2e11dfc7a23 Mon Sep 17 00:00:00 2001 From: Lynx Linden Date: Fri, 28 May 2010 22:14:06 +0100 Subject: Remove old minidump files on a clean exit, not on startup. --- indra/newview/llappviewer.cpp | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) (limited to 'indra/newview/llappviewer.cpp') diff --git a/indra/newview/llappviewer.cpp b/indra/newview/llappviewer.cpp index 3528deb9e0..5f2e16ef12 100644 --- a/indra/newview/llappviewer.cpp +++ b/indra/newview/llappviewer.cpp @@ -607,9 +607,6 @@ bool LLAppViewer::init() logdir += gDirUtilp->getDirDelimiter(); setMiniDumpDir(logdir); - // remove any old minidump files from the log directory - gDirUtilp->deleteFilesInDir(logdir, "*-*-*-*-*.dmp"); - // Although initLogging() is the right place to mess with // setFatalFunction(), we can't query gSavedSettings until after // initConfiguration(). @@ -1234,6 +1231,14 @@ bool LLAppViewer::cleanup() // workaround for DEV-35406 crash on shutdown LLEventPumps::instance().reset(); + // remove any old breakpad minidump files from the log directory + if (! isError()) + { + std::string logdir = gDirUtilp->getExpandedFilename(LL_PATH_LOGS, ""); + logdir += gDirUtilp->getDirDelimiter(); + gDirUtilp->deleteFilesInDir(logdir, "*-*-*-*-*.dmp"); + } + // *TODO - generalize this and move DSO wrangling to a helper class -brad std::set::const_iterator i; for(i = mPlugins.begin(); i != mPlugins.end(); ++i) -- cgit v1.2.3 From 8990498b420ba7083aa35c3eb08d87ebcd2a29a4 Mon Sep 17 00:00:00 2001 From: "Andrew A. de Laix" Date: Wed, 2 Jun 2010 11:03:03 -0700 Subject: Crash logger renames log flies to safe names so they don't get clobbered on SL restart. Old logs are cleaned up after 1 week. --- indra/newview/llappviewer.cpp | 30 ++++++++++++++++++++++++++++-- 1 file changed, 28 insertions(+), 2 deletions(-) (limited to 'indra/newview/llappviewer.cpp') diff --git a/indra/newview/llappviewer.cpp b/indra/newview/llappviewer.cpp index 351c0cbae5..a5343bb522 100644 --- a/indra/newview/llappviewer.cpp +++ b/indra/newview/llappviewer.cpp @@ -81,7 +81,7 @@ #include "llvoicechannel.h" #include "llvoavatarself.h" #include "llsidetray.h" - +#include "lldate.h" #include "llweb.h" #include "llsecondlifeurls.h" @@ -102,6 +102,7 @@ // Third party library includes #include +#include #if LL_WINDOWS @@ -1242,12 +1243,37 @@ bool LLAppViewer::cleanup() // workaround for DEV-35406 crash on shutdown LLEventPumps::instance().reset(); - // remove any old breakpad minidump files from the log directory if (! isError()) { + // remove any old breakpad minidump files from the log directory std::string logdir = gDirUtilp->getExpandedFilename(LL_PATH_LOGS, ""); logdir += gDirUtilp->getDirDelimiter(); gDirUtilp->deleteFilesInDir(logdir, "*-*-*-*-*.dmp"); + + // remove any old log files saved from old crash reports. + const static std::string mask = "*.*.log"; + std::string filename; + while (gDirUtilp->getNextFileInDir(logdir, mask, filename, false)) + { + static const boost::regex + file_regex(".*\\.(.*)\\.log", boost::regex::extended); + boost::smatch match; + if(boost::regex_match(filename, match, file_regex) && match.size() > 1) + { + F64 date = LLDate(match[1]).secondsSinceEpoch(); + F64 age = LLDate::now().secondsSinceEpoch() - date; + if( date > 0.0 && age > 604800.0 ) + { + // Clean up files older than 1 week. + llinfos << "removing old log file " << filename << llendl; + LLFile::remove(gDirUtilp->getExpandedFilename(LL_PATH_LOGS, filename)); + } + } + else + { + // ignore; + } + } } // *TODO - generalize this and move DSO wrangling to a helper class -brad -- cgit v1.2.3 From 9e7cf5c1bc9174d65c2541f54a3a70a2864519b7 Mon Sep 17 00:00:00 2001 From: Richard Linden Date: Wed, 2 Jun 2010 13:33:15 -0700 Subject: eliminated several warnings on startup --- indra/newview/llappviewer.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'indra/newview/llappviewer.cpp') diff --git a/indra/newview/llappviewer.cpp b/indra/newview/llappviewer.cpp index deafb20af7..f0b3740086 100644 --- a/indra/newview/llappviewer.cpp +++ b/indra/newview/llappviewer.cpp @@ -1817,7 +1817,7 @@ bool LLAppViewer::loadSettingsFromDirectory(const std::string& location_key, } else { - llwarns << "Cannot load " << full_settings_path << " - No settings found." << llendl; + llinfos << "Cannot load " << full_settings_path << " - No settings found." << llendl; } } else -- cgit v1.2.3 From d4b6b04af9ea1429c3a67ec7010aafbd10f46a4d Mon Sep 17 00:00:00 2001 From: Yuri Chebotarev Date: Thu, 3 Jun 2010 17:03:09 +0300 Subject: EXT-7013 FIX due to localization tools restrictions hardcode using of special strings for Japanese reviewed by Mike Antipov https://codereview.productengine.com/secondlife/r/504/ --HG-- branch : product-engine --- indra/newview/llappviewer.cpp | 22 ++++++++++++++-------- 1 file changed, 14 insertions(+), 8 deletions(-) (limited to 'indra/newview/llappviewer.cpp') diff --git a/indra/newview/llappviewer.cpp b/indra/newview/llappviewer.cpp index deafb20af7..2d8fead10e 100644 --- a/indra/newview/llappviewer.cpp +++ b/indra/newview/llappviewer.cpp @@ -893,14 +893,20 @@ bool LLAppViewer::init() LLViewerMedia::initClass(); - LLStringOps::setupWeekDaysNames(LLTrans::getString("dateTimeWeekdaysNames")); - LLStringOps::setupWeekDaysShortNames(LLTrans::getString("dateTimeWeekdaysShortNames")); - LLStringOps::setupMonthNames(LLTrans::getString("dateTimeMonthNames")); - LLStringOps::setupMonthShortNames(LLTrans::getString("dateTimeMonthShortNames")); - LLStringOps::setupDayFormat(LLTrans::getString("dateTimeDayFormat")); - - LLStringOps::sAM = LLTrans::getString("dateTimeAM"); - LLStringOps::sPM = LLTrans::getString("dateTimePM"); + //EXT-7013 - On windows for some locale (Japanese) standard + //datetime formatting functions didn't support some parameters such as "weekday". + std::string language = LLControlGroup::getInstance(sGlobalSettingsName)->getString("Language"); + if(language == "ja") + { + LLStringOps::setupWeekDaysNames(LLTrans::getString("dateTimeWeekdaysNames")); + LLStringOps::setupWeekDaysShortNames(LLTrans::getString("dateTimeWeekdaysShortNames")); + LLStringOps::setupMonthNames(LLTrans::getString("dateTimeMonthNames")); + LLStringOps::setupMonthShortNames(LLTrans::getString("dateTimeMonthShortNames")); + LLStringOps::setupDayFormat(LLTrans::getString("dateTimeDayFormat")); + + LLStringOps::sAM = LLTrans::getString("dateTimeAM"); + LLStringOps::sPM = LLTrans::getString("dateTimePM"); + } return true; } -- cgit v1.2.3 From 94a2a1a98bb22c88c87a6f1d3f5beb6bdc471d87 Mon Sep 17 00:00:00 2001 From: brad kittenbrink Date: Thu, 3 Jun 2010 18:21:06 -0700 Subject: Backed out renaming of log files (changeset 7357f4ef70df) executed: 'hg backout -r 7357f4ef70df --merge' --- indra/newview/llappviewer.cpp | 30 ++---------------------------- 1 file changed, 2 insertions(+), 28 deletions(-) (limited to 'indra/newview/llappviewer.cpp') diff --git a/indra/newview/llappviewer.cpp b/indra/newview/llappviewer.cpp index a5343bb522..351c0cbae5 100644 --- a/indra/newview/llappviewer.cpp +++ b/indra/newview/llappviewer.cpp @@ -81,7 +81,7 @@ #include "llvoicechannel.h" #include "llvoavatarself.h" #include "llsidetray.h" -#include "lldate.h" + #include "llweb.h" #include "llsecondlifeurls.h" @@ -102,7 +102,6 @@ // Third party library includes #include -#include #if LL_WINDOWS @@ -1243,37 +1242,12 @@ bool LLAppViewer::cleanup() // workaround for DEV-35406 crash on shutdown LLEventPumps::instance().reset(); + // remove any old breakpad minidump files from the log directory if (! isError()) { - // remove any old breakpad minidump files from the log directory std::string logdir = gDirUtilp->getExpandedFilename(LL_PATH_LOGS, ""); logdir += gDirUtilp->getDirDelimiter(); gDirUtilp->deleteFilesInDir(logdir, "*-*-*-*-*.dmp"); - - // remove any old log files saved from old crash reports. - const static std::string mask = "*.*.log"; - std::string filename; - while (gDirUtilp->getNextFileInDir(logdir, mask, filename, false)) - { - static const boost::regex - file_regex(".*\\.(.*)\\.log", boost::regex::extended); - boost::smatch match; - if(boost::regex_match(filename, match, file_regex) && match.size() > 1) - { - F64 date = LLDate(match[1]).secondsSinceEpoch(); - F64 age = LLDate::now().secondsSinceEpoch() - date; - if( date > 0.0 && age > 604800.0 ) - { - // Clean up files older than 1 week. - llinfos << "removing old log file " << filename << llendl; - LLFile::remove(gDirUtilp->getExpandedFilename(LL_PATH_LOGS, filename)); - } - } - else - { - // ignore; - } - } } // *TODO - generalize this and move DSO wrangling to a helper class -brad -- cgit v1.2.3 From c3892e9f368fd072fcd8a015af54f909e9189059 Mon Sep 17 00:00:00 2001 From: "Andrew A. de Laix" Date: Fri, 4 Jun 2010 12:57:32 -0700 Subject: Set CrashHostUrl if configured on start up to redirect freeze reports correctly. --- indra/newview/llappviewer.cpp | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'indra/newview/llappviewer.cpp') diff --git a/indra/newview/llappviewer.cpp b/indra/newview/llappviewer.cpp index 351c0cbae5..842f3c7d1f 100644 --- a/indra/newview/llappviewer.cpp +++ b/indra/newview/llappviewer.cpp @@ -2516,6 +2516,15 @@ void LLAppViewer::writeSystemInfo() // If the crash is handled by LLAppViewer::handleViewerCrash, ie not a freeze, // then the value of "CrashNotHandled" will be set to true. gDebugInfo["CrashNotHandled"] = (LLSD::Boolean)true; + + // Insert crash host url (url to post crash log to) if configured. This insures + // that the crash report will go to the proper location in the case of a + // prior freeze. + std::string crashHostUrl = gSavedSettings.get("CrashHostUrl"); + if(crashHostUrl != "") + { + gDebugInfo["CrashHostUrl"] = crashHostUrl; + } // Dump some debugging info LL_INFOS("SystemInfo") << LLTrans::getString("APP_NAME") -- cgit v1.2.3 From aa96a6a4e8ebd86b8dc8da530b79f6cbb0365b04 Mon Sep 17 00:00:00 2001 From: Xiaohong Bao Date: Thu, 10 Jun 2010 12:51:25 -0600 Subject: EXT-7760: FIXED: only 10 avatars render non-impostored --- indra/newview/llappviewer.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'indra/newview/llappviewer.cpp') diff --git a/indra/newview/llappviewer.cpp b/indra/newview/llappviewer.cpp index 95084666bb..7f0186575d 100644 --- a/indra/newview/llappviewer.cpp +++ b/indra/newview/llappviewer.cpp @@ -416,7 +416,7 @@ static void settings_to_globals() LLVolumeImplFlexible::sUpdateFactor = gSavedSettings.getF32("RenderFlexTimeFactor"); LLVOTree::sTreeFactor = gSavedSettings.getF32("RenderTreeLODFactor"); LLVOAvatar::sLODFactor = gSavedSettings.getF32("RenderAvatarLODFactor"); - LLVOAvatar::sMaxVisible = gSavedSettings.getS32("RenderAvatarMaxVisible"); + LLVOAvatar::sMaxVisible = (U32)gSavedSettings.getS32("RenderAvatarMaxVisible"); LLVOAvatar::sVisibleInFirstPerson = gSavedSettings.getBOOL("FirstPersonAvatarVisible"); // clamp auto-open time to some minimum usable value LLFolderView::sAutoOpenTime = llmax(0.25f, gSavedSettings.getF32("FolderAutoOpenDelay")); -- cgit v1.2.3 From 83a7a342ea83441c7fdcea1ac30cc61b2ab11546 Mon Sep 17 00:00:00 2001 From: Leyla Farazha Date: Tue, 15 Jun 2010 17:21:27 -0700 Subject: removing fullscreen functionality reviewed by richard cc#212 --- indra/newview/llappviewer.cpp | 12 ++---------- 1 file changed, 2 insertions(+), 10 deletions(-) (limited to 'indra/newview/llappviewer.cpp') diff --git a/indra/newview/llappviewer.cpp b/indra/newview/llappviewer.cpp index f4004d5664..475f664917 100644 --- a/indra/newview/llappviewer.cpp +++ b/indra/newview/llappviewer.cpp @@ -2366,16 +2366,9 @@ bool LLAppViewer::initWindow() LLNotificationsUI::LLNotificationManager::getInstance(); - if (gSavedSettings.getBOOL("FullScreen")) - { - // request to go full screen... which will be delayed until login - gViewerWindow->toggleFullscreen(FALSE); - } - if (gSavedSettings.getBOOL("WindowMaximized")) { gViewerWindow->mWindow->maximize(); - gViewerWindow->getWindow()->setNativeAspectRatio(gSavedSettings.getF32("FullScreenAspectRatio")); } if (!gNoRender) @@ -2449,11 +2442,10 @@ void LLAppViewer::cleanupSavedSettings() } } - // save window position if not fullscreen + // save window position if not maximized // as we don't track it in callbacks - BOOL fullscreen = gViewerWindow->mWindow->getFullscreen(); BOOL maximized = gViewerWindow->mWindow->getMaximized(); - if (!fullscreen && !maximized) + if (!maximized) { LLCoordScreen window_pos; -- cgit v1.2.3 From 1ec7de1b5760b5fc1ebda1d244784e3bc4596eb1 Mon Sep 17 00:00:00 2001 From: "Andrew A. de Laix" Date: Tue, 29 Jun 2010 14:51:26 -0700 Subject: Generate windows minidump files on crash for developer (not release for download) builds. SL crash reporter still enabled. --- indra/newview/llappviewer.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'indra/newview/llappviewer.cpp') diff --git a/indra/newview/llappviewer.cpp b/indra/newview/llappviewer.cpp index 1ed63555b0..1b5b73e3dd 100644 --- a/indra/newview/llappviewer.cpp +++ b/indra/newview/llappviewer.cpp @@ -4133,7 +4133,7 @@ void LLAppViewer::forceErrorBreakpoint() void LLAppViewer::forceErrorBadMemoryAccess() { S32* crash = NULL; - *crash = 0xDEADBEEF; + *crash = 0xDEADBEEF; return; } -- cgit v1.2.3 From 5fd6887477b61e10ffd29086b9330a54b3a571d2 Mon Sep 17 00:00:00 2001 From: "Andrew A. de Laix" Date: Thu, 1 Jul 2010 17:30:19 -0700 Subject: Watchdog thread configurable though feature table; user config value will still take precedence. --- indra/newview/llappviewer.cpp | 46 +++++++++++++++++++++---------------------- 1 file changed, 22 insertions(+), 24 deletions(-) (limited to 'indra/newview/llappviewer.cpp') diff --git a/indra/newview/llappviewer.cpp b/indra/newview/llappviewer.cpp index 1b5b73e3dd..dc514eafe7 100644 --- a/indra/newview/llappviewer.cpp +++ b/indra/newview/llappviewer.cpp @@ -81,7 +81,7 @@ #include "llvoicechannel.h" #include "llvoavatarself.h" #include "llsidetray.h" - +#include "llfeaturemanager.h" #include "llweb.h" #include "llsecondlifeurls.h" @@ -379,14 +379,8 @@ bool handleCrashSubmitBehaviorChanged(const LLSD& newvalue) const S32 NEVER_SUBMIT_REPORT = 2; if(cb == NEVER_SUBMIT_REPORT) { -// LLWatchdog::getInstance()->cleanup(); // SJB: cleaning up a running watchdog thread is unsafe LLAppViewer::instance()->destroyMainloopTimeout(); } - else if(gSavedSettings.getBOOL("WatchdogEnabled") == TRUE) - { - // Don't re-enable the watchdog when we change the setting; this may get called before it's started -// LLWatchdog::getInstance()->init(); - } return true; } @@ -1689,14 +1683,6 @@ bool LLAppViewer::initThreads() static const bool enable_threads = true; #endif - const S32 NEVER_SUBMIT_REPORT = 2; - bool use_watchdog = gSavedSettings.getBOOL("WatchdogEnabled"); - bool send_reports = gCrashSettings.getS32(CRASH_BEHAVIOR_SETTING) != NEVER_SUBMIT_REPORT; - if(use_watchdog && send_reports) - { - LLWatchdog::getInstance()->init(watchdog_killer_callback); - } - LLVFSThread::initClass(enable_threads && false); LLLFSThread::initClass(enable_threads && false); @@ -1925,18 +1911,11 @@ bool LLAppViewer::initConfiguration() } #endif - //*FIX:Mani - Set default to disabling watchdog mainloop - // timeout for mac and linux. There is no call stack info - // on these platform to help debug. #ifndef LL_RELEASE_FOR_DOWNLOAD - gSavedSettings.setBOOL("WatchdogEnabled", FALSE); gSavedSettings.setBOOL("QAMode", TRUE ); + gSavedSettings.setS32("WatchdogEnabled", 0); #endif - -#ifndef LL_WINDOWS - gSavedSettings.setBOOL("WatchdogEnabled", FALSE); -#endif - + gCrashSettings.getControl(CRASH_BEHAVIOR_SETTING)->getSignal()->connect(boost::bind(&handleCrashSubmitBehaviorChanged, _2)); // These are warnings that appear on the first experience of that condition. @@ -2364,6 +2343,25 @@ bool LLAppViewer::initWindow() gSavedSettings.getS32("WindowWidth"), gSavedSettings.getS32("WindowHeight"), FALSE, ignorePixelDepth); + // Need to load feature table before cheking to start watchdog. + const S32 NEVER_SUBMIT_REPORT = 2; + bool use_watchdog = false; + int watchdog_enabled_setting = gSavedSettings.getS32("WatchdogEnabled"); + if(watchdog_enabled_setting == -1){ + use_watchdog = !LLFeatureManager::getInstance()->isFeatureAvailable("WatchdogDisabled"); + } + else + { + // The user has explicitly set this setting; always use that value. + use_watchdog = bool(watchdog_enabled_setting); + } + + bool send_reports = gCrashSettings.getS32(CRASH_BEHAVIOR_SETTING) != NEVER_SUBMIT_REPORT; + if(use_watchdog && send_reports) + { + LLWatchdog::getInstance()->init(watchdog_killer_callback); + } + LLNotificationsUI::LLNotificationManager::getInstance(); if (gSavedSettings.getBOOL("WindowMaximized")) -- cgit v1.2.3 From 0cf9168895b1d7b69e4a0307ade6cbc607f799f2 Mon Sep 17 00:00:00 2001 From: Yuri Chebotarev Date: Fri, 2 Jul 2010 15:23:05 +0300 Subject: EXT-5692 FIX Add callback to create widget segment with LLAvatarIconCtrl (or LLGroupIconCtrl) based on url match id. reviewed by Richard Nelson at https://codereview.productengine.com/secondlife/r/610/ --HG-- branch : product-engine --- indra/newview/llappviewer.cpp | 43 +++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 43 insertions(+) (limited to 'indra/newview/llappviewer.cpp') diff --git a/indra/newview/llappviewer.cpp b/indra/newview/llappviewer.cpp index 1ed63555b0..cc28f41fa1 100644 --- a/indra/newview/llappviewer.cpp +++ b/indra/newview/llappviewer.cpp @@ -81,6 +81,8 @@ #include "llvoicechannel.h" #include "llvoavatarself.h" #include "llsidetray.h" +#include "llurlmatch.h" +#include "lltextutil.h" #include "llweb.h" @@ -192,6 +194,7 @@ #include "llviewerthrottle.h" #include "llparcel.h" #include "llavatariconctrl.h" +#include "llgroupiconctrl.h" // Include for security api initialization #include "llsecapi.h" @@ -351,6 +354,45 @@ static void ui_audio_callback(const LLUUID& uuid) } } +bool create_text_segment_icon_from_url_match(LLUrlMatch* match,LLTextBase* base) +{ + if(!match || !base) + return false; + + LLUUID match_id = match->getID(); + + LLIconCtrl* icon; + + if(gAgent.isInGroup(match_id, TRUE)) + { + LLGroupIconCtrl::Params icon_params = LLUICtrlFactory::instance().getDefaultParams(); + icon_params.group_id = match_id; + icon_params.rect = LLRect(0, 16, 16, 0); + icon_params.visible = true; + icon = LLUICtrlFactory::instance().createWidget(icon_params); + } + else + { + LLAvatarIconCtrl::Params icon_params = LLUICtrlFactory::instance().getDefaultParams(); + icon_params.avatar_id = match_id; + icon_params.rect = LLRect(0, 16, 16, 0); + icon_params.visible = true; + icon = LLUICtrlFactory::instance().createWidget(icon_params); + } + + LLInlineViewSegment::Params params; + params.force_newline = false; + params.view = icon; + params.left_pad = 4; + params.right_pad = 4; + params.top_pad = 2; + params.bottom_pad = 2; + + base->appendWidget(params," ",false); + + return true; +} + void request_initial_instant_messages() { static BOOL requested = FALSE; @@ -893,6 +935,7 @@ bool LLAppViewer::init() } LLViewerMedia::initClass(); + LLTextUtil::TextHelpers::iconCallbackCreationFunction = create_text_segment_icon_from_url_match; //EXT-7013 - On windows for some locale (Japanese) standard //datetime formatting functions didn't support some parameters such as "weekday". -- cgit v1.2.3 From 223b25de0d2584af13f38b8eea128a32c62dc9f3 Mon Sep 17 00:00:00 2001 From: Vadim Savchuk Date: Wed, 14 Jul 2010 18:18:47 +0300 Subject: EXT-8400 FIXED Updated default inventory item names ("New Script", etc) on viewer language switch. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Bug reason ========== New inventory items get names like "New Script", "New Undershirt" etc., but the names are translated on-the-fly (see EXT-5839), so the user actually sees "Nouveau script", "Nouveau débardeur" etc., respectively. However when the user changes viewer language, the old localized names still exist in the inventory cache, so, for example, if you create an undershirt in French and then switch to Enlgish, the undershirt will be named "Nouveau d bardeur", which is the old cached localized name with non-ASCII characters replaced with spaces. Fix === To get rid of obsolete translations I clear all caches whenever viewer language gets changed. Other changes ============= - Added a check for agent region being NULL to LLAgentLanguage::update(). - Removed LLAgentLanguage constructor and base classes because it's never instantiated. Reviewed by Seraph at https://codereview.productengine.com/secondlife/r/744/ --HG-- branch : product-engine --- indra/newview/llappviewer.cpp | 3 +++ 1 file changed, 3 insertions(+) (limited to 'indra/newview/llappviewer.cpp') diff --git a/indra/newview/llappviewer.cpp b/indra/newview/llappviewer.cpp index 682e3eb874..6869cf3e64 100644 --- a/indra/newview/llappviewer.cpp +++ b/indra/newview/llappviewer.cpp @@ -45,6 +45,7 @@ #include "llgroupmgr.h" #include "llagent.h" #include "llagentcamera.h" +#include "llagentlanguage.h" #include "llagentwearables.h" #include "llwindow.h" #include "llviewerstats.h" @@ -946,6 +947,8 @@ bool LLAppViewer::init() LLStringOps::sPM = LLTrans::getString("dateTimePM"); } + LLAgentLanguage::init(); + return true; } -- cgit v1.2.3 From 1d1377079b08ada11bc33cc88ee25761b1954d5c Mon Sep 17 00:00:00 2001 From: Richard Linden Date: Wed, 14 Jul 2010 11:48:33 -0700 Subject: EXT-8300 FIX Creator's icon overlaps description text on object's mini-inspector reviewed by Leyla --- indra/newview/llappviewer.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'indra/newview/llappviewer.cpp') diff --git a/indra/newview/llappviewer.cpp b/indra/newview/llappviewer.cpp index 682e3eb874..d8b2866a9f 100644 --- a/indra/newview/llappviewer.cpp +++ b/indra/newview/llappviewer.cpp @@ -385,7 +385,7 @@ bool create_text_segment_icon_from_url_match(LLUrlMatch* match,LLTextBase* base) params.view = icon; params.left_pad = 4; params.right_pad = 4; - params.top_pad = 2; + params.top_pad = -2; params.bottom_pad = 2; base->appendWidget(params," ",false); -- cgit v1.2.3 From 390bef2091b3458d93d009a98728e9115ead9302 Mon Sep 17 00:00:00 2001 From: Alexei Arabadji Date: Wed, 21 Jul 2010 09:54:25 +0300 Subject: EXT-6527 FIXED Avoided show agent/group SLURL icon in plain text mode. reviewed by Richard Nelson at https://codereview.productengine.com/secondlife/r/773/ --HG-- branch : product-engine --- indra/newview/llappviewer.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'indra/newview/llappviewer.cpp') diff --git a/indra/newview/llappviewer.cpp b/indra/newview/llappviewer.cpp index 296e3b7e86..58b651ec39 100644 --- a/indra/newview/llappviewer.cpp +++ b/indra/newview/llappviewer.cpp @@ -357,7 +357,7 @@ static void ui_audio_callback(const LLUUID& uuid) bool create_text_segment_icon_from_url_match(LLUrlMatch* match,LLTextBase* base) { - if(!match || !base) + if(!match || !base || base->getPlainText()) return false; LLUUID match_id = match->getID(); -- cgit v1.2.3 From 06b0d72efa96b6a0ed665f7cd46f358c48929e7b Mon Sep 17 00:00:00 2001 From: Oz Linden Date: Fri, 13 Aug 2010 07:24:57 -0400 Subject: Change license from GPL to LGPL (version 2.1) --- indra/newview/llappviewer.cpp | 36 +++++++++++++++--------------------- 1 file changed, 15 insertions(+), 21 deletions(-) (limited to 'indra/newview/llappviewer.cpp') diff --git a/indra/newview/llappviewer.cpp b/indra/newview/llappviewer.cpp index 58b651ec39..7f4ba2f2d2 100644 --- a/indra/newview/llappviewer.cpp +++ b/indra/newview/llappviewer.cpp @@ -2,31 +2,25 @@ * @file llappviewer.cpp * @brief The LLAppViewer class definitions * - * $LicenseInfo:firstyear=2007&license=viewergpl$ - * - * Copyright (c) 2007-2009, Linden Research, Inc. - * + * $LicenseInfo:firstyear=2007&license=viewerlgpl$ * Second Life Viewer Source Code - * The source code in this file ("Source Code") is provided by Linden Lab - * to you under the terms of the GNU General Public License, version 2.0 - * ("GPL"), unless you have obtained a separate licensing agreement - * ("Other License"), formally executed by you and Linden Lab. Terms of - * the GPL can be found in doc/GPL-license.txt in this distribution, or - * online at http://secondlifegrid.net/programs/open_source/licensing/gplv2 + * Copyright (C) 2010, Linden Research, Inc. + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; + * version 2.1 of the License only. * - * There are special exceptions to the terms and conditions of the GPL as - * it is applied to this Source Code. View the full text of the exception - * in the file doc/FLOSS-exception.txt in this software distribution, or - * online at - * http://secondlifegrid.net/programs/open_source/licensing/flossexception + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. * - * By copying, modifying or distributing this software, you acknowledge - * that you have read and understood your obligations described above, - * and agree to abide by those obligations. + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA * - * ALL LINDEN LAB SOURCE CODE IS PROVIDED "AS IS." LINDEN LAB MAKES NO - * WARRANTIES, EXPRESS, IMPLIED OR OTHERWISE, REGARDING ITS ACCURACY, - * COMPLETENESS OR PERFORMANCE. + * Linden Research, Inc., 945 Battery Street, San Francisco, CA 94111 USA * $/LicenseInfo$ */ -- cgit v1.2.3 From 116382fdf78ca578a74c30a162208033fd021124 Mon Sep 17 00:00:00 2001 From: Xiaohong Bao Date: Wed, 18 Aug 2010 15:32:40 -0600 Subject: fixed for EXT-8963: investigate if Advanced > Run Multiple Threads should be on. Removed "Run Multiple Threads" from the menu because we are not using it. --- indra/newview/llappviewer.cpp | 41 ++++++++++++++--------------------------- 1 file changed, 14 insertions(+), 27 deletions(-) (limited to 'indra/newview/llappviewer.cpp') diff --git a/indra/newview/llappviewer.cpp b/indra/newview/llappviewer.cpp index 58b651ec39..d6ecb2f168 100644 --- a/indra/newview/llappviewer.cpp +++ b/indra/newview/llappviewer.cpp @@ -1108,8 +1108,7 @@ bool LLAppViewer::mainLoop() { LLMemType mt_sleep(LLMemType::MTYPE_SLEEP); LLFastTimer t2(FTM_SLEEP); - bool run_multiple_threads = gSavedSettings.getBOOL("RunMultipleThreads"); - + // yield some time to the os based on command line option if(mYieldTime >= 0) { @@ -1147,9 +1146,7 @@ bool LLAppViewer::mainLoop() } static const F64 FRAME_SLOW_THRESHOLD = 0.5; //2 frames per seconds - const F64 min_frame_time = 0.0; //(.0333 - .0010); // max video frame rate = 30 fps - const F64 min_idle_time = 0.0; //(.0010); // min idle time = 1 ms - const F64 max_idle_time = run_multiple_threads ? min_idle_time : llmin(.005*10.0*gFrameTimeSeconds, 0.005); // 5 ms a second + const F64 max_idle_time = llmin(.005*10.0*gFrameTimeSeconds, 0.005); // 5 ms a second idleTimer.reset(); bool is_slow = (frameTimer.getElapsedTimeF64() > FRAME_SLOW_THRESHOLD) ; S32 total_work_pending = 0; @@ -1187,34 +1184,24 @@ bool LLAppViewer::mainLoop() total_work_pending += work_pending ; total_io_pending += io_pending ; - F64 frame_time = frameTimer.getElapsedTimeF64(); - F64 idle_time = idleTimer.getElapsedTimeF64(); - if (frame_time >= min_frame_time && - idle_time >= min_idle_time && - (!work_pending || idle_time >= max_idle_time)) + + if (!work_pending || idleTimer.getElapsedTimeF64() >= max_idle_time) { break; } } - // Prevent the worker threads from running while rendering. - // if (LLThread::processorCount()==1) //pause() should only be required when on a single processor client... - if (run_multiple_threads == FALSE) + if(!total_work_pending) //pause texture fetching threads if nothing to process. { - //LLFastTimer ftm(FTM_PAUSE_THREADS); //not necessary. - - if(!total_work_pending) //pause texture fetching threads if nothing to process. - { - LLAppViewer::getTextureCache()->pause(); - LLAppViewer::getImageDecodeThread()->pause(); - LLAppViewer::getTextureFetch()->pause(); - } - if(!total_io_pending) //pause file threads if nothing to process. - { - LLVFSThread::sLocal->pause(); - LLLFSThread::sLocal->pause(); - } - } + LLAppViewer::getTextureCache()->pause(); + LLAppViewer::getImageDecodeThread()->pause(); + LLAppViewer::getTextureFetch()->pause(); + } + if(!total_io_pending) //pause file threads if nothing to process. + { + LLVFSThread::sLocal->pause(); + LLLFSThread::sLocal->pause(); + } if ((LLStartUp::getStartupState() >= STATE_CLEANUP) && (frameTimer.getElapsedTimeF64() > FRAME_STALL_THRESHOLD)) -- cgit v1.2.3 From 98cc2365034a93c69704daa69efb389799cc9627 Mon Sep 17 00:00:00 2001 From: Tofu Linden Date: Tue, 24 Aug 2010 18:44:39 +0100 Subject: Backed out changeset a62bf7c0af21 Backing out this merge that I pushed (prematurely) to the wrong place. --- indra/newview/llappviewer.cpp | 74 ++++++++++++++++++++----------------------- 1 file changed, 34 insertions(+), 40 deletions(-) (limited to 'indra/newview/llappviewer.cpp') diff --git a/indra/newview/llappviewer.cpp b/indra/newview/llappviewer.cpp index bfe3e52657..7f4ba2f2d2 100644 --- a/indra/newview/llappviewer.cpp +++ b/indra/newview/llappviewer.cpp @@ -955,11 +955,6 @@ static LLFastTimer::DeclareTimer FTM_LFS("LFS Thread"); static LLFastTimer::DeclareTimer FTM_PAUSE_THREADS("Pause Threads"); static LLFastTimer::DeclareTimer FTM_IDLE("Idle"); static LLFastTimer::DeclareTimer FTM_PUMP("Pump"); -static LLFastTimer::DeclareTimer FTM_PUMP_ARES("Ares"); -static LLFastTimer::DeclareTimer FTM_PUMP_SERVICE("Service"); -static LLFastTimer::DeclareTimer FTM_SERVICE_CALLBACK("Callback"); -static LLFastTimer::DeclareTimer FTM_AGENT_AUTOPILOT("Autopilot"); -static LLFastTimer::DeclareTimer FTM_AGENT_UPDATE("Update"); bool LLAppViewer::mainLoop() { @@ -1069,20 +1064,10 @@ bool LLAppViewer::mainLoop() LLMemType mt_ip(LLMemType::MTYPE_IDLE_PUMP); pingMainloopTimeout("Main:ServicePump"); LLFastTimer t4(FTM_PUMP); - { - LLFastTimer t(FTM_PUMP_ARES); - gAres->process(); - } - { - LLFastTimer t(FTM_PUMP_SERVICE); - // this pump is necessary to make the login screen show up - gServicePump->pump(); - - { - LLFastTimer t(FTM_SERVICE_CALLBACK); - gServicePump->callback(); - } - } + gAres->process(); + // this pump is necessary to make the login screen show up + gServicePump->pump(); + gServicePump->callback(); } resumeMainloopTimeout(); @@ -1117,7 +1102,8 @@ bool LLAppViewer::mainLoop() { LLMemType mt_sleep(LLMemType::MTYPE_SLEEP); LLFastTimer t2(FTM_SLEEP); - + bool run_multiple_threads = gSavedSettings.getBOOL("RunMultipleThreads"); + // yield some time to the os based on command line option if(mYieldTime >= 0) { @@ -1155,7 +1141,9 @@ bool LLAppViewer::mainLoop() } static const F64 FRAME_SLOW_THRESHOLD = 0.5; //2 frames per seconds - const F64 max_idle_time = llmin(.005*10.0*gFrameTimeSeconds, 0.005); // 5 ms a second + const F64 min_frame_time = 0.0; //(.0333 - .0010); // max video frame rate = 30 fps + const F64 min_idle_time = 0.0; //(.0010); // min idle time = 1 ms + const F64 max_idle_time = run_multiple_threads ? min_idle_time : llmin(.005*10.0*gFrameTimeSeconds, 0.005); // 5 ms a second idleTimer.reset(); bool is_slow = (frameTimer.getElapsedTimeF64() > FRAME_SLOW_THRESHOLD) ; S32 total_work_pending = 0; @@ -1193,24 +1181,34 @@ bool LLAppViewer::mainLoop() total_work_pending += work_pending ; total_io_pending += io_pending ; - - if (!work_pending || idleTimer.getElapsedTimeF64() >= max_idle_time) + F64 frame_time = frameTimer.getElapsedTimeF64(); + F64 idle_time = idleTimer.getElapsedTimeF64(); + if (frame_time >= min_frame_time && + idle_time >= min_idle_time && + (!work_pending || idle_time >= max_idle_time)) { break; } } - if(!total_work_pending) //pause texture fetching threads if nothing to process. + // Prevent the worker threads from running while rendering. + // if (LLThread::processorCount()==1) //pause() should only be required when on a single processor client... + if (run_multiple_threads == FALSE) { - LLAppViewer::getTextureCache()->pause(); - LLAppViewer::getImageDecodeThread()->pause(); - LLAppViewer::getTextureFetch()->pause(); - } - if(!total_io_pending) //pause file threads if nothing to process. - { - LLVFSThread::sLocal->pause(); - LLLFSThread::sLocal->pause(); - } + //LLFastTimer ftm(FTM_PAUSE_THREADS); //not necessary. + + if(!total_work_pending) //pause texture fetching threads if nothing to process. + { + LLAppViewer::getTextureCache()->pause(); + LLAppViewer::getImageDecodeThread()->pause(); + LLAppViewer::getTextureFetch()->pause(); + } + if(!total_io_pending) //pause file threads if nothing to process. + { + LLVFSThread::sLocal->pause(); + LLLFSThread::sLocal->pause(); + } + } if ((LLStartUp::getStartupState() >= STATE_CLEANUP) && (frameTimer.getElapsedTimeF64() > FRAME_STALL_THRESHOLD)) @@ -3562,12 +3560,9 @@ void LLAppViewer::idle() gAgent.moveYaw(-1.f); } - { - LLFastTimer t(FTM_AGENT_AUTOPILOT); - // Handle automatic walking towards points - gAgentPilot.updateTarget(); - gAgent.autoPilot(&yaw); - } + // Handle automatic walking towards points + gAgentPilot.updateTarget(); + gAgent.autoPilot(&yaw); static LLFrameTimer agent_update_timer; static U32 last_control_flags; @@ -3578,7 +3573,6 @@ void LLAppViewer::idle() if (flags_changed || (agent_update_time > (1.0f / (F32) AGENT_UPDATES_PER_SECOND))) { - LLFastTimer t(FTM_AGENT_UPDATE); // Send avatar and camera info last_control_flags = gAgent.getControlFlags(); send_agent_update(TRUE); -- cgit v1.2.3 From 8eab0f9b41979cb5407d7dde3ded2774e8d2f571 Mon Sep 17 00:00:00 2001 From: Dave Parks Date: Wed, 16 Dec 2009 12:31:24 -0600 Subject: Tracking down stalls in llpumpio and agent updates. --- indra/newview/llappviewer.cpp | 33 ++++++++++++++++++++++++++------- 1 file changed, 26 insertions(+), 7 deletions(-) (limited to 'indra/newview/llappviewer.cpp') diff --git a/indra/newview/llappviewer.cpp b/indra/newview/llappviewer.cpp index 43c8c679c6..6ec4266925 100644 --- a/indra/newview/llappviewer.cpp +++ b/indra/newview/llappviewer.cpp @@ -922,6 +922,11 @@ static LLFastTimer::DeclareTimer FTM_LFS("LFS Thread"); static LLFastTimer::DeclareTimer FTM_PAUSE_THREADS("Pause Threads"); static LLFastTimer::DeclareTimer FTM_IDLE("Idle"); static LLFastTimer::DeclareTimer FTM_PUMP("Pump"); +static LLFastTimer::DeclareTimer FTM_PUMP_ARES("Ares"); +static LLFastTimer::DeclareTimer FTM_PUMP_SERVICE("Service"); +static LLFastTimer::DeclareTimer FTM_SERVICE_CALLBACK("Callback"); +static LLFastTimer::DeclareTimer FTM_AGENT_AUTOPILOT("Autopilot"); +static LLFastTimer::DeclareTimer FTM_AGENT_UPDATE("Update"); bool LLAppViewer::mainLoop() { @@ -1033,10 +1038,20 @@ bool LLAppViewer::mainLoop() LLMemType mt_ip(LLMemType::MTYPE_IDLE_PUMP); pingMainloopTimeout("Main:ServicePump"); LLFastTimer t4(FTM_PUMP); - gAres->process(); - // this pump is necessary to make the login screen show up - gServicePump->pump(); - gServicePump->callback(); + { + LLFastTimer t(FTM_PUMP_ARES); + gAres->process(); + } + { + LLFastTimer t(FTM_PUMP_SERVICE); + // this pump is necessary to make the login screen show up + gServicePump->pump(); + + { + LLFastTimer t(FTM_SERVICE_CALLBACK); + gServicePump->callback(); + } + } } resumeMainloopTimeout(); @@ -3495,9 +3510,12 @@ void LLAppViewer::idle() gAgent.moveYaw(-1.f); } - // Handle automatic walking towards points - gAgentPilot.updateTarget(); - gAgent.autoPilot(&yaw); + { + LLFastTimer t(FTM_AGENT_AUTOPILOT); + // Handle automatic walking towards points + gAgentPilot.updateTarget(); + gAgent.autoPilot(&yaw); + } static LLFrameTimer agent_update_timer; static U32 last_control_flags; @@ -3508,6 +3526,7 @@ void LLAppViewer::idle() if (flags_changed || (agent_update_time > (1.0f / (F32) AGENT_UPDATES_PER_SECOND))) { + LLFastTimer t(FTM_AGENT_UPDATE); // Send avatar and camera info last_control_flags = gAgent.getControlFlags(); send_agent_update(TRUE); -- cgit v1.2.3