From 930035ebdc308960bdb1a51ae622dd06f93a7255 Mon Sep 17 00:00:00 2001 From: Tofu Linden Date: Wed, 3 Feb 2010 20:29:57 +0000 Subject: CID-273 Checker: UNINIT_CTOR Function: NamedTimerFactory::NamedTimerFactory() File: /indra/llcommon/llfasttimer_class.cpp --- indra/llcommon/llfasttimer_class.cpp | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'indra/llcommon') diff --git a/indra/llcommon/llfasttimer_class.cpp b/indra/llcommon/llfasttimer_class.cpp index fae0a66873..6d8d81e114 100644 --- a/indra/llcommon/llfasttimer_class.cpp +++ b/indra/llcommon/llfasttimer_class.cpp @@ -114,7 +114,11 @@ static timer_tree_dfs_iterator_t end_timer_tree() class NamedTimerFactory : public LLSingleton { public: - NamedTimerFactory() + NamedTimerFactory() + : mActiveTimerRoot(NULL), + mTimerRoot(NULL), + mAppTimer(NULL), + mRootFrameState(NULL) {} /*virtual */ void initSingleton() -- cgit v1.2.3 From 8b4823acfb1907f936c7a9f27e5138724f54faa7 Mon Sep 17 00:00:00 2001 From: Tofu Linden Date: Wed, 3 Feb 2010 20:33:47 +0000 Subject: CID-272 Checker: UNINIT_CTOR Function: LLTreeDFSPostIter>::_Const_iterator<(bool)0>>::LLTreeDFSPostIter() File: /indra/llcommon/lltreeiterators.h --- indra/llcommon/lltreeiterators.h | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'indra/llcommon') diff --git a/indra/llcommon/lltreeiterators.h b/indra/llcommon/lltreeiterators.h index c946566e84..034eeba65d 100644 --- a/indra/llcommon/lltreeiterators.h +++ b/indra/llcommon/lltreeiterators.h @@ -451,10 +451,10 @@ public: /// Instantiate an LLTreeDFSPostIter to start a depth-first walk. Pass /// functors to extract the 'child begin' and 'child end' iterators from /// each node. - LLTreeDFSPostIter(const ptr_type& node, const func_type& beginfunc, const func_type& endfunc): - mBeginFunc(beginfunc), - mEndFunc(endfunc), - mSkipAncestors(false) + LLTreeDFSPostIter(const ptr_type& node, const func_type& beginfunc, const func_type& endfunc) + : mBeginFunc(beginfunc), + mEndFunc(endfunc), + mSkipAncestors(false) { if (! node) return; @@ -462,7 +462,7 @@ public: makeCurrent(); } /// Instantiate an LLTreeDFSPostIter to mark the end of the walk - LLTreeDFSPostIter() {} + LLTreeDFSPostIter() : mSkipAncestors(false) {} /// flags iterator logic to skip traversing ancestors of current node on next increment void skipAncestors(bool skip = true) { mSkipAncestors = skip; } -- cgit v1.2.3 From 193f2e2edc1ade7a211c57a60bc42687aab036d4 Mon Sep 17 00:00:00 2001 From: Tofu Linden Date: Wed, 3 Feb 2010 20:36:56 +0000 Subject: CID-271 Checker: UNINIT_CTOR Function: LLTreeDFSIter>::_Const_iterator<(bool)0>>::LLTreeDFSIter() File: /indra/llcommon/lltreeiterators.h --- indra/llcommon/lltreeiterators.h | 26 +++++++++++++------------- 1 file changed, 13 insertions(+), 13 deletions(-) (limited to 'indra/llcommon') diff --git a/indra/llcommon/lltreeiterators.h b/indra/llcommon/lltreeiterators.h index 034eeba65d..cb1304c54e 100644 --- a/indra/llcommon/lltreeiterators.h +++ b/indra/llcommon/lltreeiterators.h @@ -343,20 +343,20 @@ public: /// Instantiate an LLTreeDFSIter to start a depth-first walk. Pass /// functors to extract the 'child begin' and 'child end' iterators from /// each node. - LLTreeDFSIter(const ptr_type& node, const func_type& beginfunc, const func_type& endfunc): - mBeginFunc(beginfunc), - mEndFunc(endfunc), - mSkipChildren(false) + LLTreeDFSIter(const ptr_type& node, const func_type& beginfunc, const func_type& endfunc) + : mBeginFunc(beginfunc), + mEndFunc(endfunc), + mSkipChildren(false) { // Only push back this node if it's non-NULL! if (node) mPending.push_back(node); } /// Instantiate an LLTreeDFSIter to mark the end of the walk - LLTreeDFSIter() {} + LLTreeDFSIter() : mSkipChildren(false) {} - /// flags iterator logic to skip traversing children of current node on next increment - void skipDescendants(bool skip = true) { mSkipChildren = skip; } + /// flags iterator logic to skip traversing children of current node on next increment + void skipDescendants(bool skip = true) { mSkipChildren = skip; } private: /// leverage boost::iterator_facade @@ -405,8 +405,8 @@ private: func_type mBeginFunc; /// functor to extract end() child iterator func_type mEndFunc; - /// flag which controls traversal of children (skip children of current node if true) - bool mSkipChildren; + /// flag which controls traversal of children (skip children of current node if true) + bool mSkipChildren; }; /** @@ -455,17 +455,17 @@ public: : mBeginFunc(beginfunc), mEndFunc(endfunc), mSkipAncestors(false) - { + { if (! node) return; mPending.push_back(typename list_type::value_type(node, false)); makeCurrent(); } /// Instantiate an LLTreeDFSPostIter to mark the end of the walk - LLTreeDFSPostIter() : mSkipAncestors(false) {} + LLTreeDFSPostIter() : mSkipAncestors(false) {} - /// flags iterator logic to skip traversing ancestors of current node on next increment - void skipAncestors(bool skip = true) { mSkipAncestors = skip; } + /// flags iterator logic to skip traversing ancestors of current node on next increment + void skipAncestors(bool skip = true) { mSkipAncestors = skip; } private: /// leverage boost::iterator_facade -- cgit v1.2.3 From 33a92be286e2b63f76b9a032e5912806d717959f Mon Sep 17 00:00:00 2001 From: Tofu Linden Date: Wed, 3 Feb 2010 20:39:52 +0000 Subject: CID-269 Checker: UNINIT_CTOR Function: LLWorkerClass::LLWorkerClass(LLWorkerThread *, const std::basic_string, std::allocator>&) File: /indra/llcommon/llworkerthread.cpp --- indra/llcommon/llworkerthread.cpp | 1 + 1 file changed, 1 insertion(+) (limited to 'indra/llcommon') diff --git a/indra/llcommon/llworkerthread.cpp b/indra/llcommon/llworkerthread.cpp index 82c736266d..1b0e03cb2a 100644 --- a/indra/llcommon/llworkerthread.cpp +++ b/indra/llcommon/llworkerthread.cpp @@ -188,6 +188,7 @@ LLWorkerClass::LLWorkerClass(LLWorkerThread* workerthread, const std::string& na : mWorkerThread(workerthread), mWorkerClassName(name), mRequestHandle(LLWorkerThread::nullHandle()), + mRequestPriority(LLWorkerThread::PRIORITY_NORMAL), mMutex(NULL), mWorkFlags(0) { -- cgit v1.2.3 From 14d942f16b284ca5180b29f3c912d158c0d0cdd0 Mon Sep 17 00:00:00 2001 From: Tofu Linden Date: Thu, 4 Feb 2010 11:08:49 +0000 Subject: A flag+assert to help track bad behaviour in LLEventTimer, especially EXT-4754 --- indra/llcommon/lltimer.cpp | 6 ++++++ indra/llcommon/lltimer.h | 1 + 2 files changed, 7 insertions(+) (limited to 'indra/llcommon') diff --git a/indra/llcommon/lltimer.cpp b/indra/llcommon/lltimer.cpp index ef3e8dbc94..63634117b5 100644 --- a/indra/llcommon/lltimer.cpp +++ b/indra/llcommon/lltimer.cpp @@ -565,19 +565,23 @@ LLEventTimer::LLEventTimer(F32 period) : mEventTimer() { mPeriod = period; + mBusy = false; } LLEventTimer::LLEventTimer(const LLDate& time) : mEventTimer() { mPeriod = (F32)(time.secondsSinceEpoch() - LLDate::now().secondsSinceEpoch()); + mBusy = false; } LLEventTimer::~LLEventTimer() { + llassert(!mBusy); // this LLEventTimer was destroyed from its own tick() function - bad. } +//static void LLEventTimer::updateClass() { std::list completed_timers; @@ -587,10 +591,12 @@ void LLEventTimer::updateClass() F32 et = timer.mEventTimer.getElapsedTimeF32(); if (timer.mEventTimer.getStarted() && et > timer.mPeriod) { timer.mEventTimer.reset(); + timer.mBusy = true; if ( timer.tick() ) { completed_timers.push_back( &timer ); } + timer.mBusy = false; } } diff --git a/indra/llcommon/lltimer.h b/indra/llcommon/lltimer.h index d009c0f5f7..4d995d5bba 100644 --- a/indra/llcommon/lltimer.h +++ b/indra/llcommon/lltimer.h @@ -188,6 +188,7 @@ public: protected: LLTimer mEventTimer; F32 mPeriod; + bool mBusy; }; U64 LL_COMMON_API totalTime(); // Returns current system time in microseconds -- cgit v1.2.3 From 2c30ccf34d518ccedd0b3ffdeb2ba1da8d140a1d Mon Sep 17 00:00:00 2001 From: Tofu Linden Date: Thu, 4 Feb 2010 11:24:14 +0000 Subject: EXT-4754 Crash in LLEventTimer::updateClass --- indra/llcommon/lltimer.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'indra/llcommon') diff --git a/indra/llcommon/lltimer.cpp b/indra/llcommon/lltimer.cpp index 63634117b5..21e165ebc9 100644 --- a/indra/llcommon/lltimer.cpp +++ b/indra/llcommon/lltimer.cpp @@ -578,7 +578,7 @@ LLEventTimer::LLEventTimer(const LLDate& time) LLEventTimer::~LLEventTimer() { - llassert(!mBusy); // this LLEventTimer was destroyed from its own tick() function - bad. + llassert(!mBusy); // this LLEventTimer was destroyed from within its own tick() function - bad. if you want tick() to cause destruction of its own timer, make it return true. } //static -- cgit v1.2.3