mirror of
https://github.com/SWG-Source/client-tools.git
synced 2026-01-15 22:04:32 -05:00
Fix Crash Logging to txt & add verbosity
This commit is contained in:
@@ -10,7 +10,6 @@
|
||||
#include "sharedFoundation/ConfigSharedFoundation.h"
|
||||
|
||||
#include "sharedFoundation/ConfigFile.h"
|
||||
#include "sharedFoundation/Production.h"
|
||||
|
||||
// ======================================================================
|
||||
|
||||
@@ -22,7 +21,7 @@
|
||||
// ======================================================================
|
||||
|
||||
const int c_defaultFatalCallStackDepth = 32;
|
||||
const int c_defaultWarningCallStackDepth = PRODUCTION ? -1 : 8;
|
||||
const int c_defaultWarningCallStackDepth = -1;
|
||||
|
||||
// ======================================================================
|
||||
|
||||
@@ -65,6 +64,8 @@ namespace ConfigSharedFoundationNamespace
|
||||
bool ms_causeAccessViolation;
|
||||
|
||||
float ms_debugReportLongFrameTime;
|
||||
|
||||
bool ms_developmentMode;
|
||||
}
|
||||
|
||||
using namespace ConfigSharedFoundationNamespace;
|
||||
@@ -103,7 +104,7 @@ void ConfigSharedFoundation::install (const Defaults &defaults)
|
||||
KEY_BOOL(memoryBlockManagerDebugDumpOnRemove, false);
|
||||
|
||||
KEY_INT(fatalCallStackDepth, c_defaultFatalCallStackDepth);
|
||||
KEY_INT(warningCallStackDepth, PRODUCTION ? -1 : c_defaultWarningCallStackDepth);
|
||||
KEY_INT(warningCallStackDepth, c_defaultWarningCallStackDepth);
|
||||
KEY_BOOL(lookUpCallStackNames, true);
|
||||
|
||||
KEY_INT(processPriority, 0);
|
||||
@@ -114,6 +115,8 @@ void ConfigSharedFoundation::install (const Defaults &defaults)
|
||||
KEY_BOOL(causeAccessViolation, false);
|
||||
|
||||
KEY_FLOAT(debugReportLongFrameTime, 0.25f);
|
||||
|
||||
KEY_BOOL(developmentMode, true);
|
||||
}
|
||||
|
||||
// ----------------------------------------------------------------------
|
||||
@@ -255,6 +258,10 @@ bool ConfigSharedFoundation::getMemoryBlockManagerDebugDumpOnRemove ()
|
||||
|
||||
int ConfigSharedFoundation::getFatalCallStackDepth()
|
||||
{
|
||||
if(getDevelopmentMode())
|
||||
{
|
||||
return c_defaultFatalCallStackDepth;
|
||||
}
|
||||
return ms_fatalCallStackDepth;
|
||||
}
|
||||
|
||||
@@ -262,6 +269,10 @@ int ConfigSharedFoundation::getFatalCallStackDepth()
|
||||
|
||||
int ConfigSharedFoundation::getWarningCallStackDepth()
|
||||
{
|
||||
if(getDevelopmentMode())
|
||||
{
|
||||
return 12;
|
||||
}
|
||||
return ms_warningCallStackDepth;
|
||||
}
|
||||
|
||||
@@ -269,6 +280,10 @@ int ConfigSharedFoundation::getWarningCallStackDepth()
|
||||
|
||||
bool ConfigSharedFoundation::getLookUpCallStackNames()
|
||||
{
|
||||
if(getDevelopmentMode())
|
||||
{
|
||||
return true;
|
||||
}
|
||||
return ms_lookUpCallStackNames;
|
||||
}
|
||||
|
||||
@@ -315,4 +330,22 @@ float ConfigSharedFoundation::getDebugReportLongFrameTime()
|
||||
return ms_debugReportLongFrameTime;
|
||||
}
|
||||
|
||||
// ----------------------------------------------------------------------
|
||||
|
||||
// This is an SWG Source addition we're using for the purposes of defaulting
|
||||
// more verbose logging and development tools to ON but we're using a config
|
||||
// option so players wanting a more live-like client to share don't have to
|
||||
// recompile based on the PRODUCTION constant and can instead just set this
|
||||
// [SharedFoundation] developmentMode=false if they want
|
||||
|
||||
// ***** WARNING ******
|
||||
// This is a config toggle which anyone can change so obviously nothing
|
||||
// related to access should be wrapped in this (read: things that should
|
||||
// require god mode still need to use PlayerObject::isAdmin() not this)
|
||||
|
||||
bool ConfigSharedFoundation::getDevelopmentMode()
|
||||
{
|
||||
return ms_developmentMode;
|
||||
}
|
||||
|
||||
// ======================================================================
|
||||
|
||||
@@ -68,6 +68,8 @@ public:
|
||||
static bool getCauseAccessViolation();
|
||||
|
||||
static float getDebugReportLongFrameTime();
|
||||
|
||||
static bool getDevelopmentMode();
|
||||
};
|
||||
|
||||
// ======================================================================
|
||||
|
||||
@@ -79,6 +79,7 @@
|
||||
#include "swgClientUserInterface/SwgCuiG15Lcd.h"
|
||||
#include "swgClientUserInterface/SwgCuiManager.h"
|
||||
#include "swgSharedNetworkMessages/SetupSwgSharedNetworkMessages.h"
|
||||
#include "sharedFoundation/ConfigSharedFoundation.h"
|
||||
|
||||
|
||||
#include "libMozilla/libMozilla.h"
|
||||
@@ -166,11 +167,8 @@ int ClientMain(
|
||||
#if PRODUCTION
|
||||
data.demoMode = true;
|
||||
#endif
|
||||
if (ApplicationVersion::isPublishBuild() || ApplicationVersion::isBootlegBuild())
|
||||
{
|
||||
data.writeMiniDumps = true;
|
||||
}
|
||||
|
||||
data.writeMiniDumps = true; // SWG Source Change - Just always write crash log .txt files, there's no reason not to
|
||||
|
||||
SetupSharedFoundation::install(data);
|
||||
|
||||
REPORT_LOG(true, ("ClientMain: Command Line = \"%s\"\n", lpCmdLine));
|
||||
|
||||
@@ -7,6 +7,14 @@
|
||||
//
|
||||
// ======================================================================
|
||||
|
||||
// **********************************************************************
|
||||
// SWG Source 2021 - Aconite
|
||||
// some modifications have been made to this to, for example, stop the
|
||||
// application from sending emails to SOE but this needs some more work!
|
||||
// todo this needs to be cleaned up
|
||||
// todo this probably could use some new detection/setting support for operating systems made this decade
|
||||
// **********************************************************************
|
||||
|
||||
#include "FirstSwgClientSetup.h"
|
||||
#include "SwgClientSetup.h"
|
||||
|
||||
@@ -50,8 +58,8 @@ namespace SwgClientSetupNamespace
|
||||
TCHAR const * const cms_lastRatingTimeRegistryKey = _T("LastRatingTime");
|
||||
TCHAR const * const cms_machineRequirementsDisplayCountRegistryKey = _T("MachineRequirementsDisplayCount");
|
||||
TCHAR const * const cms_applicationName = _T("SwgClient_r.exe");
|
||||
char const * const cms_fromEmailAddress = "swgbetatestcrashes@soe.sony.com";
|
||||
char const * const cms_toEmailAddress = "swgbetatestcrashes@soe.sony.com";
|
||||
//char const * const cms_fromEmailAddress = "swgbetatestcrashes@soe.sony.com";
|
||||
//char const * const cms_toEmailAddress = "swgbetatestcrashes@soe.sony.com";
|
||||
TCHAR const * const cms_fileNameMask = _T("SwgClient_?.exe-*.*");
|
||||
TCHAR const * const cms_languageStringJapanese = _T("ja");
|
||||
|
||||
@@ -389,8 +397,8 @@ BOOL SwgClientSetupApp::InitInstance()
|
||||
CloseHandle(semaphore);
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
detectAndSendMinidumps ();
|
||||
|
||||
//detectAndSendMinidumps ();
|
||||
|
||||
ClientMachine::install ();
|
||||
|
||||
@@ -484,7 +492,7 @@ BOOL SwgClientSetupApp::InitInstance()
|
||||
|
||||
Options::save ();
|
||||
|
||||
detectAndSendHardwareInformation ();
|
||||
//detectAndSendHardwareInformation ();
|
||||
|
||||
bool const displayMessage =
|
||||
(ClientMachine::getPhysicalMemorySize () < 500) ||
|
||||
@@ -743,6 +751,7 @@ void SwgClientSetupApp::configure ()
|
||||
|
||||
// ----------------------------------------------------------------------
|
||||
|
||||
/*
|
||||
void SwgClientSetupApp::detectAndSendMinidumps ()
|
||||
{
|
||||
typedef std::vector<std::wstring> StringList;
|
||||
@@ -852,9 +861,11 @@ void SwgClientSetupApp::detectAndSendMinidumps ()
|
||||
AfxMessageBox (detectedStr, NULL, MB_ICONINFORMATION | MB_OK);
|
||||
}
|
||||
}
|
||||
*/
|
||||
|
||||
// ----------------------------------------------------------------------
|
||||
|
||||
/*
|
||||
void SwgClientSetupApp::detectAndSendHardwareInformation ()
|
||||
{
|
||||
if (getAutomaticallySendHardwareInformation())
|
||||
@@ -884,6 +895,7 @@ void SwgClientSetupApp::detectAndSendHardwareInformation ()
|
||||
}
|
||||
}
|
||||
}
|
||||
*/
|
||||
|
||||
// ----------------------------------------------------------------------
|
||||
|
||||
|
||||
@@ -59,8 +59,8 @@ public:
|
||||
DECLARE_MESSAGE_MAP()
|
||||
|
||||
private:
|
||||
void detectAndSendMinidumps ();
|
||||
void detectAndSendHardwareInformation ();
|
||||
//void detectAndSendMinidumps ();
|
||||
//void detectAndSendHardwareInformation ();
|
||||
};
|
||||
|
||||
// ======================================================================
|
||||
|
||||
Reference in New Issue
Block a user