From b32d3506dec5a4b7c5179deef9aff3d699c95956 Mon Sep 17 00:00:00 2001 From: Kitzunu <24550914+Kitzunu@users.noreply.github.com> Date: Fri, 17 Mar 2023 07:19:03 +0100 Subject: [PATCH] fix(Core/Debugging): Improve SymInitialize fail message (#15424) * clarify that this is not the crash error, but an error with the crash report itself * improve formatting and message boundaries * warn the reader that this means the call stack symbols may be inaccurate * Cherry-pick commit (https://github.com/TrinityCore/TrinityCore/commit/6e37438e5dadd30dc2ce36e468045e0be4d26c83) Co-authored-by: ihm-tswow <76849026+ihm-tswow@users.noreply.github.com> --- src/common/Debugging/WheatyExceptionReport.cpp | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/src/common/Debugging/WheatyExceptionReport.cpp b/src/common/Debugging/WheatyExceptionReport.cpp index 4006e44f9..be5663002 100644 --- a/src/common/Debugging/WheatyExceptionReport.cpp +++ b/src/common/Debugging/WheatyExceptionReport.cpp @@ -674,8 +674,13 @@ void WheatyExceptionReport::GenerateExceptionReport( // Initialize DbgHelp if (!SymInitialize(GetCurrentProcess(), 0, TRUE)) { - Log(_T("\n\rCRITICAL ERROR.\n\r Couldn't initialize the symbol handler for process.\n\rError [%s].\n\r\n\r"), - ErrorMessage(GetLastError())); + Log(_T("\r\n")); + Log(_T("----\r\n")); + Log(_T("SYMBOL HANDLER ERROR (THIS IS NOT THE CRASH ERROR)\r\n\r\n")); + Log(_T("Couldn't initialize symbol handler for process when generating crash report\r\n")); + Log(_T("Error: %s\r\n"), ErrorMessage(GetLastError())); + Log(_T("THE BELOW CALL STACKS MIGHT HAVE MISSING OR INACCURATE FILE/FUNCTION NAMES\r\n\r\n")); + Log(_T("----\r\n")); } CONTEXT trashableContext = *pCtx;