bIsAllowedToCloseWithoutSending

bIsAllowedToCloseWithoutSending

#Overview

name: bIsAllowedToCloseWithoutSending

The value of this variable can be defined or overridden in .ini config files. 1 .ini config file referencing this setting variable.

It is referenced in 4 C++ source files.

#Summary

#Usage in the C++ source code

The purpose of bIsAllowedToCloseWithoutSending is to control whether users are allowed to close the crash reporter without sending a crash report. This setting is part of Unreal Engine’s crash reporting system.

This setting variable is primarily used by the CrashReportCore module, which is responsible for handling crash reports in Unreal Engine. It’s specifically utilized within the FCrashReportCoreConfig class, which manages the configuration for the crash reporting system.

The value of this variable is set in multiple places:

  1. It’s initially set in the FCrashReportCoreConfig constructor, where it reads the value from the GEngineIni configuration file. If the value is not found in the config file, it defaults to true.
  2. It can be overridden by project-specific configurations through the SetProjectConfigOverrides function.

This variable interacts with other crash reporting configuration options, such as bHideLogFilesOption, bHideRestartOption, and bShowEndpointInTooltip. These variables collectively determine the behavior and appearance of the crash reporter interface.

Developers must be aware that this setting directly affects the user’s ability to close the crash reporter without submitting a report. If set to false, users will be required to submit a crash report before closing the application, which might be frustrating for some users but could provide more comprehensive crash data for developers.

Best practices when using this variable include:

  1. Consider the impact on user experience. Forcing users to always send reports might lead to frustration.
  2. Balance between gathering crash data and respecting user choice.
  3. Clearly communicate to users why crash reports are important and how they’re used.
  4. Ensure that sensitive information is not inadvertently included in crash reports.
  5. Regularly review and analyze the crash reports received to make the most of this feature.
  6. Consider providing an option in your game’s settings to allow users to change this behavior if appropriate for your project.

#Setting Variables

#References In INI files

Location: <Workspace>/Engine/Config/BaseEngine.ini:3368, section: [CrashReportClient]

#References in C++ code

#Callsites

This variable is referenced in the following C++ source code:

#Loc: <Workspace>/Engine/Source/Runtime/CrashReportCore/Private/CrashReportCoreConfig.cpp:75

Scope (from outer to inner):

file
function     FCrashReportCoreConfig::FCrashReportCoreConfig

Source code excerpt:

	}
	
	if (!GConfig->GetBool(*SectionName, TEXT("bIsAllowedToCloseWithoutSending"), bIsAllowedToCloseWithoutSending, GEngineIni))
	{
		// Default to false (show the option) when config is missing.
		bIsAllowedToCloseWithoutSending = true;
	}
	
	if (!GConfig->GetBool(*SectionName, TEXT("bShowEndpointInTooltip"), bShowEndpointInTooltip, GEngineIni))
	{
		bShowEndpointInTooltip = false;
	}

#Loc: <Workspace>/Engine/Source/Runtime/CrashReportCore/Private/CrashReportCoreConfig.cpp:138

Scope (from outer to inner):

file
function     void FCrashReportCoreConfig::SetProjectConfigOverrides

Source code excerpt:

	InConfigFile.GetBool(*SectionName, TEXT("bHideLogFilesOption"), bHideLogFilesOption);
	InConfigFile.GetBool(*SectionName, TEXT("bHideRestartOption"), bHideRestartOption);
	InConfigFile.GetBool(*SectionName, TEXT("bIsAllowedToCloseWithoutSending"), bIsAllowedToCloseWithoutSending);
	InConfigFile.GetBool(*SectionName, TEXT("bShowEndpointInTooltip"), bShowEndpointInTooltip);
	InConfigFile.GetString(*SectionName, TEXT("CompanyName"), CompanyName);
#if PLATFORM_WINDOWS
	InConfigFile.GetBool(*SectionName, TEXT("bIsAllowedToCopyFilesToClipboard"), bIsAllowedToCopyFilesToClipboard);
#endif
}

#Loc: <Workspace>/Engine/Source/Runtime/CrashReportCore/Public/CrashReportCoreConfig.h:102

Scope (from outer to inner):

file
function     bool IsAllowedToCloseWithoutSending

Source code excerpt:

	bool IsAllowedToCloseWithoutSending() const
	{
		return bIsAllowedToCloseWithoutSending;
	}

	bool GetShowEndpointInTooltip() const
	{
		return bShowEndpointInTooltip;
	}

#Loc: <Workspace>/Engine/Source/Runtime/CrashReportCore/Public/CrashReportCoreConfig.h:185

Scope: file

Source code excerpt:


	/** Whether the user is allowed to close the crash reporter without sending a report */
	bool bIsAllowedToCloseWithoutSending;

	/** Optional string displayed in the "allow to be contacted" text. */
	FString CompanyName;

	/** Whether to show the endpoint (reciever or datarouter url) */
	bool bShowEndpointInTooltip;