Navigation
API > API/Runtime > API/Runtime/Core
Contains a runtime crash's properties that are common for all platforms. This may change in the future.
| Name | FGenericCrashContext |
| Type | struct |
| Header File | /Engine/Source/Runtime/Core/Public/GenericPlatform/GenericPlatformCrashContext.h |
| Include Path | #include "GenericPlatform/GenericPlatformCrashContext.h" |
Syntax
struct FGenericCrashContext
Derived Classes
Constructors
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
FGenericCrashContext
(
ECrashContextType InType, |
Default constructor. | GenericPlatform/GenericPlatformCrashContext.h | |
FGenericCrashContext
(
const FGenericCrashContext& |
FNoncopyable. | GenericPlatform/GenericPlatformCrashContext.h |
Destructors
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
virtual ~FGenericCrashContext() |
GenericPlatform/GenericPlatformCrashContext.h |
Constants
| Name | Type | Remarks | Include Path |
|---|---|---|---|
| AttendedStatusTag | const TCHAR *const | GenericPlatform/GenericPlatformCrashContext.h | |
| bIsInitialized | bool | Whether the Initialize() has been called | GenericPlatform/GenericPlatformCrashContext.h |
| BuildVersionTag | const TCHAR *const | GenericPlatform/GenericPlatformCrashContext.h | |
| CallStackTag | const TCHAR *const | GenericPlatform/GenericPlatformCrashContext.h | |
| ConfigSectionName | const TCHAR *const | GenericPlatform/GenericPlatformCrashContext.h | |
| CrashConfigExtension | const TCHAR *const | GenericPlatform/GenericPlatformCrashContext.h | |
| CrashConfigFileNameA | const ANSICHAR *const | GenericPlatform/GenericPlatformCrashContext.h | |
| CrashConfigFileNameW | const TCHAR *const | GenericPlatform/GenericPlatformCrashContext.h | |
| CrashConfigPurgeDays | const TCHAR *const | GenericPlatform/GenericPlatformCrashContext.h | |
| CrashContextExtension | const TCHAR *const | GenericPlatform/GenericPlatformCrashContext.h | |
| CrashContextRuntimeXMLNameA | const ANSICHAR *const | GenericPlatform/GenericPlatformCrashContext.h | |
| CrashContextRuntimeXMLNameW | const TCHAR *const | GenericPlatform/GenericPlatformCrashContext.h | |
| CrashGUIDLength | int32 | GenericPlatform/GenericPlatformCrashContext.h | |
| CrashGUIDRootPrefix | const TCHAR *const | GenericPlatform/GenericPlatformCrashContext.h | |
| CrashGuidTag | const TCHAR *const | GenericPlatform/GenericPlatformCrashContext.h | |
| CrashReporterMessageTag | const TCHAR *const | GenericPlatform/GenericPlatformCrashContext.h | |
| CrashReportOptionalAttachmentsDirName | const TCHAR *const | GenericPlatform/GenericPlatformCrashContext.h | |
| CrashTypeAbnormalShutdown | const TCHAR *const | GenericPlatform/GenericPlatformCrashContext.h | |
| CrashTypeAssert | const TCHAR *const | GenericPlatform/GenericPlatformCrashContext.h | |
| CrashTypeCrash | const TCHAR *const | GenericPlatform/GenericPlatformCrashContext.h | |
| CrashTypeEnsure | const TCHAR *const | GenericPlatform/GenericPlatformCrashContext.h | |
| CrashTypeGPU | const TCHAR *const | GenericPlatform/GenericPlatformCrashContext.h | |
| CrashTypeHang | const TCHAR *const | GenericPlatform/GenericPlatformCrashContext.h | |
| CrashTypeOutOfMemory | const TCHAR *const | GenericPlatform/GenericPlatformCrashContext.h | |
| CrashTypeStall | const TCHAR *const | GenericPlatform/GenericPlatformCrashContext.h | |
| CrashTypeTag | const TCHAR *const | GenericPlatform/GenericPlatformCrashContext.h | |
| CrashTypeVerseRuntimeError | const TCHAR *const | GenericPlatform/GenericPlatformCrashContext.h | |
| CrashVersionTag | const TCHAR *const | GenericPlatform/GenericPlatformCrashContext.h | |
| DeploymentNameTag | const TCHAR *const | GenericPlatform/GenericPlatformCrashContext.h | |
| EnabledPluginsTag | const TCHAR *const | GenericPlatform/GenericPlatformCrashContext.h | |
| EngineDataTag | const TCHAR *const | GenericPlatform/GenericPlatformCrashContext.h | |
| EngineModeExDirty | const TCHAR *const | GenericPlatform/GenericPlatformCrashContext.h | |
| EngineModeExUnknown | const TCHAR *const | GenericPlatform/GenericPlatformCrashContext.h | |
| EngineModeExVanilla | const TCHAR *const | GenericPlatform/GenericPlatformCrashContext.h | |
| ErrorMessageTag | const TCHAR *const | GenericPlatform/GenericPlatformCrashContext.h | |
| ExecutionGuid | const FGuid | A guid that identifies this particular execution. Allows multiple crash reports from the same run of the project to be tied together. | GenericPlatform/GenericPlatformCrashContext.h |
| ExecutionGuidTag | const TCHAR *const | GenericPlatform/GenericPlatformCrashContext.h | |
| GameDataTag | const TCHAR *const | GenericPlatform/GenericPlatformCrashContext.h | |
| GameNameTag | const TCHAR *const | GenericPlatform/GenericPlatformCrashContext.h | |
| IsAssertTag | const TCHAR *const | GenericPlatform/GenericPlatformCrashContext.h | |
| IsEnsureTag | const TCHAR *const | GenericPlatform/GenericPlatformCrashContext.h | |
| IsInternalBuildTag | const TCHAR *const | GenericPlatform/GenericPlatformCrashContext.h | |
| IsPerforceBuildTag | const TCHAR *const | GenericPlatform/GenericPlatformCrashContext.h | |
| IsRequestingExitTag | const TCHAR *const | GenericPlatform/GenericPlatformCrashContext.h | |
| IsSourceDistributionTag | const TCHAR *const | GenericPlatform/GenericPlatformCrashContext.h | |
| IsStallTag | const TCHAR *const | GenericPlatform/GenericPlatformCrashContext.h | |
| IsWithDebugInfoTag | const TCHAR *const | GenericPlatform/GenericPlatformCrashContext.h | |
| LogFilePathTag | const TCHAR *const | GenericPlatform/GenericPlatformCrashContext.h | |
| NewLineTag | const TCHAR *const | GenericPlatform/GenericPlatformCrashContext.h | |
| OnEngineDataReset | FEngineDataResetDelegate | Engine and game data set / reset delegates | GenericPlatform/GenericPlatformCrashContext.h |
| OnEngineDataSet | FEngineDataSetDelegate | GenericPlatform/GenericPlatformCrashContext.h | |
| OnGameDataReset | FGameDataResetDelegate | GenericPlatform/GenericPlatformCrashContext.h | |
| OnGameDataSet | FGameDataSetDelegate | GenericPlatform/GenericPlatformCrashContext.h | |
| OutOfProcessCrashReporterExitCode | volatile int64 | The out of process crash reporter exit code, if available. | GenericPlatform/GenericPlatformCrashContext.h |
| OutOfProcessCrashReporterPid | uint32 | The ID of the external process reporting crashes if the platform supports it and was configured to use it, zero otherwise (0 is a reserved system process ID, invalid for the out of process reporter). | GenericPlatform/GenericPlatformCrashContext.h |
| PlatformPropertiesTag | const TCHAR *const | GenericPlatform/GenericPlatformCrashContext.h | |
| PortableCallStackHashTag | const TCHAR *const | GenericPlatform/GenericPlatformCrashContext.h | |
| PortableCallStackTag | const TCHAR *const | GenericPlatform/GenericPlatformCrashContext.h | |
| ProcessIdTag | const TCHAR *const | GenericPlatform/GenericPlatformCrashContext.h | |
| RequestDataTag | const TCHAR *const | GenericPlatform/GenericPlatformCrashContext.h | |
| RuntimePropertiesTag | const TCHAR *const | GenericPlatform/GenericPlatformCrashContext.h | |
| SecondsSinceStartTag | const TCHAR *const | GenericPlatform/GenericPlatformCrashContext.h | |
| StaticCrashContextIndex | int32 | Static counter records how many crash contexts have been constructed | GenericPlatform/GenericPlatformCrashContext.h |
| UEMinidumpName | const TCHAR *const | GenericPlatform/GenericPlatformCrashContext.h |
Variables
Protected
| Name | Type | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|---|
| CommonBuffer | FString | The buffer used to store the crash's properties. | GenericPlatform/GenericPlatformCrashContext.h | |
| CrashContextIndex | int32 | Records which crash context we were using the StaticCrashContextIndex counter | GenericPlatform/GenericPlatformCrashContext.h |
Functions
Public
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
void AddCrashProperty
(
const TCHAR* PropertyName, |
GenericPlatform/GenericPlatformCrashContext.h | ||
virtual void AddPortableThreadCallStack
(
uint32 ThreadId, |
GenericPlatform/GenericPlatformCrashContext.h | ||
virtual void AddPortableThreadCallStacks
(
TConstArrayView< FThreadCallStack > Threads |
Adds a portable callstack for a thread | GenericPlatform/GenericPlatformCrashContext.h | |
virtual void CaptureModules() |
Store info about loaded modules | GenericPlatform/GenericPlatformCrashContext.h | |
void CapturePortableCallStack
(
void* ErrorProgramCounter, |
Generate raw call stack for crash report (image base + offset) for the calling thread | GenericPlatform/GenericPlatformCrashContext.h | |
void CapturePortableCallStack
(
int32 NumStackFramesToIgnore, |
GenericPlatform/GenericPlatformCrashContext.h | ||
void CaptureThreadPortableCallStack
(
const uint64 ThreadId, |
Generate raw call stack for crash report (image base + offset) for a different thread | GenericPlatform/GenericPlatformCrashContext.h | |
virtual void CopyPlatformSpecificFiles
(
const TCHAR* OutputDirectory, |
Allows platform implementations to copy files to report directory. | GenericPlatform/GenericPlatformCrashContext.h | |
const FString & GetBuffer() |
GenericPlatform/GenericPlatformCrashContext.h | ||
virtual void GetModules
(
TArray< FStackWalkModuleInfo >& OutModules |
Gets info about loaded modules and stores it in the given array | GenericPlatform/GenericPlatformCrashContext.h | |
virtual void GetPortableCallStack
(
const uint64* StackFrames, |
Gets the portable callstack to a specified stack and puts it into OutCallStack | GenericPlatform/GenericPlatformCrashContext.h | |
ECrashContextType GetType() |
GenericPlatform/GenericPlatformCrashContext.h | ||
void GetUniqueCrashName
(
TCHAR* GUIDBuffer, |
GenericPlatform/GenericPlatformCrashContext.h | ||
const bool IsFullCrashDump() |
GenericPlatform/GenericPlatformCrashContext.h | ||
virtual void SerializeAsXML
(
const TCHAR* Filename |
Serializes crash's informations to the specified filename. | GenericPlatform/GenericPlatformCrashContext.h | |
void SerializeContentToBuffer() |
Serializes all data to the buffer. | GenericPlatform/GenericPlatformCrashContext.h | |
void SetCrashedProcess
(
const FProcHandle& Process |
Sets the process id to that has crashed. | GenericPlatform/GenericPlatformCrashContext.h | |
void SetCrashedThreadId
(
uint32 InId |
Stores crashing thread id. | GenericPlatform/GenericPlatformCrashContext.h | |
void SetNumMinidumpFramesToIgnore
(
int32 InNumMinidumpFramesToIgnore |
Sets the number of stack frames to ignore when symbolicating from a minidump | GenericPlatform/GenericPlatformCrashContext.h | |
virtual void SetPortableCallStack
(
const uint64* StackFrames, |
Sets the portable callstack to a specified stack | GenericPlatform/GenericPlatformCrashContext.h |
Protected
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
virtual const TCHAR * GetCallstackProperty () |
Allow platform implementations to provide a callstack property. | GenericPlatform/GenericPlatformCrashContext.h | |
virtual bool GetPlatformAllThreadContextsString
(
FString& OutStr |
@OutStr - a stream of Thread XML elements containing info (e.g. callstack) specific to an active thread | GenericPlatform/GenericPlatformCrashContext.h |
Static
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
static void AddCrashProperty
(
FString& Buffer, |
GenericPlatform/GenericPlatformCrashContext.h | ||
static void AddCrashPropertyInternal
(
FString& Buffer, |
Writes a common property to the buffer. | GenericPlatform/GenericPlatformCrashContext.h | |
static void AddCrashPropertyInternal
(
FString& Buffer, |
Writes a common property to the buffer. | GenericPlatform/GenericPlatformCrashContext.h | |
static void AddFile
(
const FString& AbsoluteSourcePath |
Adds a file to bundle with the crash report | GenericPlatform/GenericPlatformCrashContext.h | |
static void AddFooter
(
FString& Buffer |
Writes footer to the buffer. | GenericPlatform/GenericPlatformCrashContext.h | |
static void AddHeader
(
FString& Buffer |
Writes header information to the buffer. | GenericPlatform/GenericPlatformCrashContext.h | |
static void AddPlugin
(
const FString& PluginDesc |
Adds a plugin descriptor string to the enabled plugins list in the crash context | GenericPlatform/GenericPlatformCrashContext.h | |
static void AddSection
(
FString& Buffer, |
GenericPlatform/GenericPlatformCrashContext.h | ||
static void AppendEscapedXMLString
(
FStringBuilderBase& OutBuffer, |
GenericPlatform/GenericPlatformCrashContext.h | ||
static void AppendEscapedXMLString
(
FString& OutBuffer, |
Escapes and appends specified text to XML string | GenericPlatform/GenericPlatformCrashContext.h | |
static void AppendPortableCallstack
(
FString& OutBuffer, |
GenericPlatform/GenericPlatformCrashContext.h | ||
static void BeginSection
(
FString& Buffer, |
GenericPlatform/GenericPlatformCrashContext.h | ||
static void CleanupPlatformSpecificFiles () |
Cleanup platform specific files - called on startup, implemented per platform | GenericPlatform/GenericPlatformCrashContext.h | |
static void CleanupTempSessionContextFiles
(
const FTimespan& ExpirationAge |
Clean up expired context files that were left-over on the user disks (because the consumer crashed and/or failed to delete it). | GenericPlatform/GenericPlatformCrashContext.h | |
static void CopySharedCrashContext
(
FSharedCrashContext& Dst |
Initializes a shared crash context from current state. Will not set all fields in Dst. | GenericPlatform/GenericPlatformCrashContext.h | |
static bool CreateCrashReportDirectory
(
const TCHAR* CrashGUIDRoot, |
Attempts to create the output report directory. | GenericPlatform/GenericPlatformCrashContext.h | |
static void DumpAdditionalContext
(
const TCHAR* CrashFolderAbsolute |
Collects additional crash context providers. See FAdditionalCrashContextStack. | GenericPlatform/GenericPlatformCrashContext.h | |
static FString DumpLog
(
const FString& CrashFolderAbsolute |
Flushes the logs. | GenericPlatform/GenericPlatformCrashContext.h | |
static void EndSection
(
FString& Buffer, |
GenericPlatform/GenericPlatformCrashContext.h | ||
static FString GenerateNewCrashGuidBase() |
Generate a new crash guid base string. | GenericPlatform/GenericPlatformCrashContext.h | |
static const FSessionContext & GetCachedSessionContext() |
Get the current cached session context | GenericPlatform/GenericPlatformCrashContext.h | |
static const TCHAR * GetCrashConfigFilePath() |
Helper to get the crash report client config filepath saved by this instance and copied to each crash report folder. | GenericPlatform/GenericPlatformCrashContext.h | |
static const TCHAR * GetCrashConfigFolder() |
Helper to get the crash report client config folder used by GetCrashConfigFilePath(). | GenericPlatform/GenericPlatformCrashContext.h | |
static FString GetCrashGameName() |
Get the Game Name of the crash | GenericPlatform/GenericPlatformCrashContext.h | |
static const TCHAR * GetCrashTypeString
(
ECrashContextType Type |
Helper to get the standard string for the crash type based on crash event bool values. | GenericPlatform/GenericPlatformCrashContext.h | |
static const TCHAR * GetDeploymentName() |
Get the current deployment name (ie. EpicApp) | GenericPlatform/GenericPlatformCrashContext.h | |
static const FString * GetEngineData
(
const FString& Key |
Get arbitrary engine data from the crash context | GenericPlatform/GenericPlatformCrashContext.h | |
static const TMap< FString, FString > & GetEngineData () |
Get the engine data dictionary | GenericPlatform/GenericPlatformCrashContext.h | |
static const TMap< FString, FString > & GetGameData () |
Get the game data dictionary | GenericPlatform/GenericPlatformCrashContext.h | |
static const FString * GetGameData
(
const FString& Key |
Get arbitrary game data from the crash context | GenericPlatform/GenericPlatformCrashContext.h | |
static FString GetGameName() |
Gets the current standardized game name for use in a Crash Reporter report. | GenericPlatform/GenericPlatformCrashContext.h | |
static TOptional< int32 > GetOutOfProcessCrashReporterExitCode () |
Return the out-of-process crash reporter exit code if available. | GenericPlatform/GenericPlatformCrashContext.h | |
static uint32 GetOutOfProcessCrashReporterProcessId() |
GenericPlatform/GenericPlatformCrashContext.h | ||
static FString GetTempSessionContextFilePath
(
uint64 ProcessID |
Get the file path to the temporary session context file that we create for the given process. | GenericPlatform/GenericPlatformCrashContext.h | |
static void Initialize() |
Initializes crash context related platform specific data that can be impossible to obtain after a crash. | GenericPlatform/GenericPlatformCrashContext.h | |
static void InitializeFromConfig() |
Called once when GConfig is initialized. Opportunity to cache values from config. | GenericPlatform/GenericPlatformCrashContext.h | |
static void InitializeFromContext
(
const FSessionContext& Context, |
Initialized crash context, using a crash context (e.g. shared from another process). | GenericPlatform/GenericPlatformCrashContext.h | |
static bool IsInitalized() |
GenericPlatform/GenericPlatformCrashContext.h | ||
static bool IsOutOfProcessCrashReporter() |
The reporting itself (showing the crash UI and sending the report is always done out of process) | GenericPlatform/GenericPlatformCrashContext.h | |
static bool IsTypeContinuable
(
ECrashContextType Type |
GenericPlatform/GenericPlatformCrashContext.h | ||
static FEngineDataResetDelegate & OnEngineDataResetDelegate() |
Accessor for engine data reset callback delegate | GenericPlatform/GenericPlatformCrashContext.h | |
static FEngineDataSetDelegate & OnEngineDataSetDelegate() |
Accessor for engine data change callback delegate | GenericPlatform/GenericPlatformCrashContext.h | |
static FGameDataResetDelegate & OnGameDataResetDelegate() |
Accessor for game data reset callback delegate | GenericPlatform/GenericPlatformCrashContext.h | |
static FGameDataSetDelegate & OnGameDataSetDelegate() |
Accessor for game data change callback delegate | GenericPlatform/GenericPlatformCrashContext.h | |
static void OnThreadStuck
(
uint32 ThreadId |
Sets a flag that one of the threads is stuck. | GenericPlatform/GenericPlatformCrashContext.h | |
static void OnThreadUnstuck
(
uint32 ThreadId |
Clears the stuck flag. | GenericPlatform/GenericPlatformCrashContext.h | |
static void PurgeOldCrashConfig() |
Helper to clean out old files in the crash report client config folder. | GenericPlatform/GenericPlatformCrashContext.h | |
static void ResetEngineData() |
Clears the engine data dictionary | GenericPlatform/GenericPlatformCrashContext.h | |
static void ResetGameData() |
Clears the game data dictionary | GenericPlatform/GenericPlatformCrashContext.h | |
static void SerializeSessionContext
(
FString& Buffer |
Serializes session context to the given buffer. | GenericPlatform/GenericPlatformCrashContext.h | |
static void SerializeTempCrashContextToFile() |
Serializes the session context section of the crash context to a temporary file. | GenericPlatform/GenericPlatformCrashContext.h | |
static void SerializeUserSettings
(
FString& Buffer |
Serializes the current user setting struct to a buffer. | GenericPlatform/GenericPlatformCrashContext.h | |
static void SetAnticheatProvider
(
const FString& AnticheatProvider |
Sets the Anticheat client provider. | GenericPlatform/GenericPlatformCrashContext.h | |
static void SetCrashTrigger
(
ECrashTrigger Type |
Sets the type of crash triggered. Used to distinguish crashes caused for debugging purposes. | GenericPlatform/GenericPlatformCrashContext.h | |
static void SetDeploymentName
(
const FString& EpicApp |
Set the current deployment name (ie. EpicApp) | GenericPlatform/GenericPlatformCrashContext.h | |
static void SetEngineData
(
const FString& Key, |
Updates (or adds if not already present) arbitrary engine data to the crash context (will remove the key if passed an empty string) | GenericPlatform/GenericPlatformCrashContext.h | |
static void SetEngineExit
(
bool bIsRequestExit |
Notify the crash context exit has been requested. | GenericPlatform/GenericPlatformCrashContext.h | |
static void SetEpicAccountId
(
const FString& EpicAccountId |
Set or change the epic account id associated with the crash session. | GenericPlatform/GenericPlatformCrashContext.h | |
static void SetGameData
(
const FString& Key, |
Updates (or adds if not already present) arbitrary game data to the crash context (will remove the key if passed an empty string) | GenericPlatform/GenericPlatformCrashContext.h | |
static void SetGPUBreadcrumbs
(
FGPUBreadcrumbCrashData&& Data |
Updates (or adds if not already present) GPU breadcrumb data. | GenericPlatform/GenericPlatformCrashContext.h | |
static void SetMemoryStats
(
const FPlatformMemoryStats& MemoryStats |
We can't gather memory stats in crash handling function, so we gather them just before raising exception and use in crash reporting. | GenericPlatform/GenericPlatformCrashContext.h | |
static void SetOutOfProcessCrashReporterExitCode
(
int32 ExitCode |
Set the out of process crash reporter exit code if known. | GenericPlatform/GenericPlatformCrashContext.h | |
static void SetOutOfProcessCrashReporterPid
(
uint32 ProcessId |
Set whether or not the out-of-process crash reporter is running. | GenericPlatform/GenericPlatformCrashContext.h | |
static FString UnescapeXMLString
(
const FString& Text |
Unescapes a specified XML string, naive implementation. | GenericPlatform/GenericPlatformCrashContext.h | |
static void UpdateLocalizedStrings() |
Called to update any localized strings in the crash context | GenericPlatform/GenericPlatformCrashContext.h |
Operators
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
FGenericCrashContext & operator=
(
const FGenericCrashContext& |
GenericPlatform/GenericPlatformCrashContext.h |