UDocumentation UE5.7 10.02.2026 (Source)
API documentation for Unreal Engine 5.7
GenericPlatformCrashContext.h File Reference
#include "Containers/Array.h"
#include "Containers/ContainersFwd.h"
#include "Containers/StringFwd.h"
#include "Containers/StringView.h"
#include "Containers/UnrealString.h"
#include "CoreTypes.h"
#include "Delegates/Delegate.h"
#include "Delegates/DelegateCombinations.h"
#include "GenericPlatform/GenericPlatformStackWalk.h"
#include "HAL/PlatformMemory.h"
#include "HAL/PlatformProcess.h"
#include "HAL/PlatformStackWalk.h"
#include "Misc/AssertionMacros.h"
#include "Misc/Optional.h"
#include "Misc/SecureHash.h"
#include "Misc/Timespan.h"
#include "Templates/Function.h"
#include "Templates/UnrealTemplate.h"

Go to the source code of this file.

Classes

struct  FCrashStackFrame
 
struct  FThreadStackFrames
 
struct  FSessionContext
 
struct  FUserSettingsContext
 
struct  FGPUBreadcrumbsSharedContext
 
struct  FGPUBreadcrumbsSharedContext::FQueueData
 
struct  FSharedCrashContext
 
struct  FCrashContextExtendedWriter
 
struct  FThreadCallStack
 
struct  FGPUBreadcrumbCrashData
 
struct  FGPUBreadcrumbCrashData::FQueueData
 
class  FGPUBreadcrumbCrashData::FSerializer
 
struct  FGenericCrashContext
 
struct  FGenericMemoryWarningContext
 
struct  FAdditionalCrashContextStack
 
struct  FScopedAdditionalCrashContextProvider
 

Namespaces

namespace  RecoveryService
 

Macros

#define WITH_ADDITIONAL_CRASH_CONTEXTS   1
 
#define CR_MAX_ERROR_MESSAGE_CHARS   2048
 
#define CR_MAX_DIRECTORY_CHARS   256
 
#define CR_MAX_SYMBOL_CHARS   128
 
#define CR_MAX_STACK_FRAMES   256
 
#define CR_MAX_THREAD_NAME_CHARS   64
 
#define CR_MAX_THREADS   512
 
#define CR_MAX_GENERIC_FIELD_CHARS   64
 
#define CR_MAX_COMMANDLINE_CHARS   1024
 
#define CR_MAX_RICHTEXT_FIELD_CHARS   512
 
#define CR_MAX_DYNAMIC_BUFFER_CHARS   1024*32
 
#define CR_MAX_GPU_BREADCRUMBS_QUEUES   2
 
#define CR_MAX_GPU_BREADCRUMBS_STRING_CHARS   1024*8
 
#define UE_ADD_CRASH_CONTEXT_SCOPE(FuncExpr)   FScopedAdditionalCrashContextProvider ANONYMOUS_VARIABLE(AddCrashCtx)(FuncExpr)
 

Enumerations

enum  ECrashExitCodes : int32 {
  MonitoredApplicationStillRunning = 777001 , MonitoredApplicationExitCodeNotAvailable = 777002 , CrashReporterCrashed = 777003 , CrashHandlerCrashed = 777004 ,
  OutOfProcessReporterExitedUnexpectedly = 777005 , CrashDuringStaticInit = 777006 , OutOfProcessReporterCheckFailed = 777007 , UnhandledEnsure = 777008
}
 
enum class  ECrashDescVersions : int32 { VER_1_NewCrashFormat , VER_2_AddedNewProperties , VER_3_CrashContext = 3 }
 
enum class  ECrashDumpMode : int32 { Default = 0 , FullDump = 1 , FullDumpAlways = 2 }
 
enum class  ECrashContextType {
  Crash , Assert , Ensure , Stall ,
  GPUCrash , Hang , OutOfMemory , AbnormalShutdown ,
  VerseRuntimeError , Max
}
 
enum class  ECrashTrigger { Debug = -1 , Normal = 0 }
 
enum class  EUnattendedStatus : uint8 { Unknown , Attended , Unattended }
 

Functions

CORE_API const TCHARAttendedStatusToString (const EUnattendedStatus Status)
 
 DECLARE_MULTICAST_DELEGATE_OneParam (FAdditionalCrashContextDelegate, FCrashContextExtendedWriter &)
 
 DECLARE_MULTICAST_DELEGATE (FEngineDataResetDelegate)
 
 DECLARE_MULTICAST_DELEGATE_TwoParams (FEngineDataSetDelegate, const FString &, const FString &)
 
 DECLARE_MULTICAST_DELEGATE (FGameDataResetDelegate)
 
 DECLARE_MULTICAST_DELEGATE_TwoParams (FGameDataSetDelegate, const FString &, const FString &)
 

Macro Definition Documentation

◆ CR_MAX_COMMANDLINE_CHARS

#define CR_MAX_COMMANDLINE_CHARS   1024

◆ CR_MAX_DIRECTORY_CHARS

#define CR_MAX_DIRECTORY_CHARS   256

◆ CR_MAX_DYNAMIC_BUFFER_CHARS

#define CR_MAX_DYNAMIC_BUFFER_CHARS   1024*32

◆ CR_MAX_ERROR_MESSAGE_CHARS

