From 166ec74ff96e47ead531a5d765962ff864334886 Mon Sep 17 00:00:00 2001 From: "Vladimir Golovnev (Glassez)" Date: Sun, 7 Mar 2021 17:41:51 +0300 Subject: [PATCH] Look for qbittorrent.pdb in installation directory Pass application directory as PDB search path in SymInitialize. Otherwise it searches in application working directory so when you run qBittorrent with working directory other than its installation one it can't find qbittorent.pdb file and produces broken stacktrace. --- src/app/stacktrace_win.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/app/stacktrace_win.h b/src/app/stacktrace_win.h index 86bab11ce..7c92fba1e 100644 --- a/src/app/stacktrace_win.h +++ b/src/app/stacktrace_win.h @@ -24,6 +24,7 @@ #include #include +#include #include #include #ifdef __MINGW32__ @@ -256,7 +257,7 @@ const QString straceWin::getBacktrace() HANDLE hProcess = GetCurrentProcess(); HANDLE hThread = GetCurrentThread(); - SymInitialize(hProcess, NULL, TRUE); + SymInitializeW(hProcess, QCoreApplication::applicationDirPath().toStdWString().c_str(), TRUE); DWORD64 dwDisplacement;