From 139aad333a8679b8d6dcf8d706e3f7c1a9998f62 Mon Sep 17 00:00:00 2001 From: Latif Khalifa Date: Wed, 30 Oct 2013 14:56:12 +0100 Subject: [PATCH 1/4] Looks like the older version of freetype has more sever issues. Revert "Downgraded freetype to 2.3.9 to avoid font issues in the newer version" This reverts commit 3284b77df213fe5a8518f2e6cf1bc33c42c91892. --- install.xml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/install.xml b/install.xml index 662b19f0e..2c02e94ba 100644 --- a/install.xml +++ b/install.xml @@ -540,9 +540,9 @@ windows64 md5sum - 17f6c6e1b2d404a1e039aa23445f446c + bfde86bbd84536448ac2a717ed1646d8 url - https://bitbucket.org/SingularityViewer/libraries/downloads/freetype-2.3.9-windows64-20131028.tar.bz2 + https://bitbucket.org/SingularityViewer/libraries/downloads/freetype-2.5.0.1-windows64-20131020.tar.bz2 From f1eab3f2c5ce3d9243235f36ca1895e8325bed29 Mon Sep 17 00:00:00 2001 From: Latif Khalifa Date: Wed, 30 Oct 2013 19:09:05 +0100 Subject: [PATCH 2/4] Added architecture fields to the crash report --- indra/newview/llappviewer.cpp | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/indra/newview/llappviewer.cpp b/indra/newview/llappviewer.cpp index 6be1d5c96..6449b376d 100644 --- a/indra/newview/llappviewer.cpp +++ b/indra/newview/llappviewer.cpp @@ -2625,7 +2625,11 @@ void LLAppViewer::writeSystemInfo() gDebugInfo["ClientInfo"]["MinorVersion"] = gVersionMinor; gDebugInfo["ClientInfo"]["PatchVersion"] = gVersionPatch; gDebugInfo["ClientInfo"]["BuildVersion"] = gVersionBuild; - +#if defined(_WIN64) || defined(__x86_64__) + gDebugInfo["ClientInfo"]["Architecture"] = "x86_64"; +#else + gDebugInfo["ClientInfo"]["Architecture"] = "i386"; +#endif gDebugInfo["CAFilename"] = gDirUtilp->getCAFile(); gDebugInfo["CPUInfo"]["CPUString"] = gSysCPU.getCPUString(); From 51d5984afac5f3736c9534dc570e7c80b64123f7 Mon Sep 17 00:00:00 2001 From: Latif Khalifa Date: Wed, 30 Oct 2013 19:10:17 +0100 Subject: [PATCH 3/4] Allocate half a megabyte that is freed just before minidump is written in the breakpad exception handler (Siana) --- indra/llcommon/llapp.cpp | 25 +++++++++++++++++++++---- 1 file changed, 21 insertions(+), 4 deletions(-) diff --git a/indra/llcommon/llapp.cpp b/indra/llcommon/llapp.cpp index 9be58c05b..b61654fdc 100644 --- a/indra/llcommon/llapp.cpp +++ b/indra/llcommon/llapp.cpp @@ -123,6 +123,8 @@ LLApp::LLApp() : mThreadErrorp(NULL) commonCtor(); } +static void* sCrashLoggerReserve = NULL; + void LLApp::commonCtor() { // Set our status to running @@ -148,6 +150,12 @@ void LLApp::commonCtor() sApplication = this; mExceptionHandler = 0; + +#if LL_WINDOWS + sCrashLoggerReserve = VirtualAlloc(NULL, 512*1024, MEM_COMMIT|MEM_RESERVE, PAGE_NOACCESS); +#else + sCrashLoggerReserve = malloc(512*1024); +#endif // initialize the buffer to write the minidump filename to // (this is used to avoid allocating memory in the crash handler) @@ -155,6 +163,16 @@ void LLApp::commonCtor() mCrashReportPipeStr = L"\\\\.\\pipe\\LLCrashReporterPipe"; } +static bool clear_CrashLoggerReserve_callback(void* context, EXCEPTION_POINTERS* exinfo, MDRawAssertionInfo* assertion) +{ +#if LL_WINDOWS + VirtualFree(sCrashLoggerReserve, 0, MEM_RELEASE); +#else + free(sCrashLoggerReserve); +#endif + return true; +} + LLApp::LLApp(LLErrorThread *error_thread) : mThreadErrorp(error_thread) { @@ -309,7 +327,7 @@ void LLApp::setupErrorHandling() { mExceptionHandler = new google_breakpad::ExceptionHandler( std::wstring(mDumpPath.begin(),mDumpPath.end()), //Dump path - 0, //dump filename + clear_CrashLoggerReserve_callback, windows_post_minidump_callback, 0, google_breakpad::ExceptionHandler::HANDLER_ALL); @@ -367,7 +385,7 @@ void LLApp::setupErrorHandling() if(installHandler && (mExceptionHandler == 0)) { - mExceptionHandler = new google_breakpad::ExceptionHandler(mDumpPath, 0, &unix_post_minidump_callback, 0, true, 0); + mExceptionHandler = new google_breakpad::ExceptionHandler(mDumpPath, clear_CrashLoggerReserve_callback, &unix_post_minidump_callback, 0, true, 0); } #elif LL_LINUX if(installHandler && (mExceptionHandler == 0)) @@ -377,8 +395,7 @@ void LLApp::setupErrorHandling() mDumpPath = "/tmp"; } google_breakpad::MinidumpDescriptor desc(mDumpPath); - //mExceptionHandler = new google_breakpad::ExceptionHandler(desc, 0, unix_minidump_callback, 0, true, 0); - mExceptionHandler = new google_breakpad::ExceptionHandler(desc, NULL, unix_minidump_callback, NULL, true, -1); + mExceptionHandler = new google_breakpad::ExceptionHandler(desc, clear_CrashLoggerReserve_callback, unix_minidump_callback, NULL, true, -1); } #endif From 8dab5df7461826fef728fb48db1b49f3a393b287 Mon Sep 17 00:00:00 2001 From: Latif Khalifa Date: Thu, 31 Oct 2013 02:10:57 +0100 Subject: [PATCH 4/4] Revert "Prevent LLFace::getGeometryVolume from overwriting vbos past their end." This reverts commit 02067f973ec7fee8bbc85235e44b42a8ac1cd1ba. --- indra/newview/llface.cpp | 24 +----------------------- 1 file changed, 1 insertion(+), 23 deletions(-) diff --git a/indra/newview/llface.cpp b/indra/newview/llface.cpp index d248a7371..0a885d305 100644 --- a/indra/newview/llface.cpp +++ b/indra/newview/llface.cpp @@ -1189,21 +1189,6 @@ BOOL LLFace::getGeometryVolume(const LLVolume& volume, } - // The volume face vf can have more indices/vertices than this face. All striders below are aquired with a size of this face, but then written with num_verices/num_indices values, - // thus overflowing the buffer when vf holds more data. - // We can either clamp num_* down like here, or aquire all striders not using the face size, but the size if vf (that is swapping out mGeomCount with num_vertices and mIndicesCout with num_indices - // in all calls to nVertbuffer->get*Strider(...). Final solution is to just return FALSE and be done with it. - // - // The correct poison of choice is debatable, either copying not all data of vf (clamping) or writing more data than this face claims to have (aquiring bigger striders). Returning will not display this face at all. - // - // clamping it is for now. - - num_vertices = llclamp( num_vertices, (S32)0, (S32)mGeomCount ); - num_indices = llclamp( num_indices, (S32)0, (S32)mIndicesCount ); - - // - - //don't use map range (generates many redundant unmap calls) bool map_range = false; //gGLManager.mHasMapBufferRange || gGLManager.mHasFlushBufferRange; @@ -1659,14 +1644,7 @@ BOOL LLFace::getGeometryVolume(const LLVolume& volume, if (!do_xform) { LLFastTimer t(FTM_FACE_TEX_QUICK_NO_XFORM); - - // Don't round up, or there's high risk to write past buffer - - // S32 tc_size = (num_vertices*2*sizeof(F32)+0xF) & ~0xF; - S32 tc_size = (num_vertices*2*sizeof(F32)); - - // - + S32 tc_size = (num_vertices*2*sizeof(F32)+0xF) & ~0xF; LLVector4a::memcpyNonAliased16((F32*) tex_coords0.get(), (F32*) vf.mTexCoords, tc_size); } else