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') 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, 16 May 2013 12:45:19 -0700 Subject: NORSPEC-189 return to inefficient material update reg to avoid crashes from brundlefly solution with old reg and new callback --- indra/newview/llvovolume.cpp | 20 +++++++++++--------- indra/newview/llvovolume.h | 2 +- 2 files changed, 12 insertions(+), 10 deletions(-) (limited to 'indra/newview') diff --git a/indra/newview/llvovolume.cpp b/indra/newview/llvovolume.cpp index a9b540507f..92ee36d205 100755 --- a/indra/newview/llvovolume.cpp +++ b/indra/newview/llvovolume.cpp @@ -1973,14 +1973,16 @@ S32 LLVOVolume::setTEGlow(const U8 te, const F32 glow) return res; } -void LLVOVolume::setTEMaterialParamsCallback(const LLMaterialID &pMaterialID, const LLMaterialPtr pMaterialParams, U32 te) -{ - LL_DEBUGS("MaterialTEs") << "materialid " << pMaterialID.asString() << " to TE " << te << LL_ENDL; - LLTextureEntry* texture_entry = getTE(te); - if (texture_entry && (texture_entry->getMaterialID().isNull() || (texture_entry->getMaterialID() == pMaterialID))) - { - setTEMaterialParams(te, pMaterialParams); - } +void LLVOVolume::setTEMaterialParamsCallback(const LLMaterialID &pMaterialID, const LLMaterialPtr pMaterialParams) +{ + LL_DEBUGS("MaterialTEs") << "materialid " << pMaterialID.asString() << LL_ENDL; + for (U8 i = 0; i < getNumTEs(); i++) + { + if (getTE(i) && (getTE(i)->getMaterialID().isNull() || (getTE(i)->getMaterialID() == pMaterialID))) + { + setTEMaterialParams(i, pMaterialParams); + } + } } S32 LLVOVolume::setTEMaterialID(const U8 te, const LLMaterialID& pMaterialID) @@ -1993,7 +1995,7 @@ S32 LLVOVolume::setTEMaterialID(const U8 te, const LLMaterialID& pMaterialID) LL_DEBUGS("MaterialTEs") << " " << pMaterialID.asString() << LL_ENDL; if (res) { - LLMaterialMgr::instance().getTE(getRegion()->getRegionID(), pMaterialID, te, boost::bind(&LLVOVolume::setTEMaterialParamsCallback, this, _1, _2, _3)); + LLMaterialMgr::instance().get(getRegion()->getRegionID(), pMaterialID, boost::bind(&LLVOVolume::setTEMaterialParamsCallback, this, _1, _2)); setChanged(TEXTURE); if (!mDrawable.isNull()) { diff --git a/indra/newview/llvovolume.h b/indra/newview/llvovolume.h index a5f933c319..d1bfefdc70 100755 --- a/indra/newview/llvovolume.h +++ b/indra/newview/llvovolume.h @@ -187,7 +187,7 @@ public: /*virtual*/ S32 setTEMediaFlags(const U8 te, const U8 media_flags); /*virtual*/ S32 setTEGlow(const U8 te, const F32 glow); /*virtual*/ S32 setTEMaterialID(const U8 te, const LLMaterialID& pMaterialID); - void setTEMaterialParamsCallback(const LLMaterialID& pMaterialID, const LLMaterialPtr pMaterialParams, U32 te); + void setTEMaterialParamsCallback(const LLMaterialID& pMaterialID, const LLMaterialPtr pMaterialParams); /*virtual*/ S32 setTEMaterialParams(const U8 te, const LLMaterialPtr pMaterialParams); /*virtual*/ S32 setTEScale(const U8 te, const F32 s, const F32 t); /*virtual*/ S32 setTEScaleS(const U8 te, const F32 s); -- cgit v1.2.3 From 69e680a37ca9353cd33c058b8984cfc13e7b4ff4 Mon Sep 17 00:00:00 2001 From: Graham Madarasz Date: Thu, 16 May 2013 13:42:20 -0700 Subject: Merge beta fixes --- indra/newview/llvovolume.cpp | 23 ++++++++++++----------- indra/newview/llvovolume.h | 2 +- 2 files changed, 13 insertions(+), 12 deletions(-) (limited to 'indra/newview') diff --git a/indra/newview/llvovolume.cpp b/indra/newview/llvovolume.cpp index 92ee36d205..c3c6747e99 100755 --- a/indra/newview/llvovolume.cpp +++ b/indra/newview/llvovolume.cpp @@ -1973,16 +1973,17 @@ S32 LLVOVolume::setTEGlow(const U8 te, const F32 glow) return res; } -void LLVOVolume::setTEMaterialParamsCallback(const LLMaterialID &pMaterialID, const LLMaterialPtr pMaterialParams) -{ - LL_DEBUGS("MaterialTEs") << "materialid " << pMaterialID.asString() << LL_ENDL; - for (U8 i = 0; i < getNumTEs(); i++) - { - if (getTE(i) && (getTE(i)->getMaterialID().isNull() || (getTE(i)->getMaterialID() == pMaterialID))) - { - setTEMaterialParams(i, pMaterialParams); - } - } +void LLVOVolume::setTEMaterialParamsCallback(const LLMaterialID &pMaterialID, const LLMaterialPtr pMaterialParams, U32 te) +{ + LL_DEBUGS("MaterialTEs") << "materialid " << pMaterialID.asString() << " to TE " << te << LL_ENDL; + if (te >= getNumTEs()) + return; + + LLTextureEntry* texture_entry = getTE(te); + if (texture_entry) + { + setTEMaterialParams(te, pMaterialParams); + } } S32 LLVOVolume::setTEMaterialID(const U8 te, const LLMaterialID& pMaterialID) @@ -1995,7 +1996,7 @@ S32 LLVOVolume::setTEMaterialID(const U8 te, const LLMaterialID& pMaterialID) LL_DEBUGS("MaterialTEs") << " " << pMaterialID.asString() << LL_ENDL; if (res) { - LLMaterialMgr::instance().get(getRegion()->getRegionID(), pMaterialID, boost::bind(&LLVOVolume::setTEMaterialParamsCallback, this, _1, _2)); + LLMaterialMgr::instance().getTE(getRegion()->getRegionID(), pMaterialID, te, boost::bind(&LLVOVolume::setTEMaterialParamsCallback, this, _1, _2, _3)); setChanged(TEXTURE); if (!mDrawable.isNull()) { diff --git a/indra/newview/llvovolume.h b/indra/newview/llvovolume.h index d1bfefdc70..a5f933c319 100755 --- a/indra/newview/llvovolume.h +++ b/indra/newview/llvovolume.h @@ -187,7 +187,7 @@ public: /*virtual*/ S32 setTEMediaFlags(const U8 te, const U8 media_flags); /*virtual*/ S32 setTEGlow(const U8 te, const F32 glow); /*virtual*/ S32 setTEMaterialID(const U8 te, const LLMaterialID& pMaterialID); - void setTEMaterialParamsCallback(const LLMaterialID& pMaterialID, const LLMaterialPtr pMaterialParams); + void setTEMaterialParamsCallback(const LLMaterialID& pMaterialID, const LLMaterialPtr pMaterialParams, U32 te); /*virtual*/ S32 setTEMaterialParams(const U8 te, const LLMaterialPtr pMaterialParams); /*virtual*/ S32 setTEScale(const U8 te, const F32 s, const F32 t); /*virtual*/ S32 setTEScaleS(const U8 te, const F32 s); -- cgit v1.2.3