From a873a575dd0e5034313df09c89141e8be581c24e Mon Sep 17 00:00:00 2001 From: Mnikolenko ProductEngine Date: Tue, 19 Nov 2013 13:36:59 +0200 Subject: MAINT-3375 FIXED Do not record visibility change if event logging is off(because it kills fps). --- indra/llui/llview.cpp | 20 +++++++++++++------- 1 file changed, 13 insertions(+), 7 deletions(-) (limited to 'indra/llui/llview.cpp') diff --git a/indra/llui/llview.cpp b/indra/llui/llview.cpp index 20015dca1a..9cc8c951d5 100755 --- a/indra/llui/llview.cpp +++ b/indra/llui/llview.cpp @@ -645,14 +645,18 @@ void LLView::setVisible(BOOL visible) void LLView::handleVisibilityChange ( BOOL new_visibility ) { BOOL old_visibility; + BOOL log_visibility_change = LLViewerEventRecorder::instance().getLoggingStatus(); BOOST_FOREACH(LLView* viewp, mChildList) { // only views that are themselves visible will have their overall visibility affected by their ancestors old_visibility=viewp->getVisible(); - if (old_visibility!=new_visibility) + if(log_visibility_change) { - LLViewerEventRecorder::instance().logVisibilityChange( viewp->getPathname(), viewp->getName(), new_visibility,"widget"); + if (old_visibility!=new_visibility) + { + LLViewerEventRecorder::instance().logVisibilityChange( viewp->getPathname(), viewp->getName(), new_visibility,"widget"); + } } if (old_visibility) @@ -660,11 +664,13 @@ void LLView::handleVisibilityChange ( BOOL new_visibility ) viewp->handleVisibilityChange ( new_visibility ); } - // Consider changing returns to confirm success and know which widget grabbed it - // For now assume success and log at highest xui possible - // NOTE we log actual state - which may differ if it somehow failed to set visibility - lldebugs << "LLView::handleVisibilityChange - now: " << getVisible() << " xui: " << viewp->getPathname() << " name: " << viewp->getName() << llendl; - + if(log_visibility_change) + { + // Consider changing returns to confirm success and know which widget grabbed it + // For now assume success and log at highest xui possible + // NOTE we log actual state - which may differ if it somehow failed to set visibility + lldebugs << "LLView::handleVisibilityChange - now: " << getVisible() << " xui: " << viewp->getPathname() << " name: " << viewp->getName() << llendl; + } } } -- cgit v1.2.3 From 4a09065691b6a3461ff2f4541abb3accade207fe Mon Sep 17 00:00:00 2001 From: Mnikolenko ProductEngine Date: Mon, 9 Dec 2013 13:02:06 +0200 Subject: MAINT-3539 Additional checking was added to avoid possible crash. --- indra/llui/llview.cpp | 89 ++++++++++++++++++++++++++------------------------- 1 file changed, 46 insertions(+), 43 deletions(-) (limited to 'indra/llui/llview.cpp') diff --git a/indra/llui/llview.cpp b/indra/llui/llview.cpp index 9cc8c951d5..5ee2169b66 100755 --- a/indra/llui/llview.cpp +++ b/indra/llui/llview.cpp @@ -1314,52 +1314,55 @@ void LLView::reshape(S32 width, S32 height, BOOL called_from_parent) // move child views according to reshape flags BOOST_FOREACH(LLView* viewp, mChildList) { - LLRect child_rect( viewp->mRect ); - - if (viewp->followsRight() && viewp->followsLeft()) - { - child_rect.mRight += delta_width; - } - else if (viewp->followsRight()) - { - child_rect.mLeft += delta_width; - child_rect.mRight += delta_width; - } - else if (viewp->followsLeft()) + if (viewp != NULL) { - // left is 0, don't need to adjust coords - } - else - { - // BUG what to do when we don't follow anyone? - // for now, same as followsLeft - } + LLRect child_rect( viewp->mRect ); - if (viewp->followsTop() && viewp->followsBottom()) - { - child_rect.mTop += delta_height; - } - else if (viewp->followsTop()) - { - child_rect.mTop += delta_height; - child_rect.mBottom += delta_height; - } - else if (viewp->followsBottom()) - { - // bottom is 0, so don't need to adjust coords - } - else - { - // BUG what to do when we don't follow? - // for now, same as bottom - } + if (viewp->followsRight() && viewp->followsLeft()) + { + child_rect.mRight += delta_width; + } + else if (viewp->followsRight()) + { + child_rect.mLeft += delta_width; + child_rect.mRight += delta_width; + } + else if (viewp->followsLeft()) + { + // left is 0, don't need to adjust coords + } + else + { + // BUG what to do when we don't follow anyone? + // for now, same as followsLeft + } - S32 delta_x = child_rect.mLeft - viewp->getRect().mLeft; - S32 delta_y = child_rect.mBottom - viewp->getRect().mBottom; - viewp->translate( delta_x, delta_y ); - if (child_rect.getWidth() != viewp->getRect().getWidth() || child_rect.getHeight() != viewp->getRect().getHeight()) - { - viewp->reshape(child_rect.getWidth(), child_rect.getHeight()); + if (viewp->followsTop() && viewp->followsBottom()) + { + child_rect.mTop += delta_height; + } + else if (viewp->followsTop()) + { + child_rect.mTop += delta_height; + child_rect.mBottom += delta_height; + } + else if (viewp->followsBottom()) + { + // bottom is 0, so don't need to adjust coords + } + else + { + // BUG what to do when we don't follow? + // for now, same as bottom + } + + S32 delta_x = child_rect.mLeft - viewp->getRect().mLeft; + S32 delta_y = child_rect.mBottom - viewp->getRect().mBottom; + viewp->translate( delta_x, delta_y ); + if (child_rect.getWidth() != viewp->getRect().getWidth() || child_rect.getHeight() != viewp->getRect().getHeight()) + { + viewp->reshape(child_rect.getWidth(), child_rect.getHeight()); + } } } } -- cgit v1.2.3 From 7faaaa9b113715827ad7103be1865d83eb67793f Mon Sep 17 00:00:00 2001 From: Baker Linden Date: Thu, 20 Feb 2014 15:23:53 -0800 Subject: [MAINT-3555] Adding a bajillion log messages to (hopefully) narrow down the cause of the crash --- indra/llui/llview.cpp | 15 +++++++++++++++ 1 file changed, 15 insertions(+) (limited to 'indra/llui/llview.cpp') diff --git a/indra/llui/llview.cpp b/indra/llui/llview.cpp index 5ee2169b66..daa87e8334 100755 --- a/indra/llui/llview.cpp +++ b/indra/llui/llview.cpp @@ -150,10 +150,16 @@ LLView::LLView(const LLView::Params& p) LLView::~LLView() { + LL_INFOS("Baker") << "[3555] ~LLView -------------------------------------------------" << LL_ENDL; + + LL_INFOS("Baker") << "[3555] ~LLView() - Dirtying view rect" << LL_ENDL; dirtyRect(); //llinfos << "Deleting view " << mName << ":" << (void*) this << llendl; + LL_INFOS("Baker") << "[3555] ~LLView() - Deleting view " << mName << ":" << (void*) this << LL_ENDL; if (LLView::sIsDrawing) { + LL_INFOS("Baker") << "[3555] ~LLView() - Deleting view " << mName << " during UI draw() phase" << LL_ENDL; + lldebugs << "Deleting view " << mName << " during UI draw() phase" << llendl; } // llassert(LLView::sIsDrawing == FALSE); @@ -163,21 +169,30 @@ LLView::~LLView() if( hasMouseCapture() ) { //llwarns << "View holding mouse capture deleted: " << getName() << ". Mouse capture removed." << llendl; + LL_INFOS("Baker") << "[3555] ~LLView() - View holding mouse capture deleted: " << getName() << ". Mouse capture removed." << LL_ENDL; gFocusMgr.removeMouseCaptureWithoutCallback( this ); } + LL_INFOS("Baker") << "[3555] ~LLView() - Deleting all children..." << LL_ENDL; deleteAllChildren(); + LL_INFOS("Baker") << "[3555] ~LLView() - done." << LL_ENDL; + if (mParentView != NULL) { + LL_INFOS("Baker") << "[3555] ~LLView() - Removing this child view" << LL_ENDL; mParentView->removeChild(this); } if (mDefaultWidgets) { + LL_INFOS("Baker") << "[3555] ~LLView() - Deleting default widgets" << LL_ENDL; + delete mDefaultWidgets; mDefaultWidgets = NULL; } + + LL_INFOS("Baker") << "[3555] Exiting ~LLView()" << LL_ENDL; } // virtual -- cgit v1.2.3 From bd73465e51397bac59b4acc61d024d2923f023b3 Mon Sep 17 00:00:00 2001 From: Baker Linden Date: Tue, 25 Feb 2014 16:41:23 -0800 Subject: [MAINT-3784] - Viewer takes too long to shut down - Removed a lot of logging code to reduce application close time --- indra/llui/llview.cpp | 15 ++++----------- 1 file changed, 4 insertions(+), 11 deletions(-) (limited to 'indra/llui/llview.cpp') diff --git a/indra/llui/llview.cpp b/indra/llui/llview.cpp index daa87e8334..10d9616152 100755 --- a/indra/llui/llview.cpp +++ b/indra/llui/llview.cpp @@ -150,12 +150,10 @@ LLView::LLView(const LLView::Params& p) LLView::~LLView() { - LL_INFOS("Baker") << "[3555] ~LLView -------------------------------------------------" << LL_ENDL; - - LL_INFOS("Baker") << "[3555] ~LLView() - Dirtying view rect" << LL_ENDL; + //LL_INFOS("Baker") << "[3555] ~LLView -- " << mName << ":" << (void*) this << " ----------------------" << LL_ENDL; + dirtyRect(); //llinfos << "Deleting view " << mName << ":" << (void*) this << llendl; - LL_INFOS("Baker") << "[3555] ~LLView() - Deleting view " << mName << ":" << (void*) this << LL_ENDL; if (LLView::sIsDrawing) { LL_INFOS("Baker") << "[3555] ~LLView() - Deleting view " << mName << " during UI draw() phase" << LL_ENDL; @@ -173,26 +171,21 @@ LLView::~LLView() gFocusMgr.removeMouseCaptureWithoutCallback( this ); } - LL_INFOS("Baker") << "[3555] ~LLView() - Deleting all children..." << LL_ENDL; deleteAllChildren(); - LL_INFOS("Baker") << "[3555] ~LLView() - done." << LL_ENDL; - if (mParentView != NULL) { - LL_INFOS("Baker") << "[3555] ~LLView() - Removing this child view" << LL_ENDL; + // LL_INFOS("Baker") << "[3555] ~LLView() - Removing this child view" << LL_ENDL; mParentView->removeChild(this); } if (mDefaultWidgets) { - LL_INFOS("Baker") << "[3555] ~LLView() - Deleting default widgets" << LL_ENDL; - delete mDefaultWidgets; mDefaultWidgets = NULL; } - LL_INFOS("Baker") << "[3555] Exiting ~LLView()" << LL_ENDL; + //LL_INFOS("Baker") << "[3555] Exiting ~LLView() " << (void*) this << LL_ENDL; } // virtual -- cgit v1.2.3 From 28d3bb09751aeebb6d7411c426b21c56246f9ff0 Mon Sep 17 00:00:00 2001 From: Baker Linden Date: Mon, 3 Mar 2014 11:53:57 -0800 Subject: [MAINT-3555][MAINT-3703] - Removed logging for MAINT-3555 - Added NULL guard to fix MAINT-3703 (hopefully) --- indra/llui/llview.cpp | 8 -------- 1 file changed, 8 deletions(-) (limited to 'indra/llui/llview.cpp') diff --git a/indra/llui/llview.cpp b/indra/llui/llview.cpp index 10d9616152..5ee2169b66 100755 --- a/indra/llui/llview.cpp +++ b/indra/llui/llview.cpp @@ -150,14 +150,10 @@ LLView::LLView(const LLView::Params& p) LLView::~LLView() { - //LL_INFOS("Baker") << "[3555] ~LLView -- " << mName << ":" << (void*) this << " ----------------------" << LL_ENDL; - dirtyRect(); //llinfos << "Deleting view " << mName << ":" << (void*) this << llendl; if (LLView::sIsDrawing) { - LL_INFOS("Baker") << "[3555] ~LLView() - Deleting view " << mName << " during UI draw() phase" << LL_ENDL; - lldebugs << "Deleting view " << mName << " during UI draw() phase" << llendl; } // llassert(LLView::sIsDrawing == FALSE); @@ -167,7 +163,6 @@ LLView::~LLView() if( hasMouseCapture() ) { //llwarns << "View holding mouse capture deleted: " << getName() << ". Mouse capture removed." << llendl; - LL_INFOS("Baker") << "[3555] ~LLView() - View holding mouse capture deleted: " << getName() << ". Mouse capture removed." << LL_ENDL; gFocusMgr.removeMouseCaptureWithoutCallback( this ); } @@ -175,7 +170,6 @@ LLView::~LLView() if (mParentView != NULL) { - // LL_INFOS("Baker") << "[3555] ~LLView() - Removing this child view" << LL_ENDL; mParentView->removeChild(this); } @@ -184,8 +178,6 @@ LLView::~LLView() delete mDefaultWidgets; mDefaultWidgets = NULL; } - - //LL_INFOS("Baker") << "[3555] Exiting ~LLView() " << (void*) this << LL_ENDL; } // virtual -- cgit v1.2.3