diff options
author | McCabe Maxsted | 2010-05-21 17:27:39 -0700 |
---|---|---|
committer | Jacek Antonelli | 2010-06-19 02:40:56 -0500 |
commit | 1ac80a81f3990c207b04d560453db831831c1049 (patch) | |
tree | 7f54ccdc76f239619ad7bcb53ffa99f395e61a68 /linden | |
parent | Removed some more log spam from loading the water settings (diff) | |
download | meta-impy-1ac80a81f3990c207b04d560453db831831c1049.zip meta-impy-1ac80a81f3990c207b04d560453db831831c1049.tar.gz meta-impy-1ac80a81f3990c207b04d560453db831831c1049.tar.bz2 meta-impy-1ac80a81f3990c207b04d560453db831831c1049.tar.xz |
Fixed the login screen sometimes stuck on 'Connecting to Region...' while logging onto OpenSim, added debugging info for checking the startup state
Diffstat (limited to 'linden')
-rw-r--r-- | linden/indra/newview/app_settings/logcontrol.xml | 6 | ||||
-rw-r--r-- | linden/indra/newview/llstartup.cpp | 49 |
2 files changed, 46 insertions, 9 deletions
diff --git a/linden/indra/newview/app_settings/logcontrol.xml b/linden/indra/newview/app_settings/logcontrol.xml index cc4b63b..e276e48 100644 --- a/linden/indra/newview/app_settings/logcontrol.xml +++ b/linden/indra/newview/app_settings/logcontrol.xml | |||
@@ -42,8 +42,10 @@ | |||
42 | <array> | 42 | <array> |
43 | 43 | ||
44 | <!--Unused debug messages below--> | 44 | <!--Unused debug messages below--> |
45 | 45 | ||
46 | <!--<string>DBUS</string>--> | 46 | <!--<string>AppInit</string>--> |
47 | <!--<string>AppInitStartupState</string>--> | ||
48 | <!--<string>DBUS</string>--> | ||
47 | <!--<string>OpenAL</string>--> | 49 | <!--<string>OpenAL</string>--> |
48 | <!--<string>AppCache</string>--> | 50 | <!--<string>AppCache</string>--> |
49 | <!--<string>APR</string>--> | 51 | <!--<string>APR</string>--> |
diff --git a/linden/indra/newview/llstartup.cpp b/linden/indra/newview/llstartup.cpp index e2b6cc5..bbf55f7 100644 --- a/linden/indra/newview/llstartup.cpp +++ b/linden/indra/newview/llstartup.cpp | |||
@@ -322,12 +322,13 @@ bool idle_startup() | |||
322 | LLMemType mt1(LLMemType::MTYPE_STARTUP); | 322 | LLMemType mt1(LLMemType::MTYPE_STARTUP); |
323 | 323 | ||
324 | const F32 PRECACHING_DELAY = gSavedSettings.getF32("PrecachingDelay"); | 324 | const F32 PRECACHING_DELAY = gSavedSettings.getF32("PrecachingDelay"); |
325 | const F32 TIMEOUT_SECONDS = 5.f; | 325 | const F32 TIMEOUT_SECONDS = 10.f; // changed from 5 to 10 seconds for OpenSim lag -- MC |
326 | const S32 MAX_TIMEOUT_COUNT = 3; | 326 | const S32 MAX_TIMEOUT_COUNT = 3; |
327 | static LLTimer timeout; | 327 | static LLTimer timeout; |
328 | static S32 timeout_count = 0; | 328 | static S32 timeout_count = 0; |
329 | 329 | ||
330 | static LLTimer login_time; | 330 | static LLTimer login_time; |
331 | static LLTimer connecting_region_timer; | ||
331 | static LLFrameTimer wearables_timer; | 332 | static LLFrameTimer wearables_timer; |
332 | 333 | ||
333 | // until this is encapsulated, this little hack for the | 334 | // until this is encapsulated, this little hack for the |
@@ -382,6 +383,7 @@ bool idle_startup() | |||
382 | 383 | ||
383 | if ( STATE_FIRST == LLStartUp::getStartupState() ) | 384 | if ( STATE_FIRST == LLStartUp::getStartupState() ) |
384 | { | 385 | { |
386 | LL_DEBUGS("AppInitStartupState") << "STATE_FIRST" << LL_ENDL; | ||
385 | gViewerWindow->showCursor(); | 387 | gViewerWindow->showCursor(); |
386 | gViewerWindow->getWindow()->setCursor(UI_CURSOR_WAIT); | 388 | gViewerWindow->getWindow()->setCursor(UI_CURSOR_WAIT); |
387 | 389 | ||
@@ -737,7 +739,7 @@ bool idle_startup() | |||
737 | 739 | ||
738 | if (STATE_BROWSER_INIT == LLStartUp::getStartupState()) | 740 | if (STATE_BROWSER_INIT == LLStartUp::getStartupState()) |
739 | { | 741 | { |
740 | LL_DEBUGS("AppInit") << "STATE_BROWSER_INIT" << LL_ENDL; | 742 | LL_DEBUGS("AppInitStartupState") << "STATE_BROWSER_INIT" << LL_ENDL; |
741 | std::string msg = LLTrans::getString("LoginInitializingBrowser"); | 743 | std::string msg = LLTrans::getString("LoginInitializingBrowser"); |
742 | set_startup_status(0.03f, msg.c_str(), gAgent.mMOTD.c_str()); | 744 | set_startup_status(0.03f, msg.c_str(), gAgent.mMOTD.c_str()); |
743 | display_startup(); | 745 | display_startup(); |
@@ -831,6 +833,7 @@ bool idle_startup() | |||
831 | 833 | ||
832 | if (STATE_LOGIN_WAIT == LLStartUp::getStartupState()) | 834 | if (STATE_LOGIN_WAIT == LLStartUp::getStartupState()) |
833 | { | 835 | { |
836 | LL_DEBUGS("AppInitStartupState") << "STATE_LOGIN_WAIT" << LL_ENDL; | ||
834 | // Don't do anything. Wait for the login view to call the login_callback, | 837 | // Don't do anything. Wait for the login view to call the login_callback, |
835 | // which will push us to the next state. | 838 | // which will push us to the next state. |
836 | 839 | ||
@@ -841,6 +844,7 @@ bool idle_startup() | |||
841 | 844 | ||
842 | if (STATE_LOGIN_CLEANUP == LLStartUp::getStartupState()) | 845 | if (STATE_LOGIN_CLEANUP == LLStartUp::getStartupState()) |
843 | { | 846 | { |
847 | LL_DEBUGS("AppInitStartupState") << "STATE_LOGIN_CLEANUP" << LL_ENDL; | ||
844 | //reset the values that could have come in from a slurl | 848 | //reset the values that could have come in from a slurl |
845 | if (!gLoginHandler.getWebLoginKey().isNull()) | 849 | if (!gLoginHandler.getWebLoginKey().isNull()) |
846 | { | 850 | { |
@@ -1042,12 +1046,14 @@ bool idle_startup() | |||
1042 | 1046 | ||
1043 | if (STATE_UPDATE_CHECK == LLStartUp::getStartupState()) | 1047 | if (STATE_UPDATE_CHECK == LLStartUp::getStartupState()) |
1044 | { | 1048 | { |
1049 | LL_DEBUGS("AppInitStartupState") << "STATE_UPDATE_CHECK" << LL_ENDL; | ||
1045 | // wait for user to give input via dialog box | 1050 | // wait for user to give input via dialog box |
1046 | return FALSE; | 1051 | return FALSE; |
1047 | } | 1052 | } |
1048 | 1053 | ||
1049 | if(STATE_LOGIN_AUTH_INIT == LLStartUp::getStartupState()) | 1054 | if(STATE_LOGIN_AUTH_INIT == LLStartUp::getStartupState()) |
1050 | { | 1055 | { |
1056 | LL_DEBUGS("AppInitStartupState") << "STATE_LOGIN_AUTH_INIT" << LL_ENDL; | ||
1051 | //#define LL_MINIMIAL_REQUESTED_OPTIONS | 1057 | //#define LL_MINIMIAL_REQUESTED_OPTIONS |
1052 | gDebugInfo["GridName"] = LLViewerLogin::getInstance()->getGridLabel(); | 1058 | gDebugInfo["GridName"] = LLViewerLogin::getInstance()->getGridLabel(); |
1053 | 1059 | ||
@@ -1109,7 +1115,7 @@ bool idle_startup() | |||
1109 | 1115 | ||
1110 | if (STATE_LOGIN_AUTHENTICATE == LLStartUp::getStartupState()) | 1116 | if (STATE_LOGIN_AUTHENTICATE == LLStartUp::getStartupState()) |
1111 | { | 1117 | { |
1112 | LL_DEBUGS("AppInit") << "STATE_LOGIN_AUTHENTICATE" << LL_ENDL; | 1118 | LL_DEBUGS("AppInitStartupState") << "STATE_LOGIN_AUTHENTICATE" << LL_ENDL; |
1113 | set_startup_status(progress, auth_desc, auth_message); | 1119 | set_startup_status(progress, auth_desc, auth_message); |
1114 | progress += 0.02f; | 1120 | progress += 0.02f; |
1115 | display_startup(); | 1121 | display_startup(); |
@@ -1186,7 +1192,7 @@ bool idle_startup() | |||
1186 | 1192 | ||
1187 | if(STATE_LOGIN_NO_DATA_YET == LLStartUp::getStartupState()) | 1193 | if(STATE_LOGIN_NO_DATA_YET == LLStartUp::getStartupState()) |
1188 | { | 1194 | { |
1189 | LL_DEBUGS("AppInit") << "STATE_LOGIN_NO_DATA_YET" << LL_ENDL; | 1195 | LL_DEBUGS("AppInitStartupState") << "STATE_LOGIN_NO_DATA_YET" << LL_ENDL; |
1190 | // If we get here we have gotten past the potential stall | 1196 | // If we get here we have gotten past the potential stall |
1191 | // in curl, so take "may appear frozen" out of progress bar. JC | 1197 | // in curl, so take "may appear frozen" out of progress bar. JC |
1192 | auth_desc = "Logging in..."; | 1198 | auth_desc = "Logging in..."; |
@@ -1211,7 +1217,7 @@ bool idle_startup() | |||
1211 | 1217 | ||
1212 | if(STATE_LOGIN_DOWNLOADING == LLStartUp::getStartupState()) | 1218 | if(STATE_LOGIN_DOWNLOADING == LLStartUp::getStartupState()) |
1213 | { | 1219 | { |
1214 | LL_DEBUGS("AppInit") << "STATE_LOGIN_DOWNLOADING" << LL_ENDL; | 1220 | LL_DEBUGS("AppInitStartupState") << "STATE_LOGIN_DOWNLOADING" << LL_ENDL; |
1215 | // Process messages to keep from dropping circuit. | 1221 | // Process messages to keep from dropping circuit. |
1216 | LLMessageSystem* msg = gMessageSystem; | 1222 | LLMessageSystem* msg = gMessageSystem; |
1217 | while (msg->checkAllMessages(gFrameCount, gServicePump)) | 1223 | while (msg->checkAllMessages(gFrameCount, gServicePump)) |
@@ -1232,7 +1238,7 @@ bool idle_startup() | |||
1232 | 1238 | ||
1233 | if(STATE_LOGIN_PROCESS_RESPONSE == LLStartUp::getStartupState()) | 1239 | if(STATE_LOGIN_PROCESS_RESPONSE == LLStartUp::getStartupState()) |
1234 | { | 1240 | { |
1235 | LL_DEBUGS("AppInit") << "STATE_LOGIN_PROCESS_RESPONSE" << LL_ENDL; | 1241 | LL_DEBUGS("AppInitStartupState") << "STATE_LOGIN_PROCESS_RESPONSE" << LL_ENDL; |
1236 | std::ostringstream emsg; | 1242 | std::ostringstream emsg; |
1237 | bool quit = false; | 1243 | bool quit = false; |
1238 | std::string login_response; | 1244 | std::string login_response; |
@@ -1724,6 +1730,7 @@ bool idle_startup() | |||
1724 | //--------------------------------------------------------------------- | 1730 | //--------------------------------------------------------------------- |
1725 | if (STATE_WORLD_INIT == LLStartUp::getStartupState()) | 1731 | if (STATE_WORLD_INIT == LLStartUp::getStartupState()) |
1726 | { | 1732 | { |
1733 | LL_DEBUGS("AppInitStartupState") << "STATE_WORLD_INIT" << LL_ENDL; | ||
1727 | set_startup_status(0.40f, LLTrans::getString("LoginInitializingWorld"), gAgent.mMOTD); | 1734 | set_startup_status(0.40f, LLTrans::getString("LoginInitializingWorld"), gAgent.mMOTD); |
1728 | gDisconnected=FALSE; | 1735 | gDisconnected=FALSE; |
1729 | display_startup(); | 1736 | display_startup(); |
@@ -1798,6 +1805,7 @@ bool idle_startup() | |||
1798 | //--------------------------------------------------------------------- | 1805 | //--------------------------------------------------------------------- |
1799 | if (STATE_MULTIMEDIA_INIT == LLStartUp::getStartupState()) | 1806 | if (STATE_MULTIMEDIA_INIT == LLStartUp::getStartupState()) |
1800 | { | 1807 | { |
1808 | LL_DEBUGS("AppInitStartupState") << "STATE_MULTIMEDIA_INIT" << LL_ENDL; | ||
1801 | LLStartUp::multimediaInit(); | 1809 | LLStartUp::multimediaInit(); |
1802 | LLStartUp::setStartupState( STATE_SEED_GRANTED_WAIT ); | 1810 | LLStartUp::setStartupState( STATE_SEED_GRANTED_WAIT ); |
1803 | return FALSE; | 1811 | return FALSE; |
@@ -1808,6 +1816,7 @@ bool idle_startup() | |||
1808 | //--------------------------------------------------------------------- | 1816 | //--------------------------------------------------------------------- |
1809 | if(STATE_SEED_GRANTED_WAIT == LLStartUp::getStartupState()) | 1817 | if(STATE_SEED_GRANTED_WAIT == LLStartUp::getStartupState()) |
1810 | { | 1818 | { |
1819 | LL_DEBUGS("AppInitStartupState") << "STATE_SEED_GRANTED_WAIT" << LL_ENDL; | ||
1811 | return FALSE; | 1820 | return FALSE; |
1812 | } | 1821 | } |
1813 | 1822 | ||
@@ -1818,6 +1827,7 @@ bool idle_startup() | |||
1818 | //--------------------------------------------------------------------- | 1827 | //--------------------------------------------------------------------- |
1819 | if (STATE_SEED_CAP_GRANTED == LLStartUp::getStartupState()) | 1828 | if (STATE_SEED_CAP_GRANTED == LLStartUp::getStartupState()) |
1820 | { | 1829 | { |
1830 | LL_DEBUGS("AppInitStartupState") << "STATE_SEED_CAP_GRANTED" << LL_ENDL; | ||
1821 | update_texture_fetch(); | 1831 | update_texture_fetch(); |
1822 | 1832 | ||
1823 | if ( gViewerWindow != NULL) | 1833 | if ( gViewerWindow != NULL) |
@@ -2065,9 +2075,12 @@ bool idle_startup() | |||
2065 | LLHUDManager::getInstance()->sendEffects(); | 2075 | LLHUDManager::getInstance()->sendEffects(); |
2066 | } | 2076 | } |
2067 | 2077 | ||
2078 | // Drop out if we can't connect after TIMEOUT_SECONDS -- MC | ||
2079 | connecting_region_timer.start(); | ||
2068 | LLStartUp::setStartupState( STATE_AGENT_WAIT ); // Go to STATE_AGENT_WAIT | 2080 | LLStartUp::setStartupState( STATE_AGENT_WAIT ); // Go to STATE_AGENT_WAIT |
2069 | 2081 | ||
2070 | timeout.reset(); | 2082 | timeout.reset(); |
2083 | |||
2071 | return FALSE; | 2084 | return FALSE; |
2072 | } | 2085 | } |
2073 | 2086 | ||
@@ -2076,6 +2089,22 @@ bool idle_startup() | |||
2076 | //--------------------------------------------------------------------- | 2089 | //--------------------------------------------------------------------- |
2077 | if (STATE_AGENT_WAIT == LLStartUp::getStartupState()) | 2090 | if (STATE_AGENT_WAIT == LLStartUp::getStartupState()) |
2078 | { | 2091 | { |
2092 | LL_DEBUGS("AppInitStartupState") << "STATE_AGENT_WAIT" << LL_ENDL; | ||
2093 | if (connecting_region_timer.getElapsedTimeF32() > TIMEOUT_SECONDS) | ||
2094 | { | ||
2095 | // Bounce back to the login screen -- MC | ||
2096 | LL_WARNS("AppInit") << "Bad login - can't connect to this region for some reason" << LL_ENDL; | ||
2097 | LLSD args; | ||
2098 | args["ERROR_MESSAGE"] = "Unable to connect to the current region. Try logging into a different region instead. The default login location can be set in the General tab in Preferences."; | ||
2099 | LLNotifications::instance().add("ErrorMessage", args, LLSD(), login_alert_done); | ||
2100 | LLStartUp::resetLogin(); | ||
2101 | gSavedSettings.setBOOL("AutoLogin", FALSE); | ||
2102 | //this might be redundant | ||
2103 | LLStartUp::setShouldAutoLogin(false); | ||
2104 | show_connect_box = true; | ||
2105 | connecting_region_timer.reset(); | ||
2106 | } | ||
2107 | |||
2079 | LLMessageSystem* msg = gMessageSystem; | 2108 | LLMessageSystem* msg = gMessageSystem; |
2080 | while (msg->checkAllMessages(gFrameCount, gServicePump)) | 2109 | while (msg->checkAllMessages(gFrameCount, gServicePump)) |
2081 | { | 2110 | { |
@@ -2098,6 +2127,7 @@ bool idle_startup() | |||
2098 | if (gAgentMovementCompleted) | 2127 | if (gAgentMovementCompleted) |
2099 | { | 2128 | { |
2100 | LLStartUp::setStartupState( STATE_INVENTORY_SEND ); | 2129 | LLStartUp::setStartupState( STATE_INVENTORY_SEND ); |
2130 | connecting_region_timer.reset(); | ||
2101 | } | 2131 | } |
2102 | 2132 | ||
2103 | return FALSE; | 2133 | return FALSE; |
@@ -2108,6 +2138,8 @@ bool idle_startup() | |||
2108 | //--------------------------------------------------------------------- | 2138 | //--------------------------------------------------------------------- |
2109 | if (STATE_INVENTORY_SEND == LLStartUp::getStartupState()) | 2139 | if (STATE_INVENTORY_SEND == LLStartUp::getStartupState()) |
2110 | { | 2140 | { |
2141 | LL_DEBUGS("AppInitStartupState") << "STATE_INVENTORY_SEND" << LL_ENDL; | ||
2142 | |||
2111 | // unpack thin inventory | 2143 | // unpack thin inventory |
2112 | LLUserAuth::options_t options; | 2144 | LLUserAuth::options_t options; |
2113 | options.clear(); | 2145 | options.clear(); |
@@ -2303,6 +2335,7 @@ bool idle_startup() | |||
2303 | //--------------------------------------------------------------------- | 2335 | //--------------------------------------------------------------------- |
2304 | if (STATE_MISC == LLStartUp::getStartupState()) | 2336 | if (STATE_MISC == LLStartUp::getStartupState()) |
2305 | { | 2337 | { |
2338 | LL_DEBUGS("AppInitStartupState") << "STATE_MISC" << LL_ENDL; | ||
2306 | // We have a region, and just did a big inventory download. | 2339 | // We have a region, and just did a big inventory download. |
2307 | // We can estimate the user's connection speed, and set their | 2340 | // We can estimate the user's connection speed, and set their |
2308 | // max bandwidth accordingly. JC | 2341 | // max bandwidth accordingly. JC |
@@ -2493,6 +2526,7 @@ bool idle_startup() | |||
2493 | 2526 | ||
2494 | if (STATE_PRECACHE == LLStartUp::getStartupState()) | 2527 | if (STATE_PRECACHE == LLStartUp::getStartupState()) |
2495 | { | 2528 | { |
2529 | LL_DEBUGS("AppInitStartupState") << "STATE_PRECACHE" << LL_ENDL; | ||
2496 | F32 timeout_frac = timeout.getElapsedTimeF32()/PRECACHING_DELAY; | 2530 | F32 timeout_frac = timeout.getElapsedTimeF32()/PRECACHING_DELAY; |
2497 | 2531 | ||
2498 | // We now have an inventory skeleton, so if this is a user's first | 2532 | // We now have an inventory skeleton, so if this is a user's first |
@@ -2535,7 +2569,7 @@ bool idle_startup() | |||
2535 | 2569 | ||
2536 | if (STATE_WEARABLES_WAIT == LLStartUp::getStartupState()) | 2570 | if (STATE_WEARABLES_WAIT == LLStartUp::getStartupState()) |
2537 | { | 2571 | { |
2538 | 2572 | LL_DEBUGS("AppInitStartupState") << "STATE_WEARABLES_WAIT" << LL_ENDL; | |
2539 | const F32 wearables_time = wearables_timer.getElapsedTimeF32(); | 2573 | const F32 wearables_time = wearables_timer.getElapsedTimeF32(); |
2540 | const F32 MAX_WEARABLES_TIME = 10.f; | 2574 | const F32 MAX_WEARABLES_TIME = 10.f; |
2541 | 2575 | ||
@@ -2595,6 +2629,7 @@ bool idle_startup() | |||
2595 | 2629 | ||
2596 | if (STATE_CLEANUP == LLStartUp::getStartupState()) | 2630 | if (STATE_CLEANUP == LLStartUp::getStartupState()) |
2597 | { | 2631 | { |
2632 | LL_DEBUGS("AppInitStartupState") << "STATE_CLEANUP" << LL_ENDL; | ||
2598 | set_startup_status(1.0, "", ""); | 2633 | set_startup_status(1.0, "", ""); |
2599 | 2634 | ||
2600 | LLFirstUse::ClientTags(); | 2635 | LLFirstUse::ClientTags(); |