#define CR_MAX_ERROR_MESSAGE_CHARS   2048

◆ CR_MAX_GENERIC_FIELD_CHARS

#define CR_MAX_GENERIC_FIELD_CHARS   64

◆ CR_MAX_GPU_BREADCRUMBS_QUEUES

#define CR_MAX_GPU_BREADCRUMBS_QUEUES   2

◆ CR_MAX_GPU_BREADCRUMBS_STRING_CHARS

#define CR_MAX_GPU_BREADCRUMBS_STRING_CHARS   1024*8

◆ CR_MAX_RICHTEXT_FIELD_CHARS

#define CR_MAX_RICHTEXT_FIELD_CHARS   512

◆ CR_MAX_STACK_FRAMES

#define CR_MAX_STACK_FRAMES   256

◆ CR_MAX_SYMBOL_CHARS

#define CR_MAX_SYMBOL_CHARS   128

◆ CR_MAX_THREAD_NAME_CHARS

#define CR_MAX_THREAD_NAME_CHARS   64

◆ CR_MAX_THREADS

#define CR_MAX_THREADS   512

◆ UE_ADD_CRASH_CONTEXT_SCOPE

◆ WITH_ADDITIONAL_CRASH_CONTEXTS

#define WITH_ADDITIONAL_CRASH_CONTEXTS   1

Enumeration Type Documentation

◆ ECrashContextType

enum class ECrashContextType
strong
Enumerator
Crash 
Assert 
Ensure 
Stall 
GPUCrash 
Hang 
OutOfMemory 
AbnormalShutdown 
VerseRuntimeError 
Max 

◆ ECrashDescVersions

enum class ECrashDescVersions : int32
strong

Enumerates crash description versions.

Enumerator
VER_1_NewCrashFormat 

Introduces a new crash description format.

VER_2_AddedNewProperties 

Added misc properties (CPU,GPU,OS,etc), memory related stats and platform specific properties as generic payload.

VER_3_CrashContext 

Using crash context when available.

◆ ECrashDumpMode

enum class ECrashDumpMode : int32
strong

Enumerates crash dump modes.

Enumerator
Default 

Default minidump settings.

FullDump 

Full memory crash minidump

FullDumpAlways 

Full memory crash minidump, even on ensures

◆ ECrashExitCodes

Defines special exit codes used to diagnose abnormal terminations. The code values are arbitrary, but easily recongnizable in decimal. They are meant to be used with the out-of-process monitoring/analytics in order to figure out unexpected cases.

Enumerator
MonitoredApplicationStillRunning 

Used by out-of-process monitor in analytics report, the application is still running, but out-of-process monitor was requested to exit before the application exit code could be read.

MonitoredApplicationExitCodeNotAvailable 

Used by out-of-process monitor in analytics report, the application is not running anymore, but the out-of-process monitor could not read the Editor exit code (either is is not supported by the OS or is not available).

CrashReporterCrashed 

Used by the application when the crash reporter crashed itself while reporting a crash.

CrashHandlerCrashed 

Used by the application when the crash handler crashed itself (crash in the __except() clause for example).

OutOfProcessReporterExitedUnexpectedly 

Used by the application to flag when it detects that its out-of-process application supposed to report the bugs died (ex if the Editor detects that CrashReportClientEditor is not running anymore as expected).

CrashDuringStaticInit 

Application crashed during static initialization. It may or may not have been able to have sent a crash report.

OutOfProcessReporterCheckFailed 

Used as MonitorExceptCode in analytics to track how often the out-of-process CRC exits because of a failed check.

UnhandledEnsure 

The exception code used for ensure, in case a kernel driver callback happens at in a dispatch level where SEH (on windows) is disabled.

◆ ECrashTrigger

enum class ECrashTrigger
strong

In development mode we can cause crashes in order to test reporting systems.

Enumerator
Debug 
Normal 

◆ EUnattendedStatus

enum class EUnattendedStatus : uint8
strong

Tristate to identify a session which is attended or unattended (ie. usually automated testing) Determination requires command line arguments - therefore if not available, status is unknown

Enumerator
Unknown 
Attended 
Unattended 

Function Documentation

◆ AttendedStatusToString()

CORE_API const TCHAR * AttendedStatusToString ( const EUnattendedStatus  Status)

◆ DECLARE_MULTICAST_DELEGATE() [1/2]

DECLARE_MULTICAST_DELEGATE ( FEngineDataResetDelegate  )

Delegates for engine and game data set / reset

◆ DECLARE_MULTICAST_DELEGATE() [2/2]

DECLARE_MULTICAST_DELEGATE ( FGameDataResetDelegate  )

◆ DECLARE_MULTICAST_DELEGATE_OneParam()

DECLARE_MULTICAST_DELEGATE_OneParam ( FAdditionalCrashContextDelegate  ,
FCrashContextExtendedWriter  
)

Simple Delegate for additional crash context.

◆ DECLARE_MULTICAST_DELEGATE_TwoParams() [1/2]

DECLARE_MULTICAST_DELEGATE_TwoParams ( FEngineDataSetDelegate  ,
const FString &  ,
const FString &   
)

◆ DECLARE_MULTICAST_DELEGATE_TwoParams() [2/2]

DECLARE_MULTICAST_DELEGATE_TwoParams ( FGameDataSetDelegate  ,
const FString &  ,
const FString &   
)