![]() |
UDocumentation UE5.7 10.02.2026 (Source)
API documentation for Unreal Engine 5.7
|
#include <GenericPlatformCrashContext.h>
Inheritance diagram for FGenericCrashContext:Protected Member Functions | |
| virtual bool | GetPlatformAllThreadContextsString (FString &OutStr) const |
| virtual CORE_API const TCHAR * | GetCallstackProperty () const |
Static Protected Member Functions | |
| static CORE_API const FString * | GetEngineData (const FString &Key) |
| static CORE_API const FString * | GetGameData (const FString &Key) |
| static CORE_API FString | GenerateNewCrashGuidBase () |
Protected Attributes | |
| FProcHandle | ProcessHandle |
| ECrashContextType | Type |
| uint32 | CrashedThreadId |
| const TCHAR * | ErrorMessage |
| int | NumMinidumpFramesToIgnore |
| TArray< FCrashStackFrame > | CallStack |
| TArray< FThreadStackFrames > | ThreadCallStacks |
| TArray< FStackWalkModuleInfo > | ModulesInfo |
Contains a runtime crash's properties that are common for all platforms. This may change in the future.
| FGenericCrashContext::FGenericCrashContext | ( | ECrashContextType | InType, |
| const TCHAR * | ErrorMessage | ||
| ) |
Default constructor. Optionally pass a process handle if building a crash context for a process other then current.
|
inlinevirtual |
|
inline |
|
inlinestatic |
|
static |
Adds a file to bundle with the crash report
|
static |
Writes footer to the buffer.
|
static |
Writes header information to the buffer.
|
static |
Adds a plugin descriptor string to the enabled plugins list in the crash context
|
virtual |
Reimplemented in FMicrosoftPlatformCrashContext.
|
virtual |
Adds a portable callstack for a thread
Reimplemented in FMicrosoftPlatformCrashContext.
|
static |
|
static |
Escapes and appends specified text to XML string
|
static |
|
static |
|
virtual |
Store info about loaded modules
| void FGenericCrashContext::CapturePortableCallStack | ( | int32 | NumStackFramesToIgnore, |
| void * | Context | ||
| ) |
Generate raw call stack for crash report (image base + offset) for the calling thread
| ErrorProgramCounter | The program counter of where the occur occurred in the callstack being captured |
| Context | Optional thread context information |
Generate raw call stack for crash report (image base + offset) for a different thread
| InThreadId | The thread id of the thread to capture the callstack for |
| Context | Optional thread context information |
|
static |
Cleanup platform specific files - called on startup, implemented per platform
Implement platform specific static cleanup function
Clean up expired context files that were left-over on the user disks (because the consumer crashed and/or failed to delete it).
|
virtual |
Allows platform implementations to copy files to report directory.
Reimplemented in FWindowsPlatformCrashContext.
|
static |
Initializes a shared crash context from current state. Will not set all fields in Dst.
|
static |
Attempts to create the output report directory.
Collects additional crash context providers. See FAdditionalCrashContextStack.
|
static |
Flushes the logs. In the case of in memory logs is used on this configuration, dumps them to file. Returns the name of the file
|
staticprotected |
Generate a new crash guid base string.
|
inline |
|
static |
Get the current cached session context
|
protectedvirtual |
Allow platform implementations to provide a callstack property. Primarily used when non-native code triggers a crash.
Reimplemented in FAndroidCrashContext, and FApplePlatformCrashContext.
|
static |
Helper to get the crash report client config filepath saved by this instance and copied to each crash report folder.
|
static |
Helper to get the crash report client config folder used by GetCrashConfigFilePath().
|
static |
Get the Game Name of the crash
|
static |
Helper to get the standard string for the crash type based on crash event bool values.
|
static |
Get the current deployment name (ie. EpicApp)
|
static |
Get the engine data dictionary
|
staticprotected |
Get arbitrary engine data from the crash context
|
static |
Get the game data dictionary
|
staticprotected |
Get arbitrary game data from the crash context
|
static |
Gets the current standardized game name for use in a Crash Reporter report.
|
virtual |
Gets info about loaded modules and stores it in the given array
Return the out-of-process crash reporter exit code if available. The exit code is available if crash reporter process died while the application it monitors was still running. Then engine periodically poll the health of the crash reporter process and try to read its exit code if it unexpectedly died.
|
inlineprotectedvirtual |
@OutStr - a stream of Thread XML elements containing info (e.g. callstack) specific to an active thread
Reimplemented in FMacCrashContext, and FMicrosoftPlatformCrashContext.
|
virtual |
Gets the portable callstack to a specified stack and puts it into OutCallStack
Reimplemented in FAndroidCrashContext, and FUnixCrashContext.
|
static |
Get the file path to the temporary session context file that we create for the given process.
|
inline |
|
static |
Initializes crash context related platform specific data that can be impossible to obtain after a crash.
|
static |
Initialized crash context, using a crash context (e.g. shared from another process).
| const bool FGenericCrashContext::IsFullCrashDump | ( | ) | const |
|
inlinestatic |
|
inlinestatic |
Delegate for additional crash context.
|
inlinestatic |
Accessor for engine data reset callback delegate
|
inlinestatic |
Accessor for engine data change callback delegate
|
inlinestatic |
Accessor for game data reset callback delegate
|
inlinestatic |
Accessor for game data change callback delegate
Sets a flag that one of the threads is stuck. This is meant to be bound to the ThreadHeartBeat::OnThreadStuck delegate. Not all platforms register to save this flag.
Clears the stuck flag. This is meant to be bound to the ThreadHeartBeat::OnThreadUnstuck delegate. Not all platforms register to save this flag.
|
static |
Helper to clean out old files in the crash report client config folder.
|
static |
Clears the engine data dictionary
|
static |
Clears the game data dictionary
Serializes crash's informations to the specified filename. Should be overridden for platforms where using FFileHelper is not safe, all POSIX platforms.
| void FGenericCrashContext::SerializeContentToBuffer | ( | ) | const |
Serializes all data to the buffer.
|
static |
Serializes session context to the given buffer. NOTE: Assumes that the buffer already has a header and section open.
|
static |
Sets the Anticheat client provider.
|
inline |
Sets the process id to that has crashed. On supported platforms this will analyze the given process rather than current. Default is current process.
|
static |
Sets the type of crash triggered. Used to distinguish crashes caused for debugging purposes.
|
static |
Set the current deployment name (ie. EpicApp)
|
static |
Updates (or adds if not already present) arbitrary engine data to the crash context (will remove the key if passed an empty string)
Notify the crash context exit has been requested.
|
static |
Set or change the epic account id associated with the crash session. Will override the epic account id stored in the registry for reporting when present.
|
static |
Updates (or adds if not already present) arbitrary game data to the crash context (will remove the key if passed an empty string)
|
static |
Updates (or adds if not already present) GPU breadcrumb data.
|
static |
We can't gather memory stats in crash handling function, so we gather them just before raising exception and use in crash reporting.
Sets the number of stack frames to ignore when symbolicating from a minidump
Set the out of process crash reporter exit code if known. The out of process reporter is expected to run in background, waiting for a signal to handle a crashes/ensures/assert, but sometimes it crashes. If the engine detects that its associated out of process crash reporter died and if the child process exit code can be retrieved, it can be exposed through this function.
Set whether or not the out-of-process crash reporter is running. A non-zero process id means that crash artifacts like the call stack and then minidump are built in a separated background process. The reporting itself, i.e. packaging and sending the crash artifacts is always done out of process.
|
virtual |
Sets the portable callstack to a specified stack
Reimplemented in FMicrosoftPlatformCrashContext.
|
static |
Unescapes a specified XML string, naive implementation.
|
protected |
|
static |
|
static |
|
static |
|
static |
|
protected |
|
static |
|
static |
|
static |
|
static |
|
protected |
|
static |
|
static |
|
protected |
|
protected |
|
static |
|
protected |
|
protected |
|
protected |