From c04073da377a222d2d244c94683816c412dfad36 Mon Sep 17 00:00:00 2001 From: Nat Goodspeed Date: Thu, 27 Apr 2017 08:40:01 -0400 Subject: DRTVWR-418: Use conventional LLSingleton init/cleanup for LLWinDebug. LLWinDebug, though an LLSingleton, had (and required explicit calls to) special init() and cleanup() methods. Kitty Barnett points out that the cleanup() method was actually being called after LLSingletonBase::deleteAll(), requiring resurrection of the deleted LLWinDebug, which sometimes led to crashes. (Resurrecting deleted LLSingletons is always suspect.) Change LLWinDebug::init() and cleanup() to the conventional initSingleton() and cleanupSingleton() methods. This eliminates the need to make special method calls at all. In particular, cleanupSingleton() will be called by the existing LLSingletonBase::cleanupAll() call near viewer shutdown. We retain the early LLWinDebug::instance() call, which implicitly initializes the LLWinDebug instance, because evidently we want that initialized early. But we no longer require a separate init() call. --- indra/newview/llwindebug.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'indra/newview/llwindebug.h') diff --git a/indra/newview/llwindebug.h b/indra/newview/llwindebug.h index 90882cf04a..5a0d63f027 100644 --- a/indra/newview/llwindebug.h +++ b/indra/newview/llwindebug.h @@ -36,9 +36,9 @@ class LLWinDebug: { LLSINGLETON_EMPTY_CTOR(LLWinDebug); public: - static void init(); + static void initSingleton(); static void generateMinidump(struct _EXCEPTION_POINTERS *pExceptionInfo = NULL); - static void cleanup(); + static void cleanupSingleton(); private: static void writeDumpToFile(MINIDUMP_TYPE type, MINIDUMP_EXCEPTION_INFORMATION *ExInfop, const std::string& filename); }; -- cgit v1.2.3 From b94e2d0103168f143ee7579f01f0d45fc63a4e84 Mon Sep 17 00:00:00 2001 From: Nat Goodspeed Date: Thu, 27 Apr 2017 09:02:37 -0400 Subject: DRTVWR-418: initSingleton(), cleanupSingleton() must be non-static. --- indra/newview/llwindebug.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'indra/newview/llwindebug.h') diff --git a/indra/newview/llwindebug.h b/indra/newview/llwindebug.h index 5a0d63f027..7e5818ba1c 100644 --- a/indra/newview/llwindebug.h +++ b/indra/newview/llwindebug.h @@ -36,9 +36,9 @@ class LLWinDebug: { LLSINGLETON_EMPTY_CTOR(LLWinDebug); public: - static void initSingleton(); + void initSingleton(); static void generateMinidump(struct _EXCEPTION_POINTERS *pExceptionInfo = NULL); - static void cleanupSingleton(); + void cleanupSingleton(); private: static void writeDumpToFile(MINIDUMP_TYPE type, MINIDUMP_EXCEPTION_INFORMATION *ExInfop, const std::string& filename); }; -- cgit v1.2.3