Cooking failed due to unknown GameplayDebugger assertion

When I try to cook my project this error occurs:

UATHelper: Cooking (Windows): LogWindows: Error: begin: stack for UAT
UATHelper: Cooking (Windows): LogWindows: Error: === Critical error: ===
UATHelper: Cooking (Windows): LogWindows: Error:
UATHelper: Cooking (Windows): LogWindows: Error: Assertion failed: !IsRunningCommandlet() [File:D:\build\++UE5\Sync\Engine\Source\Editor\UnrealEd\Private\UnrealEdGlobals.cpp] [Line: 51]
UATHelper: Cooking (Windows): LogWindows: Error: The global mode manager should not be created or accessed in a commandlet environment. Check that your mode or module is not accessing the global mode tools or that scriptable features of modes have been moved to subsystems.
UATHelper: Cooking (Windows): LogWindows: Error:
UATHelper: Cooking (Windows): LogWindows: Error:
UATHelper: Cooking (Windows): LogWindows: Error: [Callstack] 0x00007ffb282b2845 UnrealEditor-UnrealEd.dll!Internal::GetGlobalModeManager() [D:\build\++UE5\Sync\Engine\Source\Editor\UnrealEd\Private\UnrealEdGlobals.cpp:51]
UATHelper: Cooking (Windows): LogWindows: Error: [Callstack] 0x00007ffb282a9c89 UnrealEditor-UnrealEd.dll!GLevelEditorModeTools() [D:\build\++UE5\Sync\Engine\Source\Editor\UnrealEd\Private\UnrealEdGlobals.cpp:65]
UATHelper: Cooking (Windows): LogWindows: Error: [Callstack] 0x00007ffb144175aa UnrealEditor-GameplayDebugger.dll!UGameplayDebuggerLocalController::Initialize() [D:\build\++UE5\Sync\Engine\Source\Developer\GameplayDebugger\Private\GameplayDebuggerLocalController.cpp:67]
UATHelper: Cooking (Windows): LogWindows: Error: [Callstack] 0x00007ffb14422fc0 UnrealEditor-GameplayDebugger.dll!AGameplayDebuggerPlayerManager::RegisterReplicator() [D:\build\++UE5\Sync\Engine\Source\Developer\GameplayDebugger\Private\GameplayDebuggerPlayerManager.cpp:193]
UATHelper: Cooking (Windows): LogWindows: Error: [Callstack] 0x00007ffb14415e31 UnrealEditor-GameplayDebugger.dll!AGameplayDebuggerCategoryReplicator::Init() [D:\build\++UE5\Sync\Engine\Source\Developer\GameplayDebugger\Private\GameplayDebuggerCategoryReplicator.cpp:469]
UATHelper: Cooking (Windows): LogWindows: Error: [Callstack] 0x00007ffb14415f76 UnrealEditor-GameplayDebugger.dll!AGameplayDebuggerPlayerManager::Init() [D:\build\++UE5\Sync\Engine\Source\Developer\GameplayDebugger\Private\GameplayDebuggerPlayerManager.cpp:118]
UATHelper: Cooking (Windows): LogWindows: Error: [Callstack] 0x00007ffb14414540 UnrealEditor-GameplayDebugger.dll!FGameplayDebuggerModule::GetPlayerManager() [D:\build\++UE5\Sync\Engine\Source\Developer\GameplayDebugger\Private\GameplayDebuggerModule.cpp:174]
UATHelper: Cooking (Windows): LogWindows: Error: [Callstack] 0x00007ffb14420d3a UnrealEditor-GameplayDebugger.dll!FGameplayDebuggerModule::OnWorldInitialized() [D:\build\++UE5\Sync\Engine\Source\Developer\GameplayDebugger\Private\GameplayDebuggerModule.cpp:185]
UATHelper: Cooking (Windows): LogWindows: Error: [Callstack] 0x00007ffb14410dc6 UnrealEditor-GameplayDebugger.dll!TBaseRawMethodDelegateInstance<0,FGameplayDebuggerModule,void __cdecl(UWorld *,UWorld::InitializationValues),FDefaultDelegateUserPolicy>::ExecuteIfSafe() [D:\build\++UE5\Sync\Engine\Source\Runtime\Core\Public\Delegates\DelegateInstancesImpl.h:470]
UATHelper: Cooking (Windows): LogWindows: Error: [Callstack] 0x00007ffb25276c0e UnrealEditor-Engine.dll!TMulticastDelegate<void __cdecl(UWorld *,UWorld::InitializationValues),FDefaultDelegateUserPolicy>::Broadcast() [D:\build\++UE5\Sync\Engine\Source\Runtime\Core\Public\Delegates\DelegateSignatureImpl.inl:967]
UATHelper: Cooking (Windows): LogWindows: Error: [Callstack] 0x00007ffb2528d07a UnrealEditor-Engine.dll!UWorld::InitWorld() [D:\build\++UE5\Sync\Engine\Source\Runtime\Engine\Private\World.cpp:1900]
UATHelper: Cooking (Windows): LogWindows: Error: [Callstack] 0x00007ffb2528f191 UnrealEditor-Engine.dll!UWorld::InitializeNewWorld() [D:\build\++UE5\Sync\Engine\Source\Runtime\Engine\Private\World.cpp:2019]
UATHelper: Cooking (Windows): LogWindows: Error: [Callstack] 0x00007ffb2527c998 UnrealEditor-Engine.dll!UWorld::CreateWorld() [D:\build\++UE5\Sync\Engine\Source\Runtime\Engine\Private\World.cpp:2112]
UATHelper: Cooking (Windows): LogWindows: Error: [Callstack] 0x00007ffb2512a1f3 UnrealEditor-Engine.dll!UEngine::Init() [D:\build\++UE5\Sync\Engine\Source\Runtime\Engine\Private\UnrealEngine.cpp:1890]
UATHelper: Cooking (Windows): LogWindows: Error: [Callstack] 0x00007ffb279581ea UnrealEditor-UnrealEd.dll!UEditorEngine::InitEditor() [D:\build\++UE5\Sync\Engine\Source\Editor\UnrealEd\Private\EditorEngine.cpp:654]
UATHelper: Cooking (Windows): LogWindows: Error: [Callstack] 0x00007ff6e0108e46 UnrealEditor-Cmd.exe!FEngineLoop::PreInitPostStartupScreen() [D:\build\++UE5\Sync\Engine\Source\Runtime\Launch\Private\LaunchEngineLoop.cpp:3600]
UATHelper: Cooking (Windows): LogWindows: Error: [Callstack] 0x00007ff6e0100bbd UnrealEditor-Cmd.exe!GuardedMain() [D:\build\++UE5\Sync\Engine\Source\Runtime\Launch\Private\Launch.cpp:137]
PackagingResults: Error: begin: stack for UAT
PackagingResults: Error: === Critical error: ===
PackagingResults: Error: Assertion failed: !IsRunningCommandlet() [File:D:\build\++UE5\Sync\Engine\Source\Editor\UnrealEd\Private\UnrealEdGlobals.cpp] [Line: 51]
PackagingResults: Error: The global mode manager should not be created or accessed in a commandlet environment. Check that your mode or module is not accessing the global mode tools or that scriptable features of modes have been moved to subsystems.
PackagingResults: Error: [Callstack] 0x00007ffb282b2845 UnrealEditor-UnrealEd.dll!Internal::GetGlobalModeManager() [D:\build\++UE5\Sync\Engine\Source\Editor\UnrealEd\Private\UnrealEdGlobals.cpp:51]
PackagingResults: Error: [Callstack] 0x00007ffb282a9c89 UnrealEditor-UnrealEd.dll!GLevelEditorModeTools() [D:\build\++UE5\Sync\Engine\Source\Editor\UnrealEd\Private\UnrealEdGlobals.cpp:65]
PackagingResults: Error: [Callstack] 0x00007ffb144175aa UnrealEditor-GameplayDebugger.dll!UGameplayDebuggerLocalController::Initialize() [D:\build\++UE5\Sync\Engine\Source\Developer\GameplayDebugger\Private\GameplayDebuggerLocalController.cpp:67]
PackagingResults: Error: [Callstack] 0x00007ffb14422fc0 UnrealEditor-GameplayDebugger.dll!AGameplayDebuggerPlayerManager::RegisterReplicator() [D:\build\++UE5\Sync\Engine\Source\Developer\GameplayDebugger\Private\GameplayDebuggerPlayerManager.cpp:193]
PackagingResults: Error: [Callstack] 0x00007ffb14415e31 UnrealEditor-GameplayDebugger.dll!AGameplayDebuggerCategoryReplicator::Init() [D:\build\++UE5\Sync\Engine\Source\Developer\GameplayDebugger\Private\GameplayDebuggerCategoryReplicator.cpp:469]
PackagingResults: Error: [Callstack] 0x00007ffb14415f76 UnrealEditor-GameplayDebugger.dll!AGameplayDebuggerPlayerManager::Init() [D:\build\++UE5\Sync\Engine\Source\Developer\GameplayDebugger\Private\GameplayDebuggerPlayerManager.cpp:118]
PackagingResults: Error: [Callstack] 0x00007ffb14414540 UnrealEditor-GameplayDebugger.dll!FGameplayDebuggerModule::GetPlayerManager() [D:\build\++UE5\Sync\Engine\Source\Developer\GameplayDebugger\Private\GameplayDebuggerModule.cpp:174]
PackagingResults: Error: [Callstack] 0x00007ffb14420d3a UnrealEditor-GameplayDebugger.dll!FGameplayDebuggerModule::OnWorldInitialized() [D:\build\++UE5\Sync\Engine\Source\Developer\GameplayDebugger\Private\GameplayDebuggerModule.cpp:185]
PackagingResults: Error: [Callstack] 0x00007ffb14410dc6 UnrealEditor-GameplayDebugger.dll!TBaseRawMethodDelegateInstance<0,FGameplayDebuggerModule,void __cdecl(UWorld *,UWorld::InitializationValues),FDefaultDelegateUserPolicy>::ExecuteIfSafe() [D:\build\++UE5\Sync\Engine\Source\Runtime\Core\Public\Delegates\DelegateInstancesImpl.h:470]
PackagingResults: Error: [Callstack] 0x00007ffb25276c0e UnrealEditor-Engine.dll!TMulticastDelegate<void __cdecl(UWorld *,UWorld::InitializationValues),FDefaultDelegateUserPolicy>::Broadcast() [D:\build\++UE5\Sync\Engine\Source\Runtime\Core\Public\Delegates\DelegateSignatureImpl.inl:967]
PackagingResults: Error: [Callstack] 0x00007ffb2528d07a UnrealEditor-Engine.dll!UWorld::InitWorld() [D:\build\++UE5\Sync\Engine\Source\Runtime\Engine\Private\World.cpp:1900]
PackagingResults: Error: [Callstack] 0x00007ffb2528f191 UnrealEditor-Engine.dll!UWorld::InitializeNewWorld() [D:\build\++UE5\Sync\Engine\Source\Runtime\Engine\Private\World.cpp:2019]
PackagingResults: Error: [Callstack] 0x00007ffb2527c998 UnrealEditor-Engine.dll!UWorld::CreateWorld() [D:\build\++UE5\Sync\Engine\Source\Runtime\Engine\Private\World.cpp:2112]
PackagingResults: Error: [Callstack] 0x00007ffb2512a1f3 UnrealEditor-Engine.dll!UEngine::Init() [D:\build\++UE5\Sync\Engine\Source\Runtime\Engine\Private\UnrealEngine.cpp:1890]
PackagingResults: Error: [Callstack] 0x00007ffb279581ea UnrealEditor-UnrealEd.dll!UEditorEngine::InitEditor() [D:\build\++UE5\Sync\Engine\Source\Editor\UnrealEd\Private\EditorEngine.cpp:654]
PackagingResults: Error: [Callstack] 0x00007ff6e0108e46 UnrealEditor-Cmd.exe!FEngineLoop::PreInitPostStartupScreen() [D:\build\++UE5\Sync\Engine\Source\Runtime\Launch\Private\LaunchEngineLoop.cpp:3600]
PackagingResults: Error: [Callstack] 0x00007ff6e0100bbd UnrealEditor-Cmd.exe!GuardedMain() [D:\build\++UE5\Sync\Engine\Source\Runtime\Launch\Private\Launch.cpp:137]
UATHelper: Cooking (Windows): LogWindows: Error: [Callstack] 0x00007ff6e0100e8a UnrealEditor-Cmd.exe!GuardedMainWrapper() [D:\build\++UE5\Sync\Engine\Source\Runtime\Launch\Private\Windows\LaunchWindows.cpp:147]
UATHelper: Cooking (Windows): LogWindows: Error: [Callstack] 0x00007ff6e0103c4d UnrealEditor-Cmd.exe!LaunchWindowsStartup() [D:\build\++UE5\Sync\Engine\Source\Runtime\Launch\Private\Windows\LaunchWindows.cpp:283]
UATHelper: Cooking (Windows): LogWindows: Error: [Callstack] 0x00007ff6e0115564 UnrealEditor-Cmd.exe!WinMain() [D:\build\++UE5\Sync\Engine\Source\Runtime\Launch\Private\Windows\LaunchWindows.cpp:330]
UATHelper: Cooking (Windows): LogWindows: Error: [Callstack] 0x00007ff6e011788a UnrealEditor-Cmd.exe!__scrt_common_main_seh() [d:\a01\_work\6\s\src\vctools\crt\vcstartup\src\startup\exe_common.inl:288]
UATHelper: Cooking (Windows): LogWindows: Error: [Callstack] 0x00007ffb9f0174b4 KERNEL32.DLL!UnknownFunction []
UATHelper: Cooking (Windows): LogWindows: Error: [Callstack] 0x00007ffba0be26a1 ntdll.dll!UnknownFunction []
UATHelper: Cooking (Windows): LogWindows: Error:
UATHelper: Cooking (Windows): LogWindows: Error: end: stack for UAT
PackagingResults: Error: [Callstack] 0x00007ff6e0100e8a UnrealEditor-Cmd.exe!GuardedMainWrapper() [D:\build\++UE5\Sync\Engine\Source\Runtime\Launch\Private\Windows\LaunchWindows.cpp:147]
PackagingResults: Error: [Callstack] 0x00007ff6e0103c4d UnrealEditor-Cmd.exe!LaunchWindowsStartup() [D:\build\++UE5\Sync\Engine\Source\Runtime\Launch\Private\Windows\LaunchWindows.cpp:283]
PackagingResults: Error: [Callstack] 0x00007ff6e0115564 UnrealEditor-Cmd.exe!WinMain() [D:\build\++UE5\Sync\Engine\Source\Runtime\Launch\Private\Windows\LaunchWindows.cpp:330]
PackagingResults: Error: [Callstack] 0x00007ff6e011788a UnrealEditor-Cmd.exe!__scrt_common_main_seh() [d:\a01\_work\6\s\src\vctools\crt\vcstartup\src\startup\exe_common.inl:288]
PackagingResults: Error: [Callstack] 0x00007ffb9f0174b4 KERNEL32.DLL!UnknownFunction []
PackagingResults: Error: [Callstack] 0x00007ffba0be26a1 ntdll.dll!UnknownFunction []
PackagingResults: Error: end: stack for UAT

I couldn’t find any information related besides of this post (that doesn’t provide a useful solution for this case)
https://forums.unrealengine.com/t/global-mode-manager-build-error/587906

I guess it has something to do with the GameplayDebugger, but at this point I don’t know where to investigate further.

Any help would be appreciated, thanks.

Upgrading the engine to UE5.1 seems to have fixed the issue.

1 Like