diff --git a/source/lib/sysdep/os/win/wseh.cpp b/source/lib/sysdep/os/win/wseh.cpp index 1be5de797e..0f954339a3 100644 --- a/source/lib/sysdep/os/win/wseh.cpp +++ b/source/lib/sysdep/os/win/wseh.cpp @@ -254,6 +254,11 @@ long __stdcall wseh_ExceptionFilter(struct _EXCEPTION_POINTERS* ep) if(win_is_locked(WDBG_SYM_CS) == 1) DEBUG_DISPLAY_ERROR(L"Exception raised while critical section is held - may deadlock.."); + // a dump file is essential for debugging, so write it before + // anything else goes wrong (especially before showing the error + // dialog because the user could choose to exit immediately) + wdbg_sym_WriteMinidump(ep); + // extract details from ExceptionRecord. wchar_t descriptionBuf[150]; const wchar_t* description = GetExceptionDescription(ep, descriptionBuf, ARRAY_SIZE(descriptionBuf)); @@ -262,10 +267,6 @@ long __stdcall wseh_ExceptionFilter(struct _EXCEPTION_POINTERS* ep) char func[DBG_SYMBOL_LEN] = {0}; GetExceptionLocus(ep, file, &line, func); - // this must happen before the error dialog because user could choose to - // exit immediately there. - wdbg_sym_WriteMinidump(ep); - wchar_t message[500]; const wchar_t* messageFormat = L"Much to our regret we must report the program has encountered an error.\r\n" diff --git a/source/ps/GameSetup/GameSetup.cpp b/source/ps/GameSetup/GameSetup.cpp index 10d47dd75a..7365bbdec1 100644 --- a/source/ps/GameSetup/GameSetup.cpp +++ b/source/ps/GameSetup/GameSetup.cpp @@ -607,7 +607,7 @@ static void InitVfs(const CmdLineArgs& args) CStr path = "mods/" + mods[i]; size_t priority = i; const int flags = VFS_MOUNT_WATCH|VFS_MOUNT_ARCHIVABLE; - g_VFS->Mount("", binariesDir/"../data"/path, flags, priority); + g_VFS->Mount("", (binariesDir/"../data")/path, flags, priority); } // don't try g_VFS->Display yet: SDL_Init hasn't yet redirected stdout