From e8818a3677f8af440456abec77cf31e7621fb9fa Mon Sep 17 00:00:00 2001 From: AndreyL ProductEngine Date: Thu, 16 Nov 2017 22:59:55 +0200 Subject: MAINT-8154 Disabled exception handling in LLAppViewer::frame() to get proper call stacks --- indra/newview/llappviewer.cpp | 94 ++++++++++++++++---------------------- indra/newview/llappviewer.h | 4 ++ indra/newview/llfloatermemleak.cpp | 7 ++- 3 files changed, 49 insertions(+), 56 deletions(-) (limited to 'indra') diff --git a/indra/newview/llappviewer.cpp b/indra/newview/llappviewer.cpp index 3f4a111a9a..cbe3af5c76 100644 --- a/indra/newview/llappviewer.cpp +++ b/indra/newview/llappviewer.cpp @@ -359,6 +359,8 @@ BOOL gCrashOnStartup = FALSE; BOOL gLLErrorActivated = FALSE; BOOL gLogoutInProgress = FALSE; +BOOL gSimulateMemLeak = FALSE; + //////////////////////////////////////////////////////////// // Internal globals... that should be removed. static std::string gArgs; @@ -1325,6 +1327,35 @@ static LLTrace::BlockTimerStatHandle FTM_AGENT_UPDATE("Update"); LLTrace::BlockTimerStatHandle FTM_FRAME("Frame"); bool LLAppViewer::frame() +{ + bool ret = false; + + if (gSimulateMemLeak) + { + try + { + ret = doFrame(); + } + catch (std::bad_alloc) + { + LLMemory::logMemoryInfo(TRUE); + LLFloaterMemLeak* mem_leak_instance = LLFloaterReg::findTypedInstance("mem_leaking"); + if (mem_leak_instance) + { + mem_leak_instance->stop(); + } + LL_WARNS() << "Bad memory allocation in LLAppViewer::frame()!" << LL_ENDL; + } + } + else + { + ret = doFrame(); + } + + return ret; +} + +bool LLAppViewer::doFrame() { LLEventPump& mainloop(LLEventPumps::instance().obtain("mainloop")); LLSD newFrame; @@ -1346,7 +1377,6 @@ bool LLAppViewer::frame() //check memory availability information checkMemory() ; - try { pingMainloopTimeout("Main:MiscNativeWindowEvents"); @@ -1370,12 +1400,15 @@ bool LLAppViewer::frame() } //memory leaking simulation - LLFloaterMemLeak* mem_leak_instance = - LLFloaterReg::findTypedInstance("mem_leaking"); - if(mem_leak_instance) + if (gSimulateMemLeak) { - mem_leak_instance->idle() ; - } + LLFloaterMemLeak* mem_leak_instance = + LLFloaterReg::findTypedInstance("mem_leaking"); + if (mem_leak_instance) + { + mem_leak_instance->idle(); + } + } // canonical per-frame event mainloop.post(newFrame); @@ -1550,60 +1583,13 @@ bool LLAppViewer::frame() pingMainloopTimeout("Main:End"); } } - catch (const LLContinueError&) - { - LOG_UNHANDLED_EXCEPTION(""); - } - catch(std::bad_alloc) - { - LLMemory::logMemoryInfo(TRUE) ; - - //stop memory leaking simulation - LLFloaterMemLeak* mem_leak_instance = - LLFloaterReg::findTypedInstance("mem_leaking"); - if(mem_leak_instance) - { - mem_leak_instance->stop() ; - LL_WARNS() << "Bad memory allocation in LLAppViewer::frame()!" << LL_ENDL ; - } - else - { - //output possible call stacks to log file. - LLError::LLCallStacks::print() ; - - LL_ERRS() << "Bad memory allocation in LLAppViewer::frame()!" << LL_ENDL ; - } - } - catch (...) - { - CRASH_ON_UNHANDLED_EXCEPTION(""); - } if (LLApp::isExiting()) { // Save snapshot for next time, if we made it through initialization if (STATE_STARTED == LLStartUp::getStartupState()) { - try - { - saveFinalSnapshot(); - } - catch(std::bad_alloc) - { - LL_WARNS() << "Bad memory allocation when saveFinalSnapshot() is called!" << LL_ENDL ; - - //stop memory leaking simulation - LLFloaterMemLeak* mem_leak_instance = - LLFloaterReg::findTypedInstance("mem_leaking"); - if(mem_leak_instance) - { - mem_leak_instance->stop() ; - } - } - catch (...) - { - CRASH_ON_UNHANDLED_EXCEPTION("saveFinalSnapshot()"); - } + saveFinalSnapshot(); } delete gServicePump; diff --git a/indra/newview/llappviewer.h b/indra/newview/llappviewer.h index 52d2bce42b..6ea0273874 100644 --- a/indra/newview/llappviewer.h +++ b/indra/newview/llappviewer.h @@ -223,6 +223,8 @@ protected: private: + bool doFrame(); + void initMaxHeapSize(); bool initThreads(); // Initialize viewer threads, return false on failure. bool initConfiguration(); // Initialize settings from the command line/config file. @@ -414,4 +416,6 @@ extern LLUUID gBlackSquareID; extern BOOL gRandomizeFramerate; extern BOOL gPeriodicSlowFrame; +extern BOOL gSimulateMemLeak; + #endif // LL_LLAPPVIEWER_H diff --git a/indra/newview/llfloatermemleak.cpp b/indra/newview/llfloatermemleak.cpp index 9edfe1e354..c43526acaf 100644 --- a/indra/newview/llfloatermemleak.cpp +++ b/indra/newview/llfloatermemleak.cpp @@ -42,6 +42,8 @@ U32 LLFloaterMemLeak::sTotalLeaked = 0 ; S32 LLFloaterMemLeak::sStatus = LLFloaterMemLeak::STOP ; BOOL LLFloaterMemLeak::sbAllocationFailed = FALSE ; +extern BOOL gSimulateMemLeak; + LLFloaterMemLeak::LLFloaterMemLeak(const LLSD& key) : LLFloater(key) { @@ -104,6 +106,7 @@ void LLFloaterMemLeak::release() sStatus = STOP ; sTotalLeaked = 0 ; sbAllocationFailed = FALSE ; + gSimulateMemLeak = FALSE; } void LLFloaterMemLeak::stop() @@ -140,8 +143,7 @@ void LLFloaterMemLeak::idle() } if(!p) { - sStatus = STOP ; - sbAllocationFailed = TRUE ; + stop(); } } @@ -181,6 +183,7 @@ void LLFloaterMemLeak::onChangeMaxMemLeaking() void LLFloaterMemLeak::onClickStart() { sStatus = START ; + gSimulateMemLeak = TRUE; } void LLFloaterMemLeak::onClickStop() -- cgit v1.2.3 From 0af4e93e7611485b33aec27bd49749c0226dbf29 Mon Sep 17 00:00:00 2001 From: Mnikolenko Productengine Date: Tue, 9 Jan 2018 14:12:00 +0200 Subject: MAINT-8157 Crash in LLWearableBridge::buildContextMenu(..) --- indra/newview/llinventorybridge.cpp | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) (limited to 'indra') diff --git a/indra/newview/llinventorybridge.cpp b/indra/newview/llinventorybridge.cpp index 3acfaeb049..67b51f11b3 100644 --- a/indra/newview/llinventorybridge.cpp +++ b/indra/newview/llinventorybridge.cpp @@ -6588,11 +6588,9 @@ void LLWearableBridge::buildContextMenu(LLMenuGL& menu, U32 flags) getClipboardEntries(true, items, disabled_items, flags); items.push_back(std::string("Wearable And Object Separator")); - items.push_back(std::string("Wearable Edit")); - bool modifiable = !gAgentWearables.isWearableModifiable(item->getUUID()); - if (((flags & FIRST_SELECTED_ITEM) == 0) || modifiable) + if (((flags & FIRST_SELECTED_ITEM) == 0) || (item && !gAgentWearables.isWearableModifiable(item->getUUID()))) { disabled_items.push_back(std::string("Wearable Edit")); } -- cgit v1.2.3 From fadb3792caa5279d3521dcaad44a6211bfa4bfad Mon Sep 17 00:00:00 2001 From: andreykproductengine Date: Tue, 9 Jan 2018 20:31:21 +0200 Subject: MAINT-8146 Fixed Installing viewer to non default path results in incorrect fonts loading --- indra/llrender/llfontfreetype.cpp | 64 +++++++++++++++++++++++++++++++++++++-- indra/llrender/llfontfreetype.h | 2 ++ indra/llrender/llfontregistry.cpp | 2 +- 3 files changed, 65 insertions(+), 3 deletions(-) (limited to 'indra') diff --git a/indra/llrender/llfontfreetype.cpp b/indra/llrender/llfontfreetype.cpp index de26d19efc..5c1f4ff8b3 100644 --- a/indra/llrender/llfontfreetype.cpp +++ b/indra/llrender/llfontfreetype.cpp @@ -106,6 +106,8 @@ LLFontFreetype::LLFontFreetype() mAscender(0.f), mDescender(0.f), mLineHeight(0.f), + pFontBuffer(NULL), + mBufferSize(0), mIsFallback(FALSE), mFTFace(NULL), mRenderGlyphCount(0), @@ -128,6 +130,8 @@ LLFontFreetype::~LLFontFreetype() mCharGlyphInfoMap.clear(); delete mFontBitmapCachep; + delete pFontBuffer; + disclaimMem(mBufferSize); // mFallbackFonts cleaned up by LLPointer destructor } @@ -143,13 +147,64 @@ BOOL LLFontFreetype::loadFace(const std::string& filename, F32 point_size, F32 v int error; +#ifdef LL_WINDOWS + + if (mBufferSize > 0) + { + delete pFontBuffer; + disclaimMem(mBufferSize); + pFontBuffer = NULL; + mBufferSize = 0; + } + + S32 file_size = 0; + LLFILE* file = LLFile::fopen(filename, "rb"); + if (!file) + { + return FALSE; + } + + if (!fseek(file, 0, SEEK_END)) + { + file_size = ftell(file); + fseek(file, 0, SEEK_SET); + } + + // Don't delete before FT_Done_Face + pFontBuffer = new(std::nothrow) U8[file_size]; + if (!pFontBuffer) + { + fclose(file); + return FALSE; + } + + mBufferSize = fread(pFontBuffer, 1, file_size, file); + fclose(file); + + if (mBufferSize != file_size) + { + delete pFontBuffer; + mBufferSize = 0; + return FALSE; + } + + error = FT_New_Memory_Face( gFTLibrary, + (FT_Byte*) pFontBuffer, + mBufferSize, + 0, + &mFTFace); +#else error = FT_New_Face( gFTLibrary, filename.c_str(), 0, - &mFTFace ); + &mFTFace); +#endif - if (error) + if (error) { + delete pFontBuffer; + pFontBuffer = NULL; + mBufferSize = 0; return FALSE; } @@ -166,10 +221,15 @@ BOOL LLFontFreetype::loadFace(const std::string& filename, F32 point_size, F32 v { // Clean up freetype libs. FT_Done_Face(mFTFace); + delete pFontBuffer; + pFontBuffer = NULL; + mBufferSize = 0; mFTFace = NULL; return FALSE; } + claimMem(mBufferSize); + F32 y_max, y_min, x_max, x_min; F32 ems_per_unit = 1.f/ mFTFace->units_per_EM; F32 pixels_per_unit = pixels_per_em * ems_per_unit; diff --git a/indra/llrender/llfontfreetype.h b/indra/llrender/llfontfreetype.h index a5ece42b88..26ba695418 100644 --- a/indra/llrender/llfontfreetype.h +++ b/indra/llrender/llfontfreetype.h @@ -158,6 +158,8 @@ private: F32 mLineHeight; LLFT_Face mFTFace; + U8* pFontBuffer; + S32 mBufferSize; BOOL mIsFallback; font_vector_t mFallbackFonts; // A list of fallback fonts to look for glyphs in (for Unicode chars) diff --git a/indra/llrender/llfontregistry.cpp b/indra/llrender/llfontregistry.cpp index d003687415..3c829596ce 100644 --- a/indra/llrender/llfontregistry.cpp +++ b/indra/llrender/llfontregistry.cpp @@ -447,7 +447,7 @@ LLFontGL *LLFontRegistry::createFont(const LLFontDescriptor& desc) if (!fontp->loadFace(font_path, extra_scale * point_size, LLFontGL::sVertDPI, LLFontGL::sHorizDPI, 2, is_fallback)) { - LL_INFOS_ONCE("LLFontRegistry") << "Couldn't load font " << *file_name_it << LL_ENDL; + LL_INFOS_ONCE("LLFontRegistry") << "Couldn't load font " << *file_name_it << " from path " << local_path << LL_ENDL; delete fontp; fontp = NULL; } -- cgit v1.2.3 From 3cf0d2b635ae04ca6d3c5a77f7cd3aca11444dcf Mon Sep 17 00:00:00 2001 From: andreykproductengine Date: Wed, 10 Jan 2018 18:51:20 +0200 Subject: MAINT-8167 Fixed uploading JPEG image from Unicode directory fails --- indra/llimage/llimagedimensionsinfo.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'indra') diff --git a/indra/llimage/llimagedimensionsinfo.cpp b/indra/llimage/llimagedimensionsinfo.cpp index a5e546e977..97b543f3b6 100644 --- a/indra/llimage/llimagedimensionsinfo.cpp +++ b/indra/llimage/llimagedimensionsinfo.cpp @@ -163,7 +163,7 @@ bool LLImageDimensionsInfo::getImageDimensionsJpeg() { sJpegErrorEncountered = false; clean(); - FILE *fp = fopen (mSrcFilename.c_str(), "rb"); + FILE *fp = LLFile::fopen(mSrcFilename, "rb"); if (fp == NULL) { setLastError("Unable to open file for reading", mSrcFilename); -- cgit v1.2.3 From ae95759bcf70e900d822bc8a80f3eda36de2bdf7 Mon Sep 17 00:00:00 2001 From: Mnikolenko Productengine Date: Thu, 11 Jan 2018 15:17:21 +0200 Subject: MAINT-8170 Crash viewer when double click on "Report Abuse" --- indra/newview/llfloaterreporter.cpp | 13 ++++++++++--- indra/newview/llfloaterreporter.h | 1 + 2 files changed, 11 insertions(+), 3 deletions(-) (limited to 'indra') diff --git a/indra/newview/llfloaterreporter.cpp b/indra/newview/llfloaterreporter.cpp index c0f5e63623..3a3660bb31 100644 --- a/indra/newview/llfloaterreporter.cpp +++ b/indra/newview/llfloaterreporter.cpp @@ -162,7 +162,8 @@ LLFloaterReporter::LLFloaterReporter(const LLSD& key) mPosition(), mCopyrightWarningSeen( FALSE ), mResourceDatap(new LLResourceData()), - mAvatarNameCacheConnection() + mAvatarNameCacheConnection(), + mSnapshotTimer() { } @@ -245,6 +246,12 @@ LLFloaterReporter::~LLFloaterReporter() void LLFloaterReporter::draw() { LLFloater::draw(); + static LLCachedControl screenshot_delay(gSavedSettings, "AbuseReportScreenshotDelay"); + if (mSnapshotTimer.getStarted() && mSnapshotTimer.getElapsedTimeF32() > screenshot_delay) + { + mSnapshotTimer.stop(); + takeNewSnapshot(); + } } void LLFloaterReporter::enableControls(BOOL enable) @@ -877,8 +884,7 @@ void LLFloaterReporter::onOpen(const LLSD& key) { childSetEnabled("send_btn", false); //Time delay to avoid UI artifacts. MAINT-7067 - doAfterInterval(boost::bind(&LLFloaterReporter::takeNewSnapshot,this), gSavedSettings.getF32("AbuseReportScreenshotDelay")); - + mSnapshotTimer.start(); } void LLFloaterReporter::onLoadScreenshotDialog(const LLSD& notification, const LLSD& response) @@ -950,6 +956,7 @@ void LLFloaterReporter::setPosBox(const LLVector3d &pos) void LLFloaterReporter::onClose(bool app_quitting) { + mSnapshotTimer.stop(); gSavedPerAccountSettings.setBOOL("PreviousScreenshotForReport", app_quitting); } diff --git a/indra/newview/llfloaterreporter.h b/indra/newview/llfloaterreporter.h index decc01be98..f5ba63ce7f 100644 --- a/indra/newview/llfloaterreporter.h +++ b/indra/newview/llfloaterreporter.h @@ -149,6 +149,7 @@ private: LLPointer mImageRaw; LLPointer mPrevImageRaw; + LLFrameTimer mSnapshotTimer; }; #endif -- cgit v1.2.3 From 56c878925af77324e2e85db2203cc82b86693664 Mon Sep 17 00:00:00 2001 From: andreykproductengine Date: Fri, 12 Jan 2018 18:54:20 +0200 Subject: MAINT-7003 Crash in LLVBOPool Error to help figuring out if error happens due to gl or memory issue --- indra/llrender/llvertexbuffer.cpp | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'indra') diff --git a/indra/llrender/llvertexbuffer.cpp b/indra/llrender/llvertexbuffer.cpp index 35c771b61b..1ca42039a3 100644 --- a/indra/llrender/llvertexbuffer.cpp +++ b/indra/llrender/llvertexbuffer.cpp @@ -191,6 +191,10 @@ volatile U8* LLVBOPool::allocate(U32& name, U32 size, bool for_seed) if (mUsage != GL_DYNAMIC_COPY_ARB) { //data will be provided by application ret = (U8*) ll_aligned_malloc<64>(size); + if (!ret) + { + LL_ERRS() << "Failed to allocate for LLVBOPool buffer" << LL_ENDL; + } } } else -- cgit v1.2.3 From ee1b6e853ce4d6d5993184a54b6ba312addb1c1f Mon Sep 17 00:00:00 2001 From: Mnikolenko Productengine Date: Fri, 12 Jan 2018 19:22:37 +0200 Subject: MAINT-8171 "New" tag is not in front of folder when searching items in "Received Items" panel --- indra/llui/llbadge.cpp | 10 +++++++++- indra/llui/llbadge.h | 3 +++ indra/llui/llbadgeowner.cpp | 8 ++++++++ indra/llui/llbadgeowner.h | 1 + indra/newview/llpanelmarketplaceinboxinventory.cpp | 1 + 5 files changed, 22 insertions(+), 1 deletion(-) (limited to 'indra') diff --git a/indra/llui/llbadge.cpp b/indra/llui/llbadge.cpp index 15b6899d74..589b75ab5b 100644 --- a/indra/llui/llbadge.cpp +++ b/indra/llui/llbadge.cpp @@ -102,6 +102,7 @@ LLBadge::LLBadge(const LLBadge::Params& p) , mPaddingHoriz(p.padding_horiz) , mPaddingVert(p.padding_vert) , mParentScroller(NULL) + , mDrawAtParentTop(false) { if (mImage.isNull()) { @@ -307,7 +308,14 @@ void LLBadge::draw() // Compute y position if (mLocationOffsetVCenter == BADGE_OFFSET_NOT_SPECIFIED) { - badge_center_y = owner_rect.mBottom + owner_rect.getHeight() * mLocationPercentVCenter; + if(mDrawAtParentTop) + { + badge_center_y = owner_rect.mTop - badge_height * 0.5f - 1; + } + else + { + badge_center_y = owner_rect.mBottom + owner_rect.getHeight() * mLocationPercentVCenter; + } } else { diff --git a/indra/llui/llbadge.h b/indra/llui/llbadge.h index 4b21a71aaa..55f92e6e34 100644 --- a/indra/llui/llbadge.h +++ b/indra/llui/llbadge.h @@ -137,6 +137,8 @@ public: const std::string getLabel() const { return wstring_to_utf8str(mLabel); } void setLabel( const LLStringExplicit& label); + void setDrawAtParentTop(bool draw_at_top) { mDrawAtParentTop = draw_at_top;} + private: LLPointer< LLUIImage > mBorderImage; LLUIColor mBorderColor; @@ -164,6 +166,7 @@ private: F32 mPaddingVert; LLScrollContainer* mParentScroller; + bool mDrawAtParentTop; }; // Build time optimization, generate once in .cpp file diff --git a/indra/llui/llbadgeowner.cpp b/indra/llui/llbadgeowner.cpp index 55e64bb940..0557cd4375 100644 --- a/indra/llui/llbadgeowner.cpp +++ b/indra/llui/llbadgeowner.cpp @@ -64,6 +64,14 @@ void LLBadgeOwner::setBadgeVisibility(bool visible) } } +void LLBadgeOwner::setDrawBadgeAtTop(bool draw_at_top) +{ + if (mBadge) + { + mBadge->setDrawAtParentTop(draw_at_top); + } +} + void LLBadgeOwner::addBadgeToParentHolder() { LLView * owner_view = mBadgeOwnerView.get(); diff --git a/indra/llui/llbadgeowner.h b/indra/llui/llbadgeowner.h index 53c2de95c8..01ed95f3a3 100644 --- a/indra/llui/llbadgeowner.h +++ b/indra/llui/llbadgeowner.h @@ -45,6 +45,7 @@ public: bool hasBadgeHolderParent() const { return mHasBadgeHolderParent; }; void setBadgeVisibility(bool visible); + void setDrawBadgeAtTop(bool draw_at_top); private: diff --git a/indra/newview/llpanelmarketplaceinboxinventory.cpp b/indra/newview/llpanelmarketplaceinboxinventory.cpp index 2d2ba30e9b..f089faea09 100644 --- a/indra/newview/llpanelmarketplaceinboxinventory.cpp +++ b/indra/newview/llpanelmarketplaceinboxinventory.cpp @@ -139,6 +139,7 @@ void LLInboxFolderViewFolder::draw() if (!hasBadgeHolderParent()) { addBadgeToParentHolder(); + setDrawBadgeAtTop(true); } setBadgeVisibility(mFresh); -- cgit v1.2.3 From 3229b34a078fb3a69efaf8cd72f596d5f8be4ef6 Mon Sep 17 00:00:00 2001 From: Mnikolenko Productengine Date: Mon, 15 Jan 2018 16:22:05 +0200 Subject: MAINT-8184 "Properties" menu item should be disable for multiple selection in Object content --- indra/newview/llpanelobjectinventory.cpp | 12 ++++++++++++ 1 file changed, 12 insertions(+) (limited to 'indra') diff --git a/indra/newview/llpanelobjectinventory.cpp b/indra/newview/llpanelobjectinventory.cpp index b5ee68ba25..c50f3477ad 100644 --- a/indra/newview/llpanelobjectinventory.cpp +++ b/indra/newview/llpanelobjectinventory.cpp @@ -696,6 +696,10 @@ void LLTaskInvFVBridge::buildContextMenu(LLMenuGL& menu, U32 flags) items.push_back(std::string("Task Open")); } items.push_back(std::string("Task Properties")); + if ((flags & FIRST_SELECTED_ITEM) == 0) + { + disabled_items.push_back(std::string("Task Properties")); + } if(isItemRenameable()) { items.push_back(std::string("Task Rename")); @@ -1017,6 +1021,10 @@ void LLTaskSoundBridge::buildContextMenu(LLMenuGL& menu, U32 flags) } } items.push_back(std::string("Task Properties")); + if ((flags & FIRST_SELECTED_ITEM) == 0) + { + disabled_items.push_back(std::string("Task Properties")); + } if(isItemRenameable()) { items.push_back(std::string("Task Rename")); @@ -1388,6 +1396,10 @@ void LLTaskMeshBridge::buildContextMenu(LLMenuGL& menu, U32 flags) } } items.push_back(std::string("Task Properties")); + if ((flags & FIRST_SELECTED_ITEM) == 0) + { + disabled_items.push_back(std::string("Task Properties")); + } if(isItemRenameable()) { items.push_back(std::string("Task Rename")); -- cgit v1.2.3 From df45a4ef146a0eaa78d3a174bbc68bb67f0dee36 Mon Sep 17 00:00:00 2001 From: Mnikolenko Productengine Date: Tue, 16 Jan 2018 16:08:08 +0200 Subject: MAINT-7732 Crash in LLLiveLSLEditor::loadScriptText(..) --- indra/newview/llpreviewscript.cpp | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) (limited to 'indra') diff --git a/indra/newview/llpreviewscript.cpp b/indra/newview/llpreviewscript.cpp index 6ecc4c7fb9..945f3c370c 100644 --- a/indra/newview/llpreviewscript.cpp +++ b/indra/newview/llpreviewscript.cpp @@ -2041,7 +2041,15 @@ void LLLiveLSLEditor::loadScriptText(LLVFS *vfs, const LLUUID &uuid, LLAssetType mScriptEd->setScriptText(LLStringExplicit(&buffer[0]), TRUE); mScriptEd->makeEditorPristine(); - mScriptEd->setScriptName(getItem()->getName()); + + std::string script_name = DEFAULT_SCRIPT_NAME; + const LLInventoryItem* inv_item = getItem(); + + if(inv_item) + { + script_name = inv_item->getName(); + } + mScriptEd->setScriptName(script_name); } -- cgit v1.2.3 From 4e808cfa852b873b484d0b9c90ab89ac196c3e52 Mon Sep 17 00:00:00 2001 From: andreykproductengine Date: Tue, 16 Jan 2018 17:22:17 +0200 Subject: MAINT-3859 Fixed Texture animation flicker at certain frame rates --- indra/newview/llviewertextureanim.cpp | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) (limited to 'indra') diff --git a/indra/newview/llviewertextureanim.cpp b/indra/newview/llviewertextureanim.cpp index 9af92d7377..b94f6f4569 100644 --- a/indra/newview/llviewertextureanim.cpp +++ b/indra/newview/llviewertextureanim.cpp @@ -138,10 +138,8 @@ S32 LLViewerTextureAnim::animateTextures(F32 &off_s, F32 &off_t, { frame_counter = fmod(frame_counter, full_length); } - else - { - frame_counter = llmin(full_length - 1.f, frame_counter); - } + + frame_counter = llmin(full_length - 1.f, frame_counter); if (!(mMode & SMOOTH)) { -- cgit v1.2.3 From 2269a9f0747173a24b2c8463f8a20a7b40bc8833 Mon Sep 17 00:00:00 2001 From: Ansariel Date: Wed, 17 Jan 2018 13:31:26 +0100 Subject: MAINT-8085 done right --- indra/newview/llfilteredwearablelist.cpp | 6 ++++++ indra/newview/llwearableitemslist.cpp | 2 +- 2 files changed, 7 insertions(+), 1 deletion(-) (limited to 'indra') diff --git a/indra/newview/llfilteredwearablelist.cpp b/indra/newview/llfilteredwearablelist.cpp index e67a6a2b77..2bfaa1e5bc 100644 --- a/indra/newview/llfilteredwearablelist.cpp +++ b/indra/newview/llfilteredwearablelist.cpp @@ -32,6 +32,7 @@ #include "llinventoryitemslist.h" #include "llinventorymodel.h" #include "llviewerinventory.h" +#include "lltrans.h" LLFilteredWearableListManager::LLFilteredWearableListManager(LLInventoryItemsList* list, LLInventoryCollectFunctor* collector) @@ -118,6 +119,11 @@ void LLFilteredWearableListManager::populateList() // Probably will also need to get items from Library (waiting for reply in EXT-6724). + if (item_array.empty() && gInventory.isCategoryComplete(gInventory.getRootFolderID())) + { + mWearableList->setNoItemsCommentText(LLTrans::getString("NoneFound")); + } + mWearableList->refreshList(item_array); } diff --git a/indra/newview/llwearableitemslist.cpp b/indra/newview/llwearableitemslist.cpp index 5fb3d62445..ee2270c323 100644 --- a/indra/newview/llwearableitemslist.cpp +++ b/indra/newview/llwearableitemslist.cpp @@ -645,7 +645,7 @@ LLWearableItemsList::LLWearableItemsList(const LLWearableItemsList::Params& p) setRightMouseDownCallback(boost::bind(&LLWearableItemsList::onRightClick, this, _2, _3)); } mWornIndicationEnabled = p.worn_indication_enabled; - setNoItemsCommentText(LLTrans::getString("NoneFound")); + setNoItemsCommentText(LLTrans::getString("LoadingData")); } // virtual -- cgit v1.2.3 From fab8eeeb86075173c708c7adb18ea4ad273e0e13 Mon Sep 17 00:00:00 2001 From: AndreyL ProductEngine Date: Wed, 17 Jan 2018 17:05:53 +0200 Subject: MAINT-8154 Brought back the LLContinueError handling --- indra/newview/llappviewer.cpp | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) (limited to 'indra') diff --git a/indra/newview/llappviewer.cpp b/indra/newview/llappviewer.cpp index 3b11c9ff75..ea6842b62a 100644 --- a/indra/newview/llappviewer.cpp +++ b/indra/newview/llappviewer.cpp @@ -1328,6 +1328,10 @@ bool LLAppViewer::frame() { ret = doFrame(); } + catch (const LLContinueError&) + { + LOG_UNHANDLED_EXCEPTION(""); + } catch (std::bad_alloc) { LLMemory::logMemoryInfo(TRUE); @@ -1341,7 +1345,14 @@ bool LLAppViewer::frame() } else { - ret = doFrame(); + try + { + ret = doFrame(); + } + catch (const LLContinueError&) + { + LOG_UNHANDLED_EXCEPTION(""); + } } return ret; -- cgit v1.2.3 From af3bf74eea532fff81c7b4acad59e1f5b4545fbd Mon Sep 17 00:00:00 2001 From: andreykproductengine Date: Wed, 17 Jan 2018 18:46:56 +0200 Subject: MAINT-8183 Additional logging --- indra/llwindow/llwindowwin32.cpp | 24 ++++++++++++++++++++---- indra/newview/llviewerwindow.cpp | 1 + 2 files changed, 21 insertions(+), 4 deletions(-) (limited to 'indra') diff --git a/indra/llwindow/llwindowwin32.cpp b/indra/llwindow/llwindowwin32.cpp index 2ad6f7c8b5..9fa07d1d34 100644 --- a/indra/llwindow/llwindowwin32.cpp +++ b/indra/llwindow/llwindowwin32.cpp @@ -1101,7 +1101,14 @@ BOOL LLWindowWin32::switchContext(BOOL fullscreen, const LLCoordScreen &size, BO mhInstance, NULL); - LL_INFOS("Window") << "window is created." << LL_ENDL ; + if (mWindowHandle) + { + LL_INFOS("Window") << "window is created." << LL_ENDL ; + } + else + { + LL_WARNS("Window") << "Window creation failed, code: " << GetLastError() << LL_ENDL; + } //----------------------------------------------------------------------- // Create GL drawing context @@ -1416,7 +1423,16 @@ BOOL LLWindowWin32::switchContext(BOOL fullscreen, const LLCoordScreen &size, BO mhInstance, NULL); - LL_INFOS("Window") << "recreate window done." << LL_ENDL ; + + if (mWindowHandle) + { + LL_INFOS("Window") << "recreate window done." << LL_ENDL ; + } + else + { + // Note: if value is NULL GetDC retrieves the DC for the entire screen. + LL_WARNS("Window") << "Window recreation failed, code: " << GetLastError() << LL_ENDL; + } if (!(mhDC = GetDC(mWindowHandle))) { @@ -2646,20 +2662,20 @@ LRESULT CALLBACK LLWindowWin32::mainWindowProc(HWND h_wnd, UINT u_msg, WPARAM w_ } case WM_SETFOCUS: - window_imp->mCallbacks->handlePingWatchdog(window_imp, "Main:WM_SETFOCUS"); if (gDebugWindowProc) { LL_INFOS("Window") << "WINDOWPROC SetFocus" << LL_ENDL; } + window_imp->mCallbacks->handlePingWatchdog(window_imp, "Main:WM_SETFOCUS"); window_imp->mCallbacks->handleFocus(window_imp); return 0; case WM_KILLFOCUS: - window_imp->mCallbacks->handlePingWatchdog(window_imp, "Main:WM_KILLFOCUS"); if (gDebugWindowProc) { LL_INFOS("Window") << "WINDOWPROC KillFocus" << LL_ENDL; } + window_imp->mCallbacks->handlePingWatchdog(window_imp, "Main:WM_KILLFOCUS"); window_imp->mCallbacks->handleFocusLost(window_imp); return 0; diff --git a/indra/newview/llviewerwindow.cpp b/indra/newview/llviewerwindow.cpp index ca231c164c..74deaffe16 100644 --- a/indra/newview/llviewerwindow.cpp +++ b/indra/newview/llviewerwindow.cpp @@ -2268,6 +2268,7 @@ void LLViewerWindow::shutdownGL() LLViewerWindow::~LLViewerWindow() { LL_INFOS() << "Destroying Window" << LL_ENDL; + gDebugWindowProc = TRUE; // event catching, at this point it shouldn't output at all destroyWindow(); delete mDebugText; -- cgit v1.2.3 From 2c0cfd9185dda2fa33d2a7603d2959c827357aba Mon Sep 17 00:00:00 2001 From: andreykproductengine Date: Thu, 18 Jan 2018 18:34:08 +0200 Subject: MAINT-3859 Remade to account from smoothed looping --- indra/newview/llviewertextureanim.cpp | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'indra') diff --git a/indra/newview/llviewertextureanim.cpp b/indra/newview/llviewertextureanim.cpp index b94f6f4569..9603811066 100644 --- a/indra/newview/llviewertextureanim.cpp +++ b/indra/newview/llviewertextureanim.cpp @@ -138,12 +138,16 @@ S32 LLViewerTextureAnim::animateTextures(F32 &off_s, F32 &off_t, { frame_counter = fmod(frame_counter, full_length); } - - frame_counter = llmin(full_length - 1.f, frame_counter); + else + { + frame_counter = llmin(full_length - 1.f, frame_counter); + } if (!(mMode & SMOOTH)) { frame_counter = (F32)llfloor(frame_counter + 0.01f); + // account for 0.01, we shouldn't step over full length + frame_counter = llmin(full_length - 1.f, frame_counter); } if (mMode & PING_PONG) -- cgit v1.2.3 From 774339c415e1a4762ef39cbca7e5f6a4d731b7df Mon Sep 17 00:00:00 2001 From: mnikolenkoproductengine Date: Thu, 18 Jan 2018 19:22:37 +0200 Subject: MAINT-8163 Text is corrupted in ToS in non english viewer --- indra/newview/skins/default/xui/da/floater_tos.xml | 4 +++- indra/newview/skins/default/xui/de/floater_tos.xml | 7 +++---- indra/newview/skins/default/xui/es/floater_tos.xml | 5 ++--- indra/newview/skins/default/xui/fr/floater_tos.xml | 3 +-- indra/newview/skins/default/xui/it/floater_tos.xml | 5 ++--- indra/newview/skins/default/xui/ja/floater_tos.xml | 5 ++--- indra/newview/skins/default/xui/pl/floater_tos.xml | 4 +++- indra/newview/skins/default/xui/pt/floater_tos.xml | 5 ++--- indra/newview/skins/default/xui/ru/floater_tos.xml | 5 ++--- indra/newview/skins/default/xui/tr/floater_tos.xml | 3 +-- indra/newview/skins/default/xui/zh/floater_tos.xml | 5 ++--- 11 files changed, 23 insertions(+), 28 deletions(-) (limited to 'indra') diff --git a/indra/newview/skins/default/xui/da/floater_tos.xml b/indra/newview/skins/default/xui/da/floater_tos.xml index af9ee0bd06..bd8ecb92e9 100644 --- a/indra/newview/skins/default/xui/da/floater_tos.xml +++ b/indra/newview/skins/default/xui/da/floater_tos.xml @@ -8,7 +8,9 @@