Ensure condition failed: !DefaultDomain.IsValid()

The following occurs to us during project startup, it does not crash the editor and it functions fine. It causes cooking to fail. I’ve taken steps to debug this issue and printed the DefaultDomain which trips the ensure. It is Project Content. I’ve also printed some other parts. Here is how it goes. Is it something with our folder structure? I don’t understand since it is completely normal. Any ideas, directions, anything?

Log          LogTemp                   DomainRootPath: /GASCompanion/
Log          LogTemp                   RemainingPath: GASCompanion/
Log          LogTemp                   RemainingPath: 
Log          LogTemp                   Domain:  ---> Plugin:GASCompanion
Log          LogTemp                   DomainRootPath: /PlayFabGSDK/
Log          LogTemp                   RemainingPath: PlayFabGSDK/
Log          LogTemp                   RemainingPath: 
Log          LogTemp                   Domain:  ---> Plugin:PlayFabGSDK
Log          LogTemp                   DomainRootPath: /Game/
Log          LogTemp                   RemainingPath: Game/
Log          LogTemp                   RemainingPath: 
Log          LogTemp                   DefaultDomain:  ---> ProjectContent
Log          LogTemp                   RootPath: /Game/
Log          LogTemp                   Domain:  ---> Never Cooked Content
Warning      LogOutputDevice           Script Stack (0 frames) :
Error        LogOutputDevice           === Handled ensure: ===
Error        LogOutputDevice           Ensure condition failed: !DefaultDomain.IsValid()  [File:C:\Program Files\Epic Games\UE_5.2_Source\Engine\Plugins\Editor\AssetReferenceRestrictions\Source\AssetReferenceRestrictions\Private\AssetReferencingDomains.cpp] [Line: 99] 
Error        LogOutputDevice           Stack: 
Error        LogOutputDevice           [Callstack] 0x00007ffb081896a5 UnrealEditor-AssetReferenceRestrictions.dll!FDomainPathNode::AddDomain() [C:\Program Files\Epic Games\UE_5.2_Source\Engine\Plugins\Editor\AssetReferenceRestrictions\Source\AssetReferenceRestrictions\Private\AssetReferencingDomains.cpp:99]
Error        LogOutputDevice           [Callstack] 0x00007ffb08189502 UnrealEditor-AssetReferenceRestrictions.dll!FDomainPathNode::AddDomain() [C:\Program Files\Epic Games\UE_5.2_Source\Engine\Plugins\Editor\AssetReferenceRestrictions\Source\AssetReferenceRestrictions\Private\AssetReferencingDomains.cpp:80]
Error        LogOutputDevice           [Callstack] 0x00007ffb08192f86 UnrealEditor-AssetReferenceRestrictions.dll!FDomainDatabase::RebuildFromScratch() [C:\Program Files\Epic Games\UE_5.2_Source\Engine\Plugins\Editor\AssetReferenceRestrictions\Source\AssetReferenceRestrictions\Private\AssetReferencingDomains.cpp:257]
Error        LogOutputDevice           [Callstack] 0x00007ffb0818fdba UnrealEditor-AssetReferenceRestrictions.dll!UAssetReferencingPolicySubsystem::Initialize() [C:\Program Files\Epic Games\UE_5.2_Source\Engine\Plugins\Editor\AssetReferenceRestrictions\Source\AssetReferenceRestrictions\Private\AssetReferencingPolicySubsystem.cpp:23]
Error        LogOutputDevice           [Callstack] 0x00007ffb6cc62439 UnrealEditor-Engine.dll!FSubsystemCollectionBase::AddAndInitializeSubsystem() [C:\Program Files\Epic Games\UE_5.2_Source\Engine\Source\Runtime\Engine\Private\Subsystems\SubsystemCollection.cpp:260]
Error        LogOutputDevice           [Callstack] 0x00007ffb6cca6b02 UnrealEditor-Engine.dll!FSubsystemCollectionBase::Initialize() [C:\Program Files\Epic Games\UE_5.2_Source\Engine\Source\Runtime\Engine\Private\Subsystems\SubsystemCollection.cpp:132]
Error        LogOutputDevice           [Callstack] 0x00007ffb68f05775 UnrealEditor-UnrealEd.dll!UEditorEngine::InitializeObjectReferences() [C:\Program Files\Epic Games\UE_5.2_Source\Engine\Source\Editor\UnrealEd\Private\EditorEngine.cpp:1008]
Error        LogOutputDevice           [Callstack] 0x00007ffb6cddb211 UnrealEditor-Engine.dll!UEngine::Init() [C:\Program Files\Epic Games\UE_5.2_Source\Engine\Source\Runtime\Engine\Private\UnrealEngine.cpp:1992]
Error        LogOutputDevice           [Callstack] 0x00007ffb68f026da UnrealEditor-UnrealEd.dll!UEditorEngine::InitEditor() [C:\Program Files\Epic Games\UE_5.2_Source\Engine\Source\Editor\UnrealEd\Private\EditorEngine.cpp:750]
Error        LogOutputDevice           [Callstack] 0x00007ffb68f01c40 UnrealEditor-UnrealEd.dll!UEditorEngine::Init() [C:\Program Files\Epic Games\UE_5.2_Source\Engine\Source\Editor\UnrealEd\Private\EditorEngine.cpp:1101]
Error        LogOutputDevice           [Callstack] 0x00007ffb69918a22 UnrealEditor-UnrealEd.dll!UUnrealEdEngine::Init() [C:\Program Files\Epic Games\UE_5.2_Source\Engine\Source\Editor\UnrealEd\Private\UnrealEdEngine.cpp:93]
Error        LogOutputDevice           [Callstack] 0x00007ff66d7428a6 UnrealEditor.exe!FEngineLoop::Init() [C:\Program Files\Epic Games\UE_5.2_Source\Engine\Source\Runtime\Launch\Private\LaunchEngineLoop.cpp:4774]
Error        LogOutputDevice           [Callstack] 0x00007ffb69994950 UnrealEditor-UnrealEd.dll!EditorInit() [C:\Program Files\Epic Games\UE_5.2_Source\Engine\Source\Editor\UnrealEd\Private\UnrealEdGlobals.cpp:111]
Error        LogOutputDevice           [Callstack] 0x00007ff66d764ed1 UnrealEditor.exe!GuardedMain() [C:\Program Files\Epic Games\UE_5.2_Source\Engine\Source\Runtime\Launch\Private\Launch.cpp:162]
Error        LogOutputDevice           [Callstack] 0x00007ff66d7650ba UnrealEditor.exe!GuardedMainWrapper() [C:\Program Files\Epic Games\UE_5.2_Source\Engine\Source\Runtime\Launch\Private\Windows\LaunchWindows.cpp:107]
Error        LogOutputDevice           [Callstack] 0x00007ff66d767df0 UnrealEditor.exe!LaunchWindowsStartup() [C:\Program Files\Epic Games\UE_5.2_Source\Engine\Source\Runtime\Launch\Private\Windows\LaunchWindows.cpp:244]
Error        LogOutputDevice           [Callstack] 0x00007ff66d77afd4 UnrealEditor.exe!WinMain() [C:\Program Files\Epic Games\UE_5.2_Source\Engine\Source\Runtime\Launch\Private\Windows\LaunchWindows.cpp:284]
Error        LogOutputDevice           [Callstack] 0x00007ff66d77e4e6 UnrealEditor.exe!__scrt_common_main_seh() [D:\a\_work\1\s\src\vctools\crt\vcstartup\src\startup\exe_common.inl:288]
Error        LogOutputDevice           [Callstack] 0x00007ffbec407614 KERNEL32.DLL!UnknownFunction []
Error        LogOutputDevice           [Callstack] 0x00007ffbecb226b1 ntdll.dll!UnknownFunction []

