From cf0aa6981aa6769169900691d69bf3566dc42295 Mon Sep 17 00:00:00 2001 From: Xiaohong Bao Date: Fri, 22 Apr 2011 10:24:46 -0600 Subject: fix for sh-1420: the background image at startup is missing from mesh-development and viewer-beta. --- indra/newview/llpanellogin.cpp | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/indra/newview/llpanellogin.cpp b/indra/newview/llpanellogin.cpp index 7820ac3ecd..0bdbeefd2a 100644 --- a/indra/newview/llpanellogin.cpp +++ b/indra/newview/llpanellogin.cpp @@ -34,6 +34,7 @@ #include "llmd5.h" #include "llsecondlifeurls.h" #include "v4color.h" +#include "llversionviewer.h" #include "llappviewer.h" #include "llbutton.h" @@ -851,12 +852,20 @@ void LLPanelLogin::loadLoginPage() LLVersionInfo::getShortVersion().c_str(), LLVersionInfo::getBuild()); - char* curl_channel = curl_escape(LLVersionInfo::getChannel().c_str(), 0); + char* curl_channel ; char* curl_version = curl_escape(version.c_str(), 0); + if(strcmp(LLVersionInfo::getChannel().c_str(), LL_CHANNEL)) + { + curl_channel = curl_escape(LLVersionInfo::getChannel().c_str(), 0); + } + else //if LL_CHANNEL, direct it to "Second Life Beta Viewer". + { + curl_channel = curl_escape("Second Life Beta Viewer", 0); + } oStr << "&channel=" << curl_channel; oStr << "&version=" << curl_version; - + curl_free(curl_channel); curl_free(curl_version); -- cgit v1.2.3 From 873bd8ce26798fbea625b2323e7a84229ed92343 Mon Sep 17 00:00:00 2001 From: prep Date: Thu, 28 Apr 2011 14:22:11 -0400 Subject: Fix for SH-718 --- indra/newview/llfloatermodelpreview.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/indra/newview/llfloatermodelpreview.h b/indra/newview/llfloatermodelpreview.h index 186bf114d1..837484adb6 100644 --- a/indra/newview/llfloatermodelpreview.h +++ b/indra/newview/llfloatermodelpreview.h @@ -331,8 +331,8 @@ public: void setLoadState( U32 state ) { mLoadState = state; } U32 getLoadState() { return mLoadState; } - - void setResetJointFlag( bool state ) { mResetJoints = state; } + //setRestJointFlag: If an asset comes through that changes the joints, we want the reset to persist + void setResetJointFlag( bool state ) { if ( !mResetJoints ) mResetJoints = state; } bool getResetJointFlag( void ) { return mResetJoints; } LLVector3 getTranslationForJointOffset( std::string joint ); -- cgit v1.2.3 From d7954ba38f81172f0062ae55479aff0709615bdd Mon Sep 17 00:00:00 2001 From: Xiaohong Bao Date: Fri, 29 Apr 2011 15:23:03 -0600 Subject: fix for SH-688: Viewer crash when uploading a large .dae file and clicking the X button in upper right hand corner of the upload model floater on Mac Build --- indra/llprimitive/llmodel.cpp | 19 ++++-------------- indra/newview/llfloatermodelpreview.cpp | 34 ++++++++++++++++++++++++++++++++- indra/newview/llfloatermodelpreview.h | 8 +++++++- 3 files changed, 44 insertions(+), 17 deletions(-) diff --git a/indra/llprimitive/llmodel.cpp b/indra/llprimitive/llmodel.cpp index 5af1122451..794cdb83d5 100644 --- a/indra/llprimitive/llmodel.cpp +++ b/indra/llprimitive/llmodel.cpp @@ -232,27 +232,16 @@ LLModel::EModelStatus load_face_from_dom_triangles(std::vector& fa domPRef p = tri->getP(); domListOfUInts& idx = p->getValue(); - domListOfFloats v; - domListOfFloats tc; - domListOfFloats n; + domListOfFloats dummy ; + domListOfFloats& v = pos_source ? pos_source->getFloat_array()->getValue() : dummy ; + domListOfFloats& tc = tc_source ? tc_source->getFloat_array()->getValue() : dummy ; + domListOfFloats& n = norm_source ? norm_source->getFloat_array()->getValue() : dummy ; if (pos_source) { - v = pos_source->getFloat_array()->getValue(); face.mExtents[0].set(v[0], v[1], v[2]); face.mExtents[1].set(v[0], v[1], v[2]); } - - if (tc_source) - { - tc = tc_source->getFloat_array()->getValue(); - } - - if (norm_source) - { - n = norm_source->getFloat_array()->getValue(); - } - LLVolumeFace::VertexMapData::PointMap point_map; diff --git a/indra/newview/llfloatermodelpreview.cpp b/indra/newview/llfloatermodelpreview.cpp index c66b2255eb..ae0e1b7d46 100644 --- a/indra/newview/llfloatermodelpreview.cpp +++ b/indra/newview/llfloatermodelpreview.cpp @@ -104,6 +104,7 @@ //static S32 LLFloaterModelPreview::sUploadAmount = 10; LLFloaterModelPreview* LLFloaterModelPreview::sInstance = NULL; +std::list LLModelLoader::sActiveLoaderList; const S32 PREVIEW_BORDER_WIDTH = 2; const S32 PREVIEW_RESIZE_HANDLE_SIZE = S32(RESIZE_HANDLE_WIDTH * OO_SQRT2) + PREVIEW_BORDER_WIDTH; @@ -1087,6 +1088,15 @@ LLModelLoader::LLModelLoader( std::string filename, S32 lod, LLModelPreview* pre { mTrySLM = false; } + + assert_main_thread(); + sActiveLoaderList.push_back(this) ; +} + +LLModelLoader::~LLModelLoader() +{ + assert_main_thread(); + sActiveLoaderList.remove(this); } void stretch_extents(LLModel* model, LLMatrix4a& mat, LLVector4a& min, LLVector4a& max, BOOL& first_transform) @@ -1872,8 +1882,24 @@ bool LLModelLoader::loadFromSLM(const std::string& filename) return true; } +//static +bool LLModelLoader::isAlive(LLModelLoader* loader) +{ + if(!loader) + { + return false ; + } + + std::list::iterator iter = sActiveLoaderList.begin() ; + for(; iter != sActiveLoaderList.end() && (*iter) != loader; ++iter) ; + + return *iter == loader ; +} + void LLModelLoader::loadModelCallback() { + assert_main_thread(); + if (mPreview) { mPreview->loadModelCallback(mLod); @@ -1884,6 +1910,12 @@ void LLModelLoader::loadModelCallback() apr_sleep(100); } + //doubel check if "this" is valid before deleting it, in case it is aborted during running. + if(!isAlive(this)) + { + return ; + } + //cleanup model loader if (mPreview) { @@ -2693,7 +2725,7 @@ LLModelPreview::~LLModelPreview() if (mModelLoader) { delete mModelLoader; - mModelLoader->mPreview = NULL; + mModelLoader = NULL; } //*HACK : *TODO : turn this back on when we understand why this crashes //glodShutdown(); diff --git a/indra/newview/llfloatermodelpreview.h b/indra/newview/llfloatermodelpreview.h index 186bf114d1..192f84c221 100644 --- a/indra/newview/llfloatermodelpreview.h +++ b/indra/newview/llfloatermodelpreview.h @@ -80,7 +80,7 @@ public: BOOL mFirstTransform; LLVector3 mExtents[2]; bool mTrySLM; - + std::map > mModel; typedef std::vector > model_list; @@ -99,6 +99,8 @@ public: LLModelLoader( std::string filename, S32 lod, LLModelPreview* preview, JointTransformMap& jointMap, std::deque& jointsFromNodes ); + ~LLModelLoader() ; + virtual void run(); bool doLoadModel(); bool loadFromSLM(const std::string& filename); @@ -131,6 +133,10 @@ public: std::map mJointMap; JointTransformMap& mJointList; std::deque& mJointsFromNode; + +private: + static std::list sActiveLoaderList; + static bool isAlive(LLModelLoader* loader) ; }; class LLFloaterModelPreview : public LLFloater -- cgit v1.2.3