summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--indra/llcommon/llqueuedthread.cpp34
-rw-r--r--indra/llui/llaccordionctrltab.cpp29
-rw-r--r--indra/newview/llappviewerwin32.cpp9
3 files changed, 63 insertions, 9 deletions
diff --git a/indra/llcommon/llqueuedthread.cpp b/indra/llcommon/llqueuedthread.cpp
index 0196a24b18..efeeb1340e 100644
--- a/indra/llcommon/llqueuedthread.cpp
+++ b/indra/llcommon/llqueuedthread.cpp
@@ -80,7 +80,7 @@ void LLQueuedThread::shutdown()
mRequestQueue.close();
}
- S32 timeout = 100;
+ S32 timeout = 50;
for ( ; timeout>0; timeout--)
{
if (isStopped())
@@ -101,19 +101,34 @@ void LLQueuedThread::shutdown()
}
QueuedRequest* req;
- S32 active_count = 0;
+ S32 queued_count = 0;
+ bool has_active = false;
+ lockData();
while ( (req = (QueuedRequest*)mRequestHash.pop_element()) )
{
- if (req->getStatus() == STATUS_QUEUED || req->getStatus() == STATUS_INPROGRESS)
+ if (req->getStatus() == STATUS_INPROGRESS)
+ {
+ has_active = true;
+ req->setFlags(FLAG_ABORT | FLAG_AUTO_COMPLETE);
+ continue;
+ }
+ if (req->getStatus() == STATUS_QUEUED)
{
- ++active_count;
+ ++queued_count;
req->setStatus(STATUS_ABORTED); // avoid assert in deleteRequest
}
req->deleteRequest();
}
- if (active_count)
+ unlockData();
+ if (queued_count)
+ {
+ LL_WARNS() << "~LLQueuedThread() called with unpocessed requests: " << queued_count << LL_ENDL;
+ }
+ if (has_active)
{
- LL_WARNS() << "~LLQueuedThread() called with active requests: " << active_count << LL_ENDL;
+ LL_WARNS() << "~LLQueuedThread() called with active requests!" << LL_ENDL;
+ ms_sleep(100); // last chance for request to finish
+ printQueueStats();
}
mRequestQueue.close();
@@ -570,7 +585,12 @@ LLQueuedThread::QueuedRequest::QueuedRequest(LLQueuedThread::handle_t handle, U3
LLQueuedThread::QueuedRequest::~QueuedRequest()
{
- llassert_always(mStatus == STATUS_DELETE);
+ if (mStatus != STATUS_DELETE)
+ {
+ // The only method to delete a request is deleteRequest(),
+ // it should have set the status to STATUS_DELETE
+ LL_ERRS() << "LLQueuedThread::QueuedRequest deleted with status " << mStatus << LL_ENDL;
+ }
}
//virtual
diff --git a/indra/llui/llaccordionctrltab.cpp b/indra/llui/llaccordionctrltab.cpp
index bdf93348bb..828bfb289b 100644
--- a/indra/llui/llaccordionctrltab.cpp
+++ b/indra/llui/llaccordionctrltab.cpp
@@ -479,7 +479,34 @@ void LLAccordionCtrlTab::onUpdateScrollToChild(const LLUICtrl *cntrl)
// Translate to parent coordinatess to check if we are in visible rectangle
rect.translate(getRect().mLeft, getRect().mBottom);
- if (!getRect().contains(rect))
+ bool needs_to_scroll = false;
+ const LLRect &acc_rect = getRect();
+ if (!acc_rect.contains(rect))
+ {
+ if (acc_rect.mTop < rect.mBottom || acc_rect.mBottom > rect.mTop)
+ {
+ // Content fully not in view
+ needs_to_scroll = true;
+ }
+ else if (acc_rect.getHeight() >= rect.getHeight())
+ {
+ // Content can be displayed fully, but only partially in view
+ needs_to_scroll = true;
+ }
+ else if (acc_rect.mTop <= rect.mTop || acc_rect.mBottom >= rect.mBottom)
+ {
+ // Intersects, but too big to be displayed fully
+ S32 covered_height = acc_rect.mTop > rect.mTop ? rect.mTop - acc_rect.mBottom : acc_rect.mTop - rect.mBottom;
+ constexpr F32 covered_ratio = 0.7f;
+ if (covered_height < covered_ratio * acc_rect.getHeight())
+ {
+ // Try to show bigger portion of the content
+ needs_to_scroll = true;
+ }
+ }
+ // else too big and in the middle of the view as is
+ }
+ if (needs_to_scroll)
{
// for accordition's scroll, height is in pixels
// Back to local coords and calculate position for scroller
diff --git a/indra/newview/llappviewerwin32.cpp b/indra/newview/llappviewerwin32.cpp
index 76c71f8778..bd1a08798b 100644
--- a/indra/newview/llappviewerwin32.cpp
+++ b/indra/newview/llappviewerwin32.cpp
@@ -183,7 +183,14 @@ namespace
// If marker doesn't exist, create a marker with 'other' code for next launch
// otherwise don't override existing file
// Any unmarked crashes will be considered as freezes
- app->createErrorMarker(LAST_EXEC_OTHER_CRASH);
+ if (app->logoutRequestSent())
+ {
+ app->createErrorMarker(LAST_EXEC_LOGOUT_CRASH);
+ }
+ else
+ {
+ app->createErrorMarker(LAST_EXEC_OTHER_CRASH);
+ }
}
} // MDSCB_EXCEPTIONCODE