From c4a08e6c9d9f044532fcfd4eeeb8934f2c1f3dda Mon Sep 17 00:00:00 2001 From: callum Date: Mon, 9 Jan 2012 14:42:34 -0800 Subject: EXP-1511 FIX Preview image overlays ui elements in Upload image floater --- indra/newview/llfloaterimagepreview.cpp | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'indra') diff --git a/indra/newview/llfloaterimagepreview.cpp b/indra/newview/llfloaterimagepreview.cpp index 69de15d9ea..cc279049ca 100644 --- a/indra/newview/llfloaterimagepreview.cpp +++ b/indra/newview/llfloaterimagepreview.cpp @@ -63,6 +63,7 @@ const S32 PREVIEW_BORDER_WIDTH = 2; const S32 PREVIEW_RESIZE_HANDLE_SIZE = S32(RESIZE_HANDLE_WIDTH * OO_SQRT2) + PREVIEW_BORDER_WIDTH; const S32 PREVIEW_HPAD = PREVIEW_RESIZE_HANDLE_SIZE; +const S32 PREVIEW_VPAD = 32; // yuk, hard coded const S32 PREF_BUTTON_HEIGHT = 16 + 7 + 16; const S32 PREVIEW_TEXTURE_HEIGHT = 320; @@ -99,7 +100,7 @@ BOOL LLFloaterImagePreview::postBuild() childSetCommitCallback("clothing_type_combo", onPreviewTypeCommit, this); mPreviewRect.set(PREVIEW_HPAD, - PREVIEW_TEXTURE_HEIGHT, + PREVIEW_TEXTURE_HEIGHT + PREVIEW_VPAD, getRect().getWidth() - PREVIEW_HPAD, PREVIEW_HPAD + PREF_BUTTON_HEIGHT + PREVIEW_HPAD); mPreviewImageRect.set(0.f, 1.f, 1.f, 0.f); @@ -271,13 +272,13 @@ void LLFloaterImagePreview::draw() gGL.begin( LLRender::QUADS ); { gGL.texCoord2f(mPreviewImageRect.mLeft, mPreviewImageRect.mTop); - gGL.vertex2i(PREVIEW_HPAD, PREVIEW_TEXTURE_HEIGHT); + gGL.vertex2i(PREVIEW_HPAD, PREVIEW_TEXTURE_HEIGHT + PREVIEW_VPAD); gGL.texCoord2f(mPreviewImageRect.mLeft, mPreviewImageRect.mBottom); gGL.vertex2i(PREVIEW_HPAD, PREVIEW_HPAD + PREF_BUTTON_HEIGHT + PREVIEW_HPAD); gGL.texCoord2f(mPreviewImageRect.mRight, mPreviewImageRect.mBottom); gGL.vertex2i(r.getWidth() - PREVIEW_HPAD, PREVIEW_HPAD + PREF_BUTTON_HEIGHT + PREVIEW_HPAD); gGL.texCoord2f(mPreviewImageRect.mRight, mPreviewImageRect.mTop); - gGL.vertex2i(r.getWidth() - PREVIEW_HPAD, PREVIEW_TEXTURE_HEIGHT); + gGL.vertex2i(r.getWidth() - PREVIEW_HPAD, PREVIEW_TEXTURE_HEIGHT + PREVIEW_VPAD); } gGL.end(); -- cgit v1.2.3 From a47e9bd97b9855ca8bb3309a73d33d9ae593fd7d Mon Sep 17 00:00:00 2001 From: Vadim ProductEngine Date: Tue, 10 Jan 2012 16:35:36 +0200 Subject: EXP-1525 FIXED Potential fix for a crash at shutdown: added some error handling to saving inventory cache. --- indra/llcommon/llsys.cpp | 18 ++++++++++++++---- indra/newview/llinventorymodel.h | 1 + 2 files changed, 15 insertions(+), 4 deletions(-) (limited to 'indra') diff --git a/indra/llcommon/llsys.cpp b/indra/llcommon/llsys.cpp index 19075afa68..6073bcd0a6 100644 --- a/indra/llcommon/llsys.cpp +++ b/indra/llcommon/llsys.cpp @@ -1364,11 +1364,21 @@ BOOL gzip_file(const std::string& srcfile, const std::string& dstfile) src = LLFile::fopen(srcfile, "rb"); /* Flawfinder: ignore */ if (! src) goto err; - do + while ((bytes = (S32)fread(buffer, sizeof(U8), COMPRESS_BUFFER_SIZE, src)) > 0) { - bytes = (S32)fread(buffer, sizeof(U8), COMPRESS_BUFFER_SIZE,src); - gzwrite(dst, buffer, bytes); - } while(feof(src) == 0); + if (gzwrite(dst, buffer, bytes) <= 0) + { + llwarns << "gzwrite failed: " << gzerror(dst, NULL) << llendl; + goto err; + } + } + + if (ferror(src)) + { + llwarns << "Error reading " << srcfile << llendl; + goto err; + } + gzclose(dst); dst = NULL; #if LL_WINDOWS diff --git a/indra/newview/llinventorymodel.h b/indra/newview/llinventorymodel.h index 340c1b0c22..f36ae50272 100644 --- a/indra/newview/llinventorymodel.h +++ b/indra/newview/llinventorymodel.h @@ -64,6 +64,7 @@ class LLInventoryCollectFunctor; //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ class LLInventoryModel { + LOG_CLASS(LLInventoryModel); public: friend class LLInventoryModelFetchDescendentsResponder; -- cgit v1.2.3 From 0434771b043a96b44a99db6acfdec232806f2331 Mon Sep 17 00:00:00 2001 From: Seth ProductEngine Date: Tue, 10 Jan 2012 17:20:49 +0200 Subject: EXP-1766 FIXED Disabled updating agent AFK state if the viewer is disconnected. Possible crash fix. --- indra/newview/llviewerwindow.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'indra') diff --git a/indra/newview/llviewerwindow.cpp b/indra/newview/llviewerwindow.cpp index b73be4ed43..4499955dec 100644 --- a/indra/newview/llviewerwindow.cpp +++ b/indra/newview/llviewerwindow.cpp @@ -1206,7 +1206,8 @@ void LLViewerWindow::handleMouseMove(LLWindow *window, LLCoordGL pos, MASK mask mWindow->showCursorFromMouseMove(); - if (gAwayTimer.getElapsedTimeF32() > LLAgent::MIN_AFK_TIME) + if (gAwayTimer.getElapsedTimeF32() > LLAgent::MIN_AFK_TIME + && !gDisconnected) { gAgent.clearAFK(); } -- cgit v1.2.3 From 9cdfecd9e1d9862d9dbd674faa1e28a793540079 Mon Sep 17 00:00:00 2001 From: callum Date: Tue, 10 Jan 2012 10:40:27 -0800 Subject: EXP-1765 (Add debug info) crash on startup at LLWindowWin32::switchContext() --- indra/llwindow/llwindowwin32.cpp | 31 +++++++++++++++++++++++++++++++ 1 file changed, 31 insertions(+) (limited to 'indra') diff --git a/indra/llwindow/llwindowwin32.cpp b/indra/llwindow/llwindowwin32.cpp index 52c27b6736..954b9f2b15 100644 --- a/indra/llwindow/llwindowwin32.cpp +++ b/indra/llwindow/llwindowwin32.cpp @@ -1083,6 +1083,37 @@ BOOL LLWindowWin32::switchContext(BOOL fullscreen, const LLCoordScreen &size, BO return FALSE; } + // (EXP-1765) dump pixel data to see if there is a pattern that leads to unreproducible crash + LL_INFOS("Window") << "--- begin pixel format dump ---" << llendl ; + LL_INFOS("Window") << "pixel_format is " << pixel_format << llendl ; + LL_INFOS("Window") << "pfd.nSize: " << pfd.nSize << llendl ; + LL_INFOS("Window") << "pfd.nVersion: " << pfd.nVersion << llendl ; + LL_INFOS("Window") << "pfd.dwFlags: 0x" << std::hex << pfd.dwFlags << std::dec << llendl ; + LL_INFOS("Window") << "pfd.iPixelType: " << (int)pfd.iPixelType << llendl ; + LL_INFOS("Window") << "pfd.cColorBits: " << (int)pfd.cColorBits << llendl ; + LL_INFOS("Window") << "pfd.cRedBits: " << (int)pfd.cRedBits << llendl ; + LL_INFOS("Window") << "pfd.cRedShift: " << (int)pfd.cRedShift << llendl ; + LL_INFOS("Window") << "pfd.cGreenBits: " << (int)pfd.cGreenBits << llendl ; + LL_INFOS("Window") << "pfd.cGreenShift: " << (int)pfd.cGreenShift << llendl ; + LL_INFOS("Window") << "pfd.cBlueBits: " << (int)pfd.cBlueBits << llendl ; + LL_INFOS("Window") << "pfd.cBlueShift: " << (int)pfd.cBlueShift << llendl ; + LL_INFOS("Window") << "pfd.cAlphaBits: " << (int)pfd.cAlphaBits << llendl ; + LL_INFOS("Window") << "pfd.cAlphaShift: " << (int)pfd.cAlphaShift << llendl ; + LL_INFOS("Window") << "pfd.cAccumBits: " << (int)pfd.cAccumBits << llendl ; + LL_INFOS("Window") << "pfd.cAccumRedBits: " << (int)pfd.cAccumRedBits << llendl ; + LL_INFOS("Window") << "pfd.cAccumGreenBits: " << (int)pfd.cAccumGreenBits << llendl ; + LL_INFOS("Window") << "pfd.cAccumBlueBits: " << (int)pfd.cAccumBlueBits << llendl ; + LL_INFOS("Window") << "pfd.cAccumAlphaBits: " << (int)pfd.cAccumAlphaBits << llendl ; + LL_INFOS("Window") << "pfd.cDepthBits: " << (int)pfd.cDepthBits << llendl ; + LL_INFOS("Window") << "pfd.cStencilBits: " << (int)pfd.cStencilBits << llendl ; + LL_INFOS("Window") << "pfd.cAuxBuffers: " << (int)pfd.cAuxBuffers << llendl ; + LL_INFOS("Window") << "pfd.iLayerType: " << (int)pfd.iLayerType << llendl ; + LL_INFOS("Window") << "pfd.bReserved: " << (int)pfd.bReserved << llendl ; + LL_INFOS("Window") << "pfd.dwLayerMask: " << pfd.dwLayerMask << llendl ; + LL_INFOS("Window") << "pfd.dwVisibleMask: " << pfd.dwVisibleMask << llendl ; + LL_INFOS("Window") << "pfd.dwDamageMask: " << pfd.dwDamageMask << llendl ; + LL_INFOS("Window") << "--- end pixel format dump ---" << llendl ; + if (pfd.cColorBits < 32) { close(); -- cgit v1.2.3 From 3169f4a96fd4c62d1390cd53ff2aaa4cb28fb047 Mon Sep 17 00:00:00 2001 From: Richard Linden Date: Wed, 11 Jan 2012 10:19:11 -0800 Subject: assert for updating views while drawing was too aggressive made assert match actual error condition for list iterators reviewed by Leslie --- indra/llui/llview.cpp | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) (limited to 'indra') diff --git a/indra/llui/llview.cpp b/indra/llui/llview.cpp index 542f57ee5f..004681325f 100644 --- a/indra/llui/llview.cpp +++ b/indra/llui/llview.cpp @@ -282,9 +282,6 @@ void LLView::moveChildToBackOfTabGroup(LLUICtrl* child) // virtual bool LLView::addChild(LLView* child, S32 tab_group) { - // NOTE: Changed this to not crash in release mode - llassert(mInDraw == false); - if (!child) { return false; @@ -334,10 +331,11 @@ bool LLView::addChildInBack(LLView* child, S32 tab_group) // remove the specified child from the view, and set it's parent to NULL. void LLView::removeChild(LLView* child) { - llassert_always(mInDraw == false); //llassert_always(sDepth == 0); // Avoid re-ordering while drawing; it can cause subtle iterator bugs if (child->mParentView == this) { + // if we are removing an item we are currently iterating over, that would be bad + llassert(child->mInDraw == false); mChildList.remove( child ); child->mParentView = NULL; if (child->isCtrl()) @@ -1086,7 +1084,6 @@ void LLView::draw() void LLView::drawChildren() { - mInDraw = true; if (!mChildList.empty()) { LLView* rootp = LLUI::getRootView(); @@ -1105,7 +1102,10 @@ void LLView::drawChildren() LLUI::pushMatrix(); { LLUI::translate((F32)viewp->getRect().mLeft, (F32)viewp->getRect().mBottom, 0.f); + // flag the fact we are in draw here, in case overridden draw() method attempts to remove this widget + viewp->mInDraw = true; viewp->draw(); + viewp->mInDraw = false; if (sDebugRects) { @@ -1125,7 +1125,6 @@ void LLView::drawChildren() } --sDepth; } - mInDraw = false; } void LLView::dirtyRect() -- cgit v1.2.3 From b41e66c1cb7d48ef600588fa2b57e43f80860c71 Mon Sep 17 00:00:00 2001 From: callum Date: Wed, 11 Jan 2012 17:15:06 -0800 Subject: EXP-1511 REFIX Preview image overlays ui elements in Upload image floater Tweaked offset and missed a corner case --- indra/newview/llfloaterimagepreview.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'indra') diff --git a/indra/newview/llfloaterimagepreview.cpp b/indra/newview/llfloaterimagepreview.cpp index cc279049ca..92ee8ddac6 100644 --- a/indra/newview/llfloaterimagepreview.cpp +++ b/indra/newview/llfloaterimagepreview.cpp @@ -63,7 +63,7 @@ const S32 PREVIEW_BORDER_WIDTH = 2; const S32 PREVIEW_RESIZE_HANDLE_SIZE = S32(RESIZE_HANDLE_WIDTH * OO_SQRT2) + PREVIEW_BORDER_WIDTH; const S32 PREVIEW_HPAD = PREVIEW_RESIZE_HANDLE_SIZE; -const S32 PREVIEW_VPAD = 32; // yuk, hard coded +const S32 PREVIEW_VPAD = -24; // yuk, hard coded const S32 PREF_BUTTON_HEIGHT = 16 + 7 + 16; const S32 PREVIEW_TEXTURE_HEIGHT = 320; @@ -304,13 +304,13 @@ void LLFloaterImagePreview::draw() gGL.begin( LLRender::QUADS ); { gGL.texCoord2f(0.f, 1.f); - gGL.vertex2i(PREVIEW_HPAD, PREVIEW_TEXTURE_HEIGHT); + gGL.vertex2i(PREVIEW_HPAD, PREVIEW_TEXTURE_HEIGHT + PREVIEW_VPAD); gGL.texCoord2f(0.f, 0.f); gGL.vertex2i(PREVIEW_HPAD, PREVIEW_HPAD + PREF_BUTTON_HEIGHT + PREVIEW_HPAD); gGL.texCoord2f(1.f, 0.f); gGL.vertex2i(r.getWidth() - PREVIEW_HPAD, PREVIEW_HPAD + PREF_BUTTON_HEIGHT + PREVIEW_HPAD); gGL.texCoord2f(1.f, 1.f); - gGL.vertex2i(r.getWidth() - PREVIEW_HPAD, PREVIEW_TEXTURE_HEIGHT); + gGL.vertex2i(r.getWidth() - PREVIEW_HPAD, PREVIEW_TEXTURE_HEIGHT + PREVIEW_VPAD); } gGL.end(); -- cgit v1.2.3 From 33a17d8a83b3810e344e663395219d3130cb34c3 Mon Sep 17 00:00:00 2001 From: Merov Linden Date: Wed, 11 Jan 2012 17:43:17 -0800 Subject: EXP-1549 : Disable the Remove button menu item in the toolbar contextual menu if no button clicked --- indra/llui/lltoolbar.cpp | 9 ++++++++- indra/llui/lltoolbar.h | 1 + 2 files changed, 9 insertions(+), 1 deletion(-) (limited to 'indra') diff --git a/indra/llui/lltoolbar.cpp b/indra/llui/lltoolbar.cpp index 7f96c1373c..9b31a6449d 100644 --- a/indra/llui/lltoolbar.cpp +++ b/indra/llui/lltoolbar.cpp @@ -151,14 +151,20 @@ void LLToolBar::createContextMenu() if (menu) { menu->setBackgroundColor(LLUIColorTable::instance().getColor("MenuPopupBgColor")); - mPopupMenuHandle = menu->getHandle(); + mRemoveButtonHandle = menu->getChild("Remove button")->getHandle(); } else { llwarns << "Unable to load toolbars context menu." << llendl; } } + + if (mRemoveButtonHandle.get()) + { + // Disable/Enable the "Remove button" menu item depending on whether or not a button was clicked + mRemoveButtonHandle.get()->setEnabled(mRightMouseTargetButton != NULL); + } } void LLToolBar::initFromParams(const LLToolBar::Params& p) @@ -401,6 +407,7 @@ BOOL LLToolBar::handleRightMouseDown(S32 x, S32 y, MASK mask) { // Determine which button the mouse was over during the click in case the context menu action // is intended to affect the button. + mRightMouseTargetButton = NULL; BOOST_FOREACH(LLToolBarButton* button, mButtons) { LLRect button_rect; diff --git a/indra/llui/lltoolbar.h b/indra/llui/lltoolbar.h index 51fe23ddd1..a50c60282c 100644 --- a/indra/llui/lltoolbar.h +++ b/indra/llui/lltoolbar.h @@ -271,6 +271,7 @@ private: LLLayoutStack* mCenteringStack; LLPanel* mButtonPanel; LLHandle mPopupMenuHandle; + LLHandle mRemoveButtonHandle; LLToolBarButton* mRightMouseTargetButton; -- cgit v1.2.3 From 37c68057c92f5a21a3d21b4ac01690a1cf4cf8e4 Mon Sep 17 00:00:00 2001 From: Merov Linden Date: Wed, 11 Jan 2012 18:59:35 -0800 Subject: EXP-876 : Avoid ui elements using the same name reference. --- .../skins/default/xui/en/floater_model_wizard.xml | 32 +++++++++++----------- 1 file changed, 16 insertions(+), 16 deletions(-) (limited to 'indra') diff --git a/indra/newview/skins/default/xui/en/floater_model_wizard.xml b/indra/newview/skins/default/xui/en/floater_model_wizard.xml index 9c0af7d9ba..62b8c5f96e 100644 --- a/indra/newview/skins/default/xui/en/floater_model_wizard.xml +++ b/indra/newview/skins/default/xui/en/floater_model_wizard.xml @@ -108,7 +108,7 @@ height="22" top_pad="15" width="505" - name="header_panel" + name="choose_file_header_panel" bg_opaque_color="DkGray2" background_visible="true" background_opaque="true" @@ -117,7 +117,7 @@ width="200" left="10" top="3" - name="header_text" + name="choose_file_header_text" text_color="White" height="10" font="SansSerifBig" @@ -130,7 +130,7 @@ left="15" height="310" width="505" - name="content" + name="choose_file_content" bg_opaque_color="DkGray2" background_visible="true" background_opaque="true"> @@ -287,7 +287,7 @@ We have optimized the model for performance. Adjust it further if you wish. @@ -322,7 +322,7 @@ left="15" height="270" width="505" - name="content" + name="optimize_content" bg_opaque_color="DkGray2" background_visible="true" background_opaque="true"> @@ -497,7 +497,7 @@ Higher prim weight height="50" font="SansSerifSmall" layout="topleft" - name="description" + name="physics_description" word_wrap="true" left_delta="5"> We will create a shape for the outer hull of the model. Adjust the shape's detail level as needed for the intended purpose of your model. @@ -531,7 +531,7 @@ Higher prim weight left="15" height="270" width="505" - name="content" + name="physics_content" bg_opaque_color="DkGray2" background_visible="true" background_opaque="true"> @@ -635,7 +635,7 @@ Buildings left="15" height="310" width="505" - name="content" + name="review_content" bg_opaque_color="DkGray2" background_visible="true" background_opaque="true"> @@ -706,7 +706,7 @@ Buildings