1
0
mirror of https://foundry.openuru.org/gitblit/r/CWE-ou-minkata.git synced 2025-07-20 04:09:16 +00:00

Remove trap for avoiding debugger on client.

Add exception handlers for pure function call traps
  (Cherry picked from 3fe3a1d H-uru/Plasma "Catch moar crashes")
This commit is contained in:
rarified
2020-07-11 19:50:03 -06:00
parent 0e44781d78
commit 0568563776
2 changed files with 27 additions and 1 deletions

View File

@ -1656,7 +1656,7 @@ hsBool plClient::MainLoop()
} }
#endif #endif
#ifdef PLASMA_EXTERNAL_RELEASE #if defined(PLASMA_EXTERNAL_RELEASE) && defined(PLASMA_EXTERNAL_NODEBUGGER)
if (DebugIsDebuggerPresent()) if (DebugIsDebuggerPresent())
{ {
NetCliAuthLogClientDebuggerConnect(); NetCliAuthLogClientDebuggerConnect();

View File

@ -231,6 +231,24 @@ const GUID NEXUS_GUID = {
0x5bfdb060, 0x6a4, 0x11d0, 0x9c, 0x4f, 0x0, 0xa0, 0xc9, 0x5, 0x42, 0x5e}; 0x5bfdb060, 0x6a4, 0x11d0, 0x9c, 0x4f, 0x0, 0xa0, 0xc9, 0x5, 0x42, 0x5e};
#endif #endif
//==============================================================================
// Debugger hooks for common untracable faults
#ifdef _MSC_VER
#include <crtdbg.h>
static void IInvalidParameter(const wchar_t* expression, const wchar_t* function, const wchar_t* file, unsigned int line, uintptr_t)
{
__debugbreak();
}
static void IPureVirtualCall()
{
__debugbreak();
}
#endif // _MSC_VER
// Detect whether we're running under TRANSGAMING Cider // Detect whether we're running under TRANSGAMING Cider
//============================================================================== //==============================================================================
@ -1967,6 +1985,14 @@ int WINAPI WinMain(HINSTANCE hInst, HINSTANCE hPrevInst, LPSTR lpCmdLine, int nC
// Reestablish exception handler after PhysX stole it // Reestablish exception handler after PhysX stole it
SetUnhandledExceptionFilter( plCustomUnhandledExceptionFilter ); SetUnhandledExceptionFilter( plCustomUnhandledExceptionFilter );
#ifdef _MSC_VER
// Sigh... The Visual C++ Runtime likes to throw up dialogs sometimes.
// The user cares not about dialogs. We just want to get a minidump...
// See: http://www.altdevblogaday.com/2012/07/20/more-adventures-in-failing-to-crash-properly/
_set_invalid_parameter_handler(IInvalidParameter);
_set_purecall_handler(IPureVirtualCall);
#endif // _MSC_VER
// I want it on top! I mean it! // I want it on top! I mean it!
BringWindowToTop( gClient->GetWindowHandle() ); BringWindowToTop( gClient->GetWindowHandle() );