diff --git a/src/spice2x/acio/acio.cpp b/src/spice2x/acio/acio.cpp index 2ae28f4..be8546f 100644 --- a/src/spice2x/acio/acio.cpp +++ b/src/spice2x/acio/acio.cpp @@ -41,6 +41,7 @@ namespace acio { HINSTANCE DLL_INSTANCE = nullptr; std::vector MODULES; + std::atomic IO_INIT_IN_PROGRESS = false; } /* @@ -58,6 +59,7 @@ static inline acio::HookMode get_hookmode() { void acio::attach() { log_info("acio", "SpiceTools ACIO"); + IO_INIT_IN_PROGRESS = true; // load settings and instance acio::DLL_INSTANCE = LoadLibraryA("libacio.dll"); @@ -111,6 +113,8 @@ void acio::attach() { for (auto &module : MODULES) { module->attach(); } + + IO_INIT_IN_PROGRESS = false; } void acio::attach_icca() { diff --git a/src/spice2x/acio/acio.h b/src/spice2x/acio/acio.h index b2f1838..e9497a2 100644 --- a/src/spice2x/acio/acio.h +++ b/src/spice2x/acio/acio.h @@ -1,5 +1,6 @@ #pragma once +#include #include #include @@ -11,6 +12,7 @@ namespace acio { // globals extern HINSTANCE DLL_INSTANCE; extern std::vector MODULES; + extern std::atomic IO_INIT_IN_PROGRESS; void attach(); void attach_icca(); diff --git a/src/spice2x/launcher/signal.cpp b/src/spice2x/launcher/signal.cpp index eab7b11..4291c4f 100644 --- a/src/spice2x/launcher/signal.cpp +++ b/src/spice2x/launcher/signal.cpp @@ -6,6 +6,7 @@ #include #include +#include "acio/acio.h" #include "external/stackwalker/stackwalker.h" #include "hooks/libraryhook.h" #include "launcher/shutdown.h" @@ -97,6 +98,19 @@ static LONG WINAPI TopLevelExceptionFilter(struct _EXCEPTION_POINTERS *Exception // print signal log_warning("signal", "exception raised: {}", exception_code(ExceptionRecord)); + // check ACIO init failures + if (acio::IO_INIT_IN_PROGRESS) { + log_warning( + "signal", + "exception raised during ACIO init, this usually happens when a third party application interferes with hooks"); + log_warning( + "signal", + " please check for the following, disable them, and try launching the game again:"); + log_warning( + "signal", + " RivaTuner Statistics Server (RTSS), MSI Afterburner, kernel mode anti-cheat"); + } + // walk the exception chain struct _EXCEPTION_RECORD *record_cause = ExceptionRecord->ExceptionRecord; while (record_cause != nullptr) {