Edit: Another funny thing is that unreal plans to crash, but fails to load the crash reporter…
Edit2: It actually fails on “Never Cooked Content” where it doesn’t go through the if it is meant to go through.
Edit3: Solved it, it was my gamesettings.ini. I just removed all the settings and set them by hand again in the editor.

Here is the code for it with my added UE_LOGs in AssetReferencingDomains:

void AddDomain(TSharedPtr<FDomainData> Domain, FStringView RemainingPath)
	{

		int32 DirectorySeparatorIndex;
		UE_LOG(LogTemp, Log, TEXT("RemainingPath: %s"), RemainingPath.GetData());
		if (RemainingPath.FindChar(TEXT('/'), /*out*/ DirectorySeparatorIndex))
		{
			check(DirectorySeparatorIndex > 0);
			const FString DirectoryName(DirectorySeparatorIndex, RemainingPath.GetData());

			TSharedPtr<FDomainPathNode>& ChildFolder = SubFolders.FindOrAdd(DirectoryName);
			if (!ChildFolder.IsValid())
			{
				ChildFolder = MakeShared<FDomainPathNode>();
			}
			
			ChildFolder->AddDomain(Domain, RemainingPath.Mid(DirectorySeparatorIndex + 1));
		}
		else
		{
			if (DefaultDomain.IsValid())
			{
				FString SomeString = TEXT(" ---> ") + DefaultDomain->UserFacingDomainName.ToString();
				UE_LOG(LogTemp, Log, TEXT("DefaultDomain: %s"), *SomeString);
				for (FString stringy : DefaultDomain->DomainRootPaths)
				{
					UE_LOG(LogTemp, Log, TEXT("RootPath: %s"), *stringy);
				}
			}
			if (Domain.IsValid())
			{
				FString SomeString2 = TEXT(" ---> ") + Domain->UserFacingDomainName.ToString();
				UE_LOG(LogTemp, Log, TEXT("Domain: %s"), *SomeString2);
			}
			check(RemainingPath.Len() == 0);
			ensure(!DefaultDomain.IsValid());
			DefaultDomain = Domain;
		}
	}

It was some setting in my defaultgame.ini, I just deleted some odd data registry related lines which fixed it.

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.