diff options
Diffstat (limited to 'indra/llcommon')
-rwxr-xr-x | indra/llcommon/llapp.cpp | 6 | ||||
-rwxr-xr-x | indra/llcommon/llcoros.cpp | 4 | ||||
-rwxr-xr-x | indra/llcommon/llerror.cpp | 5 | ||||
-rwxr-xr-x | indra/llcommon/llerror.h | 14 | ||||
-rwxr-xr-x | indra/llcommon/llerrorthread.cpp | 2 | ||||
-rwxr-xr-x | indra/llcommon/llsys.cpp | 11 |
6 files changed, 28 insertions, 14 deletions
diff --git a/indra/llcommon/llapp.cpp b/indra/llcommon/llapp.cpp index b66fc82250..67a98d5fb8 100755 --- a/indra/llcommon/llapp.cpp +++ b/indra/llcommon/llapp.cpp @@ -378,7 +378,7 @@ void LLApp::startErrorThread() // if(!mThreadErrorp) { -// llinfos << "Starting error thread" << llendl; + llinfos << "Starting error thread" << llendl; mThreadErrorp = new LLErrorThread(); mThreadErrorp->setUserData((void *) this); mThreadErrorp->start(); @@ -986,9 +986,9 @@ bool windows_post_minidump_callback(const wchar_t* dump_path, } llinfos << "generated minidump: " << LLApp::instance()->getMiniDumpFilename() << llendl; - // *NOTE:Mani - this code is stolen from LLApp, where its never actually used. + // *NOTE:Mani - this code is stolen from LLApp, where its never actually used. //OSMessageBox("Attach Debugger Now", "Error", OSMB_OK); - // *TODO: Translate the signals/exceptions into cross-platform stuff + // *TODO: Translate the signals/exceptions into cross-platform stuff // Windows implementation llinfos << "Entering Windows Exception Handler..." << llendl; diff --git a/indra/llcommon/llcoros.cpp b/indra/llcommon/llcoros.cpp index a629f71d4b..baaddcaed1 100755 --- a/indra/llcommon/llcoros.cpp +++ b/indra/llcommon/llcoros.cpp @@ -60,7 +60,7 @@ bool LLCoros::cleanup(const LLSD&) // since last tick? if (mi->second->exited()) { - LL_INFOS("LLCoros") << "LLCoros: cleaning up coroutine " << mi->first << LL_ENDL; + LL_INFOS("LLCoros") << "LLCoros: cleaning up coroutine " << mi->first << LL_ENDL; // The erase() call will invalidate its passed iterator value -- // so increment mi FIRST -- but pass its original value to // erase(). This is what postincrement is all about. @@ -94,7 +94,7 @@ std::string LLCoros::generateDistinctName(const std::string& prefix) const { if (mCoros.find(name) == mCoros.end()) { - LL_INFOS("LLCoros") << "LLCoros: launching coroutine " << name << LL_ENDL; + LL_INFOS("LLCoros") << "LLCoros: launching coroutine " << name << LL_ENDL; return name; } } diff --git a/indra/llcommon/llerror.cpp b/indra/llcommon/llerror.cpp index 9b0141eb76..5c8e6cca29 100755 --- a/indra/llcommon/llerror.cpp +++ b/indra/llcommon/llerror.cpp @@ -201,10 +201,7 @@ namespace { virtual void recordMessage(LLError::ELevel level, const std::string& message) { - llutf16string utf16str = - wstring_to_utf16str(utf8str_to_wstring(message)); - utf16str += '\n'; - OutputDebugString(utf16str.c_str()); + LL_WINDOWS_OUTPUT_DEBUG(wstring_to_utf16str(utf8str_to_wstring(message))); } }; #endif diff --git a/indra/llcommon/llerror.h b/indra/llcommon/llerror.h index b65b410153..08a5cd26df 100755 --- a/indra/llcommon/llerror.h +++ b/indra/llcommon/llerror.h @@ -283,6 +283,20 @@ typedef LLError::NoClassInfo _LL_CLASS_TO_LOG; #define LL_ENDL llendl #define LL_CONT (*_out) +// Short story: We don't want to enable this in release builds. +// +// Long story: ...because this call generates C++ exceptions +// which are handled and fine under the debugger, but instant death should they occur from +// within a coroutine's stackframe due to inherent limitations of Windows 32-bit SEH +// interacting with the fiber-based coroutine support used by boost. +// +// gmad BUG-2707/MAINT-2740 +#if LL_WINDOWS && defined(_DEBUG) + #define LL_WINDOWS_OUTPUT_DEBUG(a) OutputDebugString(utf8str_to_utf16str(a).c_str()), OutputDebugString("\n") +#else + #define LL_WINDOWS_OUTPUT_DEBUG(a) +#endif + /* Use this construct if you need to do computation in the middle of a message: diff --git a/indra/llcommon/llerrorthread.cpp b/indra/llcommon/llerrorthread.cpp index 4a0c8ef342..950fcd6e83 100755 --- a/indra/llcommon/llerrorthread.cpp +++ b/indra/llcommon/llerrorthread.cpp @@ -106,7 +106,7 @@ void LLErrorThread::run() // This thread sits and waits for the sole purpose // of waiting for the signal/exception handlers to flag the // application state as APP_STATUS_ERROR. - //llinfos << "thread_error - Waiting for an error" << llendl; + llinfos << "thread_error - Waiting for an error" << llendl; S32 counter = 0; #if !LL_WINDOWS diff --git a/indra/llcommon/llsys.cpp b/indra/llcommon/llsys.cpp index b8e8125e68..418c5763f8 100755 --- a/indra/llcommon/llsys.cpp +++ b/indra/llcommon/llsys.cpp @@ -1032,9 +1032,9 @@ LLMemoryInfo& LLMemoryInfo::refresh() { mStatsMap = loadStatsMap(); -// LL_DEBUGS("LLMemoryInfo") << "Populated mStatsMap:\n"; -// LLSDSerialize::toPrettyXML(mStatsMap, LL_CONT); -// LL_ENDL; + LL_DEBUGS("LLMemoryInfo") << "Populated mStatsMap:\n"; + LLSDSerialize::toPrettyXML(mStatsMap, LL_CONT); + LL_ENDL; return *this; } @@ -1385,7 +1385,7 @@ public: return false; } // Congratulations, we've hit a new low. :-P - +#if _DEBUG LL_INFOS("FrameWatcher") << ' '; if (! prevSize) { @@ -1398,6 +1398,9 @@ public: } LL_CONT << std::fixed << std::setprecision(1) << framerate << '\n' << LLMemoryInfo() << LL_ENDL; +#else + (void)prevSize; +#endif return false; } |