Ensure Handled error on launching game from command line leaks memory

So whenever I launch a game from the command line using -game -log I notice this ensure handled error:

[2018.09.06-11.38.33:823][  0]LogOutputDevice: Error: === Handled ensure: ===
[2018.09.06-11.38.33:823][  0]LogOutputDevice: Error: 
[2018.09.06-11.38.33:824][  0]LogOutputDevice: Error: Ensure condition failed: !IsRunningGame() [File:D:\Build\++UE4+Release-4.17+Compile\Sync\Engine\Source\Editor\MainFrame\Private\MainFrameModule.cpp] [Line: 486]
[2018.09.06-11.38.33:825][  0]LogOutputDevice: Error: The MainFrame module should only be loaded when running the editor.  Code that extends the editor, adds menu items, etc... should not run when running in -game mode or in a non-WITH_EDITOR build
[2018.09.06-11.38.33:826][  0]LogOutputDevice: Error: Stack: 
[2018.09.06-11.38.33:827][  0]LogOutputDevice: Error: UE4Editor-Core.dll!FWindowsPlatformStackWalk::StackWalkAndDump() [d:\build\++ue4+release-4.17+compile\sync\engine\source\runtime\core\private\windows\windowsplatformstackwalk.cpp:200]
[2018.09.06-11.38.33:827][  0]LogOutputDevice: Error: UE4Editor-Core.dll!FDebug::EnsureFailed() [d:\build\++ue4+release-4.17+compile\sync\engine\source\runtime\core\private\misc\assertionmacros.cpp:233]
[2018.09.06-11.38.33:828][  0]LogOutputDevice: Error: UE4Editor-Core.dll!FDebug::OptionallyLogFormattedEnsureMessageReturningFalse() [d:\build\++ue4+release-4.17+compile\sync\engine\source\runtime\core\private\misc\assertionmacros.cpp:360]
[2018.09.06-11.38.33:850][  0]LogOutputDevice: Error: UE4Editor-MainFrame.dll!FMainFrameModule::StartupModule() [d:\build\++ue4+release-4.17+compile\sync\engine\source\editor\mainframe\private\mainframemodule.cpp:486]
[2018.09.06-11.38.33:851][  0]LogOutputDevice: Error: UE4Editor-Core.dll!FModuleManager::LoadModuleWithFailureReason() [d:\build\++ue4+release-4.17+compile\sync\engine\source\runtime\core\private\modules\modulemanager.cpp:505]
[2018.09.06-11.38.33:853][  0]LogOutputDevice: Error: UE4Editor-Core.dll!FModuleManager::LoadModule() [d:\build\++ue4+release-4.17+compile\sync\engine\source\runtime\core\private\modules\modulemanager.cpp:338]
[2018.09.06-11.38.33:854][  0]LogOutputDevice: Error: UE4Editor-Core.dll!FModuleManager::LoadModuleChecked() [d:\build\++ue4+release-4.17+compile\sync\engine\source\runtime\core\private\modules\modulemanager.cpp:349]
[2018.09.06-11.38.33:855][  0]LogOutputDevice: Error: UE4Editor-LevelEditor.dll!FLevelEditorModule::StartupModule() [d:\build\++ue4+release-4.17+compile\sync\engine\source\editor\leveleditor\private\leveleditor.cpp:224]
[2018.09.06-11.38.33:857][  0]LogOutputDevice: Error: UE4Editor-Core.dll!FModuleManager::LoadModuleWithFailureReason() [d:\build\++ue4+release-4.17+compile\sync\engine\source\runtime\core\private\modules\modulemanager.cpp:505]
[2018.09.06-11.38.33:857][  0]LogOutputDevice: Error: UE4Editor-Core.dll!FModuleManager::LoadModule() [d:\build\++ue4+release-4.17+compile\sync\engine\source\runtime\core\private\modules\modulemanager.cpp:338]
[2018.09.06-11.38.33:858][  0]LogOutputDevice: Error: UE4Editor-Core.dll!FModuleManager::LoadModuleChecked() [d:\build\++ue4+release-4.17+compile\sync\engine\source\runtime\core\private\modules\modulemanager.cpp:349]
[2018.09.06-11.38.33:862][  0]LogOutputDevice: Error: UE4Editor-CodeEditor.dll!FCodeEditor::StartupModule() [d:\build\++ue4+release-4.17+compile\sync\engine\plugins\experimental\codeeditor\source\codeeditor\private\codeeditor.cpp:69]
[2018.09.06-11.38.33:862][  0]LogOutputDevice: Error: UE4Editor-Core.dll!FModuleManager::LoadModuleWithFailureReason() [d:\build\++ue4+release-4.17+compile\sync\engine\source\runtime\core\private\modules\modulemanager.cpp:505]
[2018.09.06-11.38.33:863][  0]LogOutputDevice: Error: UE4Editor-Projects.dll!FModuleDescriptor::LoadModulesForPhase() [d:\build\++ue4+release-4.17+compile\sync\engine\source\runtime\projects\private\moduledescriptor.cpp:476]
[2018.09.06-11.38.33:864][  0]LogOutputDevice: Error: UE4Editor-Projects.dll!TryLoadModulesForPlugin() [d:\build\++ue4+release-4.17+compile\sync\engine\source\runtime\projects\private\pluginmanager.cpp:823]
[2018.09.06-11.38.33:865][  0]LogOutputDevice: Error: UE4Editor-Projects.dll!FPluginManager::LoadModulesForEnabledPlugins() [d:\build\++ue4+release-4.17+compile\sync\engine\source\runtime\projects\private\pluginmanager.cpp:888]
[2018.09.06-11.38.33:866][  0]LogOutputDevice: Error: UE4Editor.exe!FEngineLoop::LoadStartupModules() [d:\build\++ue4+release-4.17+compile\sync\engine\source\runtime\launch\private\launchengineloop.cpp:2543]
[2018.09.06-11.38.33:866][  0]LogOutputDevice: Error: UE4Editor.exe!FEngineLoop::PreInit() [d:\build\++ue4+release-4.17+compile\sync\engine\source\runtime\launch\private\launchengineloop.cpp:1957]
[2018.09.06-11.38.33:867][  0]LogOutputDevice: Error: UE4Editor.exe!GuardedMain() [d:\build\++ue4+release-4.17+compile\sync\engine\source\runtime\launch\private\launch.cpp:127]
[2018.09.06-11.38.33:868][  0]LogOutputDevice: Error: UE4Editor.exe!GuardedMainWrapper() [d:\build\++ue4+release-4.17+compile\sync\engine\source\runtime\launch\private\windows\launchwindows.cpp:134]
[2018.09.06-11.38.33:869][  0]LogOutputDevice: Error: UE4Editor.exe!WinMain() [d:\build\++ue4+release-4.17+compile\sync\engine\source\runtime\launch\private\windows\launchwindows.cpp:210]
[2018.09.06-11.38.33:875][  0]LogOutputDevice: Error: UE4Editor.exe!__scrt_common_main_seh() [f:\dd\vctools\crt\vcstartup\src\startup\exe_common.inl:253]
[2018.09.06-11.38.33:876][  0]LogOutputDevice: Error: KERNEL32.DLL!0x00000000DF7F3034
[2018.09.06-11.38.33:877][  0]LogOutputDevice: Error: ntdll.dll!0x00000000E1B81431
[2018.09.06-11.38.33:878][  0]LogOutputDevice: Error: 
[2018.09.06-11.38.33:905][  0]LogStats:                SubmitErrorReport -  0.000 s

This obviously doesn’t happen in the editor since that’s what the error’s about, nor does it happen for packaged/cooked builds.

The issue with the error is that even though the game works properly, a large amount of memory is leaked, and occupies ~40% of my main memory (8GB total), where the editor alone stays close to ~19%.

@sampattuzzi @Rob if you know any active users it would be helpful if they could be tagged, heh.

This isn’t my area of expertise I’m afrad @ShivamMukherjee, hopefully @sampattuzzi will be able to help/advise.

1 Like

No problem Rob :+1:

1 Like

How odd. Which version is this?

It’s 4.17!

Have you tried downloading my project to see if it’s the project or your editor install?

Sorry for the delay in response @sampattuzzi - frankly, I had almost indefinitely paused the project.

There were no errors like the one I got, nor any memory leaks - it must have something to do with my project alone.

1 Like

Privacy & Terms