SerializationOutOfBoundsErrorMessage

SerializationOutOfBoundsErrorMessage

#Overview

name: SerializationOutOfBoundsErrorMessage

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 3 C++ source files.

#Summary

#Usage in the C++ source code

The purpose of SerializationOutOfBoundsErrorMessage is to provide a customizable error message for serialization out-of-bounds errors in Unreal Engine 5. This variable is used to display user-friendly error messages when serialization issues occur during asset loading or object creation.

This setting variable is primarily used by the CoreUObject module, specifically in the serialization and asset loading systems. It is referenced in the FAsyncArchive::Serialize function and the FLinkerLoad::IndexToObject function, which are crucial parts of Unreal Engine’s object serialization and loading processes.

The value of this variable is set in the engine configuration file (GEngineIni). It is retrieved using the GConfig->GetText function, which reads the text value from the “/Script/Engine.Engine” section of the configuration file.

SerializationOutOfBoundsErrorMessage interacts with another variable called SerializationOutOfBoundsErrorMessageCaption. These two variables work together to provide a complete error dialog, with the message and the caption, respectively.

Developers must be aware that this variable is used in critical error handling scenarios. Modifying its content should be done carefully to ensure that the error message remains informative and helpful for diagnosing serialization issues.

Best practices when using this variable include:

  1. Keeping the error message clear, concise, and informative.
  2. Localizing the error message for different languages if the game supports multiple languages.
  3. Ensuring that the error message provides enough context for both developers and end-users to understand the nature of the problem.
  4. Considering adding additional debugging information or instructions in the error message to help resolve the issue.
  5. Regularly reviewing and updating the error message to reflect any changes in the engine’s serialization processes or common issues encountered during development.

#Setting Variables

#References In INI files

Location: <Workspace>/Engine/Config/BaseEngine.ini:311, section: [/Script/Engine.Engine]

#References in C++ code

#Callsites

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

#Loc: <Workspace>/Engine/Source/Runtime/CoreUObject/Private/Serialization/AsyncLoading.cpp:8506

Scope (from outer to inner):

file
function     void FAsyncArchive::Serialize

Source code excerpt:

		FText ErrorMessage, ErrorCaption;
		GConfig->GetText(TEXT("/Script/Engine.Engine"),
			TEXT("SerializationOutOfBoundsErrorMessage"),
			ErrorMessage,
			GEngineIni);
		GConfig->GetText(TEXT("/Script/Engine.Engine"),
			TEXT("SerializationOutOfBoundsErrorMessageCaption"),
			ErrorCaption,
			GEngineIni);

		FMessageDialog::Open(EAppMsgType::Ok, ErrorMessage, ErrorCaption);
	}

#Loc: <Workspace>/Engine/Source/Runtime/CoreUObject/Private/UObject/LinkerLoad.cpp:5880

Scope (from outer to inner):

file
function     UObject* FLinkerLoad::CreateExport
function     UObject* FLinkerLoad::IndexToObject

Source code excerpt:

				FText ErrorMessage, ErrorCaption;
				GConfig->GetText(TEXT("/Script/Engine.Engine"),
									TEXT("SerializationOutOfBoundsErrorMessage"),
									ErrorMessage,
									GEngineIni);
				GConfig->GetText(TEXT("/Script/Engine.Engine"),
					TEXT("SerializationOutOfBoundsErrorMessageCaption"),
					ErrorCaption,
					GEngineIni);

				UE_ASSET_LOG(LogLinker, Error, PackagePath, TEXT("Invalid export object index=%d. File is most likely corrupted. Please verify your installation."), Index.ToExport());

#Loc: <Workspace>/Engine/Source/Runtime/CoreUObject/Private/UObject/LinkerLoad.cpp:5915

Scope (from outer to inner):

file
function     UObject* FLinkerLoad::CreateExport
function     UObject* FLinkerLoad::IndexToObject

Source code excerpt:

				FText ErrorMessage, ErrorCaption;
				GConfig->GetText(TEXT("/Script/Engine.Engine"),
									TEXT("SerializationOutOfBoundsErrorMessage"),
									ErrorMessage,
									GEngineIni);
				GConfig->GetText(TEXT("/Script/Engine.Engine"),
					TEXT("SerializationOutOfBoundsErrorMessageCaption"),
					ErrorCaption,
					GEngineIni);

				UE_ASSET_LOG(LogLinker, Error, PackagePath, TEXT("Invalid import object index=%d. File is most likely corrupted. Please verify your installation."), Index.ToImport());