diff options
| author | simon <none@none> | 2013-05-29 14:42:19 -0700 | 
|---|---|---|
| committer | simon <none@none> | 2013-05-29 14:42:19 -0700 | 
| commit | 507ce0d84fc3e7717c7c9ae58dcdae7785936f65 (patch) | |
| tree | a7dde82693b2297a27024a00624c1ec9f81c2d0c | |
| parent | 473474b94969799d2835191072c5bca1b7d431d8 (diff) | |
| parent | 3698aece0d2b396b55b46189e8ea7ee02da9483b (diff) | |
Merge downstream code
| -rwxr-xr-x | .hgtags | 1 | ||||
| -rwxr-xr-x | build.sh | 2 | ||||
| -rwxr-xr-x | doc/contributions.txt | 1 | ||||
| -rwxr-xr-x | indra/cmake/BuildVersion.cmake | 6 | ||||
| -rw-r--r-- | indra/llaudio/llaudioengine_fmodex.cpp | 3 | ||||
| -rwxr-xr-x | indra/llcommon/CMakeLists.txt | 1 | ||||
| -rwxr-xr-x | indra/llcommon/llcoros.cpp | 13 | ||||
| -rwxr-xr-x | indra/llcommon/llcoros.h | 6 | ||||
| -rwxr-xr-x | indra/llcommon/llstring.cpp | 17 | ||||
| -rwxr-xr-x | indra/llcommon/llstring.h | 1 | ||||
| -rwxr-xr-x | indra/llcommon/lluri.cpp | 29 | ||||
| -rwxr-xr-x | indra/llcommon/tests/lleventcoro_test.cpp | 37 | ||||
| -rwxr-xr-x | indra/llui/lltextbase.cpp | 6 | ||||
| -rwxr-xr-x | indra/newview/CMakeLists.txt | 6 | ||||
| -rw-r--r-- | indra/newview/VIEWER_VERSION.txt | 2 | ||||
| -rwxr-xr-x | indra/newview/app_settings/settings.xml | 22 | ||||
| -rwxr-xr-x | indra/newview/llappviewer.cpp | 12 | ||||
| -rwxr-xr-x | indra/newview/llmeshrepository.cpp | 1 | ||||
| -rwxr-xr-x | indra/newview/skins/default/xui/en/panel_preferences_setup.xml | 3 | ||||
| -rwxr-xr-x | indra/newview/viewer_manifest.py | 6 | 
20 files changed, 142 insertions, 33 deletions
| @@ -458,3 +458,4 @@ a314f1c94374ab1f6633dd2983f7090a68663eb2 3.5.2-beta4  895628bb5e162410cfdf4bca58f0a57d22ccfcde 3.5.2-beta5  9013c07bfe1c51107233f1924dccdcc5057dd909 3.5.2-beta6  9b1b6f33aa5394b27bb652b31b5cb81ef6060370 3.5.2-release +a277b841729f2a62ba1e34acacc964bc13c1ad6f 3.5.3-release @@ -357,7 +357,7 @@ then      else        upload_item installer "$package" binary/octet-stream        upload_item quicklink "$package" binary/octet-stream -      [ -f summary.json ] && upload_item installer summary.json text/plain +      [ -f $build_dir/summary.json ] && upload_item installer $build_dir/summary.json text/plain        case "$last_built_variant" in        Release) diff --git a/doc/contributions.txt b/doc/contributions.txt index 37344bc0d8..13d8099691 100755 --- a/doc/contributions.txt +++ b/doc/contributions.txt @@ -902,6 +902,7 @@ Nicky Dasmijn  	VWR-29228  	MAINT-873  	SUN-72 +	BUG-2432  	STORM-1935  	STORM-1936  	STORM-1937 diff --git a/indra/cmake/BuildVersion.cmake b/indra/cmake/BuildVersion.cmake index c494355746..0094e313c7 100755 --- a/indra/cmake/BuildVersion.cmake +++ b/indra/cmake/BuildVersion.cmake @@ -22,12 +22,12 @@ if (NOT DEFINED VIEWER_SHORT_VERSION) # will be true in indra/, false in indra/n                   OUTPUT_VARIABLE VIEWER_VERSION_REVISION                   OUTPUT_STRIP_TRAILING_WHITESPACE                   ) -              if (DEFINED VIEWER_VERSION_REVISION) +              if ("${VIEWER_VERSION_REVISION}" MATCHES "^[0-9]+$")                   message("Revision (from hg) ${VIEWER_VERSION_REVISION}") -              else (DEFINED VIEWER_VERSION_REVISION) +              else ("${VIEWER_VERSION_REVISION}" MATCHES "^[0-9]+$")                   set(VIEWER_VERSION_REVISION 0 )                   message("Revision not set, repository not found, using ${VIEWER_VERSION_REVISION}") -              endif (DEFINED VIEWER_VERSION_REVISION) +              endif ("${VIEWER_VERSION_REVISION}" MATCHES "^[0-9]+$")             else (DEFINED MERCURIAL)                set(VIEWER_VERSION_REVISION 0)                message("Revision not set, 'hg' not found (${MERCURIAL}), using ${VIEWER_VERSION_REVISION}") diff --git a/indra/llaudio/llaudioengine_fmodex.cpp b/indra/llaudio/llaudioengine_fmodex.cpp index fe6dedcd03..45fc3186f4 100644 --- a/indra/llaudio/llaudioengine_fmodex.cpp +++ b/indra/llaudio/llaudioengine_fmodex.cpp @@ -104,6 +104,9 @@ bool LLAudioEngine_FMODEX::init(const S32 num_channels, void* userdata)  	//if(Check_FMOD_Error(result, "FMOD::Memory_Initialize"))  	//	return false; +	// turn off non-error log spam to fmod.log (TODO: why do we even have an fmod.log if we don't link against log lib?) +	FMOD::Debug_SetLevel(FMOD_DEBUG_LEVEL_ERROR); +  	result = FMOD::System_Create(&mSystem);  	if(Check_FMOD_Error(result, "FMOD::System_Create"))  		return false; diff --git a/indra/llcommon/CMakeLists.txt b/indra/llcommon/CMakeLists.txt index c60fa45937..8eb0c6249d 100755 --- a/indra/llcommon/CMakeLists.txt +++ b/indra/llcommon/CMakeLists.txt @@ -339,6 +339,7 @@ if (LL_TESTS)    LL_ADD_INTEGRATION_TEST(reflection "" "${test_libs}")    LL_ADD_INTEGRATION_TEST(stringize "" "${test_libs}")    LL_ADD_INTEGRATION_TEST(lleventdispatcher "" "${test_libs}") +  LL_ADD_INTEGRATION_TEST(lleventcoro "" "${test_libs};${BOOST_CONTEXT_LIBRARY}")    LL_ADD_INTEGRATION_TEST(llprocess "" "${test_libs}")    LL_ADD_INTEGRATION_TEST(llleap "" "${test_libs}")    LL_ADD_INTEGRATION_TEST(llstreamqueue "" "${test_libs}") diff --git a/indra/llcommon/llcoros.cpp b/indra/llcommon/llcoros.cpp index 9122704306..a629f71d4b 100755 --- a/indra/llcommon/llcoros.cpp +++ b/indra/llcommon/llcoros.cpp @@ -39,7 +39,12 @@  #include "llerror.h"  #include "stringize.h" -LLCoros::LLCoros() +LLCoros::LLCoros(): +    // MAINT-2724: default coroutine stack size too small on Windows. +    // Previously we used +    // boost::context::guarded_stack_allocator::default_stacksize(); +    // empirically this is 64KB on Windows and Linux. Try quadrupling. +    mStackSize(256*1024)  {      // Register our cleanup() method for "mainloop" ticks      LLEventPumps::instance().obtain("mainloop").listen( @@ -125,6 +130,12 @@ std::string LLCoros::getNameByID(const void* self_id) const      return "";  } +void LLCoros::setStackSize(S32 stacksize) +{ +    LL_INFOS("LLCoros") << "Setting coroutine stack size to " << stacksize << LL_ENDL; +    mStackSize = stacksize; +} +  /*****************************************************************************  *   MUST BE LAST  *****************************************************************************/ diff --git a/indra/llcommon/llcoros.h b/indra/llcommon/llcoros.h index 03df406b68..01ee11da1a 100755 --- a/indra/llcommon/llcoros.h +++ b/indra/llcommon/llcoros.h @@ -125,7 +125,7 @@ public:      template <typename CALLABLE>      std::string launch(const std::string& prefix, const CALLABLE& callable)      { -        return launchImpl(prefix, new coro(callable)); +        return launchImpl(prefix, new coro(callable, mStackSize));      }      /** @@ -152,6 +152,9 @@ public:      /// getName() by self.get_id()      std::string getNameByID(const void* self_id) const; +    /// for delayed initialization +    void setStackSize(S32 stacksize); +  private:      friend class LLSingleton<LLCoros>;      LLCoros(); @@ -159,6 +162,7 @@ private:      std::string generateDistinctName(const std::string& prefix) const;      bool cleanup(const LLSD&); +    S32 mStackSize;      typedef boost::ptr_map<std::string, coro> CoroMap;      CoroMap mCoros;  }; diff --git a/indra/llcommon/llstring.cpp b/indra/llcommon/llstring.cpp index 0c32679744..22c8681983 100755 --- a/indra/llcommon/llstring.cpp +++ b/indra/llcommon/llstring.cpp @@ -52,6 +52,23 @@ std::string ll_safe_string(const char* in, S32 maxlen)  	return std::string();  } +bool is_char_hex(char hex) +{ +	if((hex >= '0') && (hex <= '9')) +	{ +		return true; +	} +	else if((hex >= 'a') && (hex <='f')) +	{ +		return true; +	} +	else if((hex >= 'A') && (hex <='F')) +	{ +		return true; +	} +	return false; // uh - oh, not hex any more... +} +  U8 hex_as_nybble(char hex)  {  	if((hex >= '0') && (hex <= '9')) diff --git a/indra/llcommon/llstring.h b/indra/llcommon/llstring.h index 119efc7957..f9702868c8 100755 --- a/indra/llcommon/llstring.h +++ b/indra/llcommon/llstring.h @@ -470,6 +470,7 @@ inline std::string chop_tail_copy(   * @brief This translates a nybble stored as a hex value from 0-f back   * to a nybble in the low order bits of the return byte.   */ +LL_COMMON_API bool is_char_hex(char hex);  LL_COMMON_API U8 hex_as_nybble(char hex);  /** diff --git a/indra/llcommon/lluri.cpp b/indra/llcommon/lluri.cpp index 21456a599b..37f5b3d6a3 100755 --- a/indra/llcommon/lluri.cpp +++ b/indra/llcommon/lluri.cpp @@ -129,11 +129,30 @@ std::string LLURI::unescape(const std::string& str)  		{  			++it;  			if(it == end) break; -			U8 c = hex_as_nybble(*it++); -			c = c << 4; -			if (it == end) break; -			c |= hex_as_nybble(*it); -			ostr.put((char)c); + +			if(is_char_hex(*it)) +			{ +				U8 c = hex_as_nybble(*it++); + +				c = c << 4; +				if (it == end) break; + +				if(is_char_hex(*it)) +				{ +					c |= hex_as_nybble(*it); +					ostr.put((char)c); +				} +				else +				{ +					ostr.put((char)c); +					ostr.put(*it); +				} +			} +			else +			{ +				ostr.put('%'); +				ostr.put(*it); +			}  		}  		else  		{ diff --git a/indra/llcommon/tests/lleventcoro_test.cpp b/indra/llcommon/tests/lleventcoro_test.cpp index 8d12529613..5ebde1a31d 100755 --- a/indra/llcommon/tests/lleventcoro_test.cpp +++ b/indra/llcommon/tests/lleventcoro_test.cpp @@ -78,6 +78,7 @@  #include "../test/lltut.h"  #include "llsd.h" +#include "llsdutil.h"  #include "llevents.h"  #include "tests/wrapllerrs.h"  #include "stringize.h" @@ -108,7 +109,7 @@ match_substring(BidirectionalIterator begin,  		BidirectionalIterator end,   		std::string xmatch,  		BOOST_DEDUCED_TYPENAME coroutine<BidirectionalIterator(void)>::self& self) {  -  BidirectionalIterator begin_ = begin; +//BidirectionalIterator begin_ = begin;    for(; begin != end; ++begin)       if(match(begin, end, xmatch)) {        self.yield(begin); @@ -213,7 +214,7 @@ namespace tut              BEGIN              {                  result = postAndWait(self, -                                     LLSD().insert("value", 17), // request event +                                     LLSDMap("value", 17),       // request event                                       immediateAPI.getPump(),     // requestPump                                       "reply1",                   // replyPump                                       "reply");                   // request["reply"] = name @@ -226,7 +227,7 @@ namespace tut              BEGIN              {                  LLEventWithID pair = ::postAndWait2(self, -                                                    LLSD().insert("value", 18), +                                                    LLSDMap("value", 18),                                                      immediateAPI.getPump(),                                                      "reply2",                                                      "error2", @@ -244,7 +245,7 @@ namespace tut              BEGIN              {                  LLEventWithID pair = ::postAndWait2(self, -                                                    LLSD().insert("value", 18).insert("fail", LLSD()), +                                                    LLSDMap("value", 18)("fail", LLSD()),                                                      immediateAPI.getPump(),                                                      "reply2",                                                      "error2", @@ -273,7 +274,7 @@ namespace tut              BEGIN              {                  LLCoroEventPump waiter; -                result = waiter.postAndWait(self, LLSD().insert("value", 17), +                result = waiter.postAndWait(self, LLSDMap("value", 17),                                              immediateAPI.getPump(), "reply");              }              END @@ -365,7 +366,7 @@ namespace tut              BEGIN              {                  LLCoroEventPumps waiter; -                LLEventWithID pair(waiter.postAndWait(self, LLSD().insert("value", 23), +                LLEventWithID pair(waiter.postAndWait(self, LLSDMap("value", 23),                                                        immediateAPI.getPump(), "reply", "error"));                  result = pair.first;                  which  = pair.second; @@ -379,7 +380,7 @@ namespace tut              {                  LLCoroEventPumps waiter;                  LLEventWithID pair( -                    waiter.postAndWait(self, LLSD().insert("value", 23).insert("fail", LLSD()), +                    waiter.postAndWait(self, LLSDMap("value", 23)("fail", LLSD()),                                         immediateAPI.getPump(), "reply", "error"));                  result = pair.first;                  which  = pair.second; @@ -392,7 +393,7 @@ namespace tut              BEGIN              {                  LLCoroEventPumps waiter; -                result = waiter.postAndWaitWithException(self, LLSD().insert("value", 8), +                result = waiter.postAndWaitWithException(self, LLSDMap("value", 8),                                                           immediateAPI.getPump(), "reply", "error");              }              END @@ -406,7 +407,7 @@ namespace tut                  try                  {                      result = waiter.postAndWaitWithException(self, -                        LLSD().insert("value", 9).insert("fail", LLSD()), +                        LLSDMap("value", 9)("fail", LLSD()),                          immediateAPI.getPump(), "reply", "error");                      debug("no exception");                  } @@ -424,7 +425,7 @@ namespace tut              BEGIN              {                  LLCoroEventPumps waiter; -                result = waiter.postAndWaitWithLog(self, LLSD().insert("value", 30), +                result = waiter.postAndWaitWithLog(self, LLSDMap("value", 30),                                                     immediateAPI.getPump(), "reply", "error");              }              END @@ -439,7 +440,7 @@ namespace tut                  try                  {                      result = waiter.postAndWaitWithLog(self, -                        LLSD().insert("value", 31).insert("fail", LLSD()), +                        LLSDMap("value", 31)("fail", LLSD()),                          immediateAPI.getPump(), "reply", "error");                      debug("no exception");                  } @@ -796,4 +797,18 @@ namespace tut          ensure("no result", result.isUndefined());          ensure_contains("got error", threw, "32");      } +} + +/*==========================================================================*| +#include <boost/context/guarded_stack_allocator.hpp> + +namespace tut +{ +    template<> template<> +    void object::test<23>() +    { +        set_test_name("stacksize"); +        std::cout << "default_stacksize: " << boost::context::guarded_stack_allocator::default_stacksize() << '\n'; +    }  } // namespace tut +|*==========================================================================*/ diff --git a/indra/llui/lltextbase.cpp b/indra/llui/lltextbase.cpp index b25f9b913c..df9ee4f4ca 100755 --- a/indra/llui/lltextbase.cpp +++ b/indra/llui/lltextbase.cpp @@ -3205,14 +3205,14 @@ S32	LLNormalTextSegment::getNumChars(S32 num_pixels, S32 segment_offset, S32 lin  	LLWString offsetString(text.c_str() + segment_offset + mStart);  	if(getLength() < segment_offset + mStart) -	{ -		llerrs << "getLength() < segment_offset + mStart\t getLength()\t" << getLength() << "\tsegment_offset:\t"  +	{  +		llinfos << "getLength() < segment_offset + mStart\t getLength()\t" << getLength() << "\tsegment_offset:\t"   						<< segment_offset << "\tmStart:\t" << mStart << "\tsegments\t" << mEditor.mSegments.size() << "\tmax_chars\t" << max_chars << llendl;  	}  	if(offsetString.length() + 1 < max_chars)  	{ -		llerrs << "offsetString.length() + 1 < max_chars\t max_chars:\t" << max_chars << "\toffsetString.length():\t" << offsetString.length() +		llinfos << "offsetString.length() + 1 < max_chars\t max_chars:\t" << max_chars << "\toffsetString.length():\t" << offsetString.length() << " getLength() : "  			<< getLength() << "\tsegment_offset:\t" << segment_offset << "\tmStart:\t" << mStart << "\tsegments\t" << mEditor.mSegments.size() << llendl;  	} diff --git a/indra/newview/CMakeLists.txt b/indra/newview/CMakeLists.txt index 42d010c6f5..f18abca101 100755 --- a/indra/newview/CMakeLists.txt +++ b/indra/newview/CMakeLists.txt @@ -1249,8 +1249,12 @@ set(viewer_HEADER_FILES  source_group("CMake Rules" FILES ViewerInstall.cmake) +# the viewer_version.txt file created here is for passing to viewer_manifest +# the summary.json file is created for the benefit of the TeamCity builds, where +#   it is used to provide descriptive information to the build results page  add_custom_target(generate_viewer_version ALL -                  COMMAND echo "${VIEWER_SHORT_VERSION}.${VIEWER_VERSION_REVISION}" > ${CMAKE_CURRENT_BINARY_DIR}/viewer_version.txt +                  COMMAND printf '${VIEWER_SHORT_VERSION}.${VIEWER_VERSION_REVISION}' > ${CMAKE_CURRENT_BINARY_DIR}/viewer_version.txt +                  COMMAND printf '{"Type":"viewer","Version":"${VIEWER_SHORT_VERSION}.${VIEWER_VERSION_REVISION}"}' > ${CMAKE_BINARY_DIR}/summary.json                    COMMENT Generating viewer_version.txt for manifest processing                    ) diff --git a/indra/newview/VIEWER_VERSION.txt b/indra/newview/VIEWER_VERSION.txt index 444877d48f..65afb3b886 100644 --- a/indra/newview/VIEWER_VERSION.txt +++ b/indra/newview/VIEWER_VERSION.txt @@ -1 +1 @@ -3.5.3 +3.5.4 diff --git a/indra/newview/app_settings/settings.xml b/indra/newview/app_settings/settings.xml index 7cb45559fa..aa38b9dc2a 100755 --- a/indra/newview/app_settings/settings.xml +++ b/indra/newview/app_settings/settings.xml @@ -1905,6 +1905,17 @@        <key>Value</key>        <integer>0</integer>      </map> +    <key>CoroutineStackSize</key> +    <map> +      <key>Comment</key> +      <string>Size (in bytes) for each coroutine stack</string> +      <key>Persist</key> +      <integer>0</integer> +      <key>Type</key> +      <string>S32</string> +      <key>Value</key> +      <integer>262144</integer> +    </map>      <key>CreateToolCopyCenters</key>      <map>        <key>Comment</key> @@ -12549,6 +12560,17 @@        <key>Value</key>        <string>update</string>      </map> +    <key>UpdaterWillingToTest</key> +    <map> +      <key>Comment</key> +      <string>Whether or not the updater should offer test candidate upgrades.</string> +      <key>Persist</key> +      <integer>1</integer> +      <key>Type</key> +      <string>Boolean</string> +      <key>Value</key> +      <string>1</string> +    </map>      <key>UploadBakedTexOld</key>      <map>        <key>Comment</key> diff --git a/indra/newview/llappviewer.cpp b/indra/newview/llappviewer.cpp index 8738829cae..de49fd54b4 100755 --- a/indra/newview/llappviewer.cpp +++ b/indra/newview/llappviewer.cpp @@ -118,6 +118,7 @@  #include "llleap.h"  #include "stringize.h" +#include "llcoros.h"  // Third party library includes  #include <boost/bind.hpp> @@ -756,6 +757,7 @@ bool LLAppViewer::init()  	//set the max heap size.  	initMaxHeapSize() ; +	LLCoros::instance().setStackSize(gSavedSettings.getS32("CoroutineStackSize"));  	LLPrivateMemoryPoolManager::initClass((BOOL)gSavedSettings.getBOOL("MemoryPrivatePoolEnabled"), (U32)gSavedSettings.getU32("MemoryPrivatePoolSize")*1024*1024) ; @@ -2811,6 +2813,16 @@ bool LLAppViewer::initConfiguration()  	loadColorSettings(); +	// Let anyone else who cares know that we've populated our settings +	// variables. +	for (LLControlGroup::key_iter ki(LLControlGroup::beginKeys()), kend(LLControlGroup::endKeys()); +		 ki != kend; ++ki) +	{ +		// For each named instance of LLControlGroup, send an event saying +		// we've initialized an LLControlGroup instance by that name. +		LLEventPumps::instance().obtain("LLControlGroup").post(LLSDMap("init", *ki)); +	} +  	return true; // Config was successful.  } diff --git a/indra/newview/llmeshrepository.cpp b/indra/newview/llmeshrepository.cpp index 83b7cae347..b30576171e 100755 --- a/indra/newview/llmeshrepository.cpp +++ b/indra/newview/llmeshrepository.cpp @@ -1237,6 +1237,7 @@ bool LLMeshRepoThread::headerReceived(const LLVolumeParams& mesh_params, U8* dat  			}  			mPendingLOD.erase(iter);  		} +		}  	}  	return true; diff --git a/indra/newview/skins/default/xui/en/panel_preferences_setup.xml b/indra/newview/skins/default/xui/en/panel_preferences_setup.xml index 2fb6a9fd40..dd4533ae74 100755 --- a/indra/newview/skins/default/xui/en/panel_preferences_setup.xml +++ b/indra/newview/skins/default/xui/en/panel_preferences_setup.xml @@ -237,8 +237,7 @@      enabled="true"      follows="left|top"      height="14" -    initial_value="true" -    control_name="UpdateWillingToTest" +    control_name="UpdaterWillingToTest"      label="Willing to update to release candidates"      left_delta="0"      mouse_opaque="true" diff --git a/indra/newview/viewer_manifest.py b/indra/newview/viewer_manifest.py index bc473f6d62..2578c81224 100755 --- a/indra/newview/viewer_manifest.py +++ b/indra/newview/viewer_manifest.py @@ -154,10 +154,8 @@ class ViewerManifest(LLManifest):              # Files in the newview/ directory              self.path("gpu_table.txt") - -            # The summary.json file gets left in the base checkout dir by -            # build.sh. It's only created for a build.sh build. -            if not self.path2basename(os.path.join(os.pardir, os.pardir), "summary.json"): +            # The summary.json file gets left in the build directory by newview/CMakeLists.txt. +            if not self.path2basename(os.pardir, "summary.json"):                  print "No summary.json file"      def grid(self): | 
