From ffec03515ec4c02a5170dadf03e0439e0297a857 Mon Sep 17 00:00:00 2001 From: Oz Linden Date: Wed, 15 May 2013 15:45:30 -0400 Subject: MAINT-2665: fix crashes being counted as wrong type in last_exec_event due to log macro wrapper --- indra/newview/llappviewer.cpp | 29 ++++++++++++++++------------- 1 file changed, 16 insertions(+), 13 deletions(-) (limited to 'indra/newview/llappviewer.cpp') diff --git a/indra/newview/llappviewer.cpp b/indra/newview/llappviewer.cpp index 7f56d7afdd..45a990f65f 100755 --- a/indra/newview/llappviewer.cpp +++ b/indra/newview/llappviewer.cpp @@ -3443,11 +3443,10 @@ void LLAppViewer::handleViewerCrash() //we're already in a crash situation if (gDirUtilp) { - std::string crash_file_name = ( gLLErrorActivated ) - ? gDirUtilp->getExpandedFilename(LL_PATH_LOGS,LLERROR_MARKER_FILE_NAME) - : gDirUtilp->getExpandedFilename(LL_PATH_LOGS,ERROR_MARKER_FILE_NAME); - LL_INFOS("MarkerFile") << "Creating crash marker file " << crash_file_name << LL_ENDL; - + std::string crash_file_name = gDirUtilp->getExpandedFilename(LL_PATH_LOGS, + gLLErrorActivated + ? LLERROR_MARKER_FILE_NAME + : ERROR_MARKER_FILE_NAME); LLAPRFile crash_file ; crash_file.open(crash_file_name, LL_APR_W); if (crash_file.getFileHandle()) @@ -3547,7 +3546,10 @@ void LLAppViewer::recordMarkerVersion(LLAPRFile& marker_file) std::string marker_version(LLVersionInfo::getChannelAndVersion()); if ( marker_version.length() > MAX_MARKER_LENGTH ) { - LL_WARNS_ONCE("MarkerFile") << "Version length ("<< marker_version.length()<< ") greater than maximum: marker matching may be incorrect" << LL_ENDL; + LL_WARNS_ONCE("MarkerFile") << "Version length ("<< marker_version.length()<< ")" + << " greater than maximum (" << MAX_MARKER_LENGTH << ")" + << ": marker matching may be incorrect" + << LL_ENDL; } // record the viewer version in the marker file @@ -3567,15 +3569,16 @@ bool LLAppViewer::markerIsSameVersion(const std::string& marker_name) const if (marker_file.getFileHandle()) { marker_version_length = marker_file.read(marker_version, sizeof(marker_version)); - LL_DEBUGS("MarkerFile") << "Compare markers: "; std::string marker_string(marker_version, marker_version_length); - LL_CONT << "\n mine '" << my_version << "'" - << "\n marker '" << marker_string << "'" - << LL_ENDL; if ( 0 == my_version.compare( 0, my_version.length(), marker_version, 0, marker_version_length ) ) { sameVersion = true; } + LL_DEBUGS("MarkerFile") << "Compare markers for '" << marker_name << "': " + << "\n mine '" << my_version << "'" + << "\n marker '" << marker_string << "'" + << "\n " << ( sameVersion ? "same" : "different" ) << " version" + << LL_ENDL; marker_file.close(); } return sameVersion; @@ -3686,7 +3689,7 @@ void LLAppViewer::initMarkerFile() void LLAppViewer::removeMarkerFile(bool leave_logout_marker) { - LL_DEBUGS("MarkerFile") << "removeMarkerFile("< Date: Thu, 23 May 2013 16:28:20 -0400 Subject: MAINT-2724: Make viewer explicitly set coroutine stack size. Introduce LLCoros::setStackSize(), with a compile-time default value we hope we never have to use. Make LLAppViewer call it with the value of the new settings variable CoroutineStackSize as soon as we've read settings files. (While we're at it, notify interested parties that we've read settings files.) Give CoroutineStackSize a default value four times the previous default stack size. Make LLCoros::launch() pass the saved stack size to each new coroutine instance. Re-enable lleventcoro integration test. Use LLSDMap() construct rather than LLSD::insert(), which used to return the modified object but is now void. --- indra/newview/llappviewer.cpp | 12 ++++++++++++ 1 file changed, 12 insertions(+) (limited to 'indra/newview/llappviewer.cpp') diff --git a/indra/newview/llappviewer.cpp b/indra/newview/llappviewer.cpp index 45a990f65f..fdc2cdb78d 100755 --- a/indra/newview/llappviewer.cpp +++ b/indra/newview/llappviewer.cpp @@ -117,6 +117,7 @@ #include "llleap.h" #include "stringize.h" +#include "llcoros.h" // Third party library includes #include @@ -755,6 +756,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) ; @@ -2810,6 +2812,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. } -- cgit v1.2.3