From 2c5e306e14c0cedb57a19bf7f165d57510c5f62e Mon Sep 17 00:00:00 2001 From: maksymsproductengine Date: Fri, 22 Nov 2013 20:16:37 +0200 Subject: MAINT-3474 FIXED crash on startup in LLTextureCache::purgeAllTextures(bool) attempting to delete texture cache --- indra/llvfs/lldiriterator.cpp | 23 ++++++++++++++++------- 1 file changed, 16 insertions(+), 7 deletions(-) (limited to 'indra/llvfs') diff --git a/indra/llvfs/lldiriterator.cpp b/indra/llvfs/lldiriterator.cpp index 460d2a8b4f..229608231c 100755 --- a/indra/llvfs/lldiriterator.cpp +++ b/indra/llvfs/lldiriterator.cpp @@ -119,16 +119,25 @@ bool LLDirIterator::Impl::next(std::string &fname) fs::directory_iterator end_itr; // default construction yields past-the-end bool found = false; - while (mIter != end_itr && !found) + + // Check if path is a directory. + try { - boost::smatch match; - std::string name = mIter->path().filename().string(); - if (found = boost::regex_match(name, match, mFilterExp)) + while (mIter != end_itr && !found) { - fname = name; + boost::smatch match; + std::string name = mIter->path().filename().string(); + if (found = boost::regex_match(name, match, mFilterExp)) + { + fname = name; + } + + ++mIter; } - - ++mIter; + } + catch (const fs::filesystem_error& e) + { + llwarns << e.what() << llendl; } return found; -- cgit v1.2.3 From d7b902d57503dddca59c3d7a772e4f6a454afa7b Mon Sep 17 00:00:00 2001 From: Baker Linden Date: Fri, 14 Feb 2014 13:56:36 -0800 Subject: [MAINT-3555] Crash in LLPanel::~LLPanel() on shutdown - Added clear() after DeletePointer() call to hopfully fix this... --- indra/llvfs/llvfs.cpp | 1 + 1 file changed, 1 insertion(+) (limited to 'indra/llvfs') diff --git a/indra/llvfs/llvfs.cpp b/indra/llvfs/llvfs.cpp index 82c926620a..b31c6a9944 100755 --- a/indra/llvfs/llvfs.cpp +++ b/indra/llvfs/llvfs.cpp @@ -1835,6 +1835,7 @@ void LLVFS::audit() } for_each(audit_blocks.begin(), audit_blocks.end(), DeletePointer()); + audit_blocks.clear(); } -- cgit v1.2.3 From 38915f119c5bf3d85084b12939ad815f68fefad0 Mon Sep 17 00:00:00 2001 From: simon Date: Fri, 14 Feb 2014 14:57:08 -0800 Subject: More memory cleanup of containers after DeletePairedPointer() usage. --- indra/llvfs/llvfs.cpp | 1 + 1 file changed, 1 insertion(+) (limited to 'indra/llvfs') diff --git a/indra/llvfs/llvfs.cpp b/indra/llvfs/llvfs.cpp index b31c6a9944..7b589f5b96 100755 --- a/indra/llvfs/llvfs.cpp +++ b/indra/llvfs/llvfs.cpp @@ -578,6 +578,7 @@ LLVFS::~LLVFS() mFreeBlocksByLength.clear(); for_each(mFreeBlocksByLocation.begin(), mFreeBlocksByLocation.end(), DeletePairedPointer()); + mFreeBlocksByLocation.clear(); unlockAndClose(mDataFP); mDataFP = NULL; -- cgit v1.2.3