Unreal Engine 5.4 - Error when Live Compiling

Trying to live compile returns the following result:

Manual recompile triggered
---------- Creating patch ----------
Running C:\Program Files\Epic Games\UE_5.4\Engine\Build\BatchFiles\Build.bat -Target=“CryptRaiderEditor Win64 Development -Project=”“C:/Users/Primrose Jameson/Documents/Unreal Projects/CryptRaider/CryptRaider.uproject”"" -LiveCoding -LiveCodingModules=“C:/Program Files/Epic Games/UE_5.4/Engine/Intermediate/LiveCodingModules.json” -LiveCodingManifest=“C:/Program Files/Epic Games/UE_5.4/Engine/Intermediate/LiveCoding.json” -WaitMutex -LiveCodingLimit=100
Using bundled DotNet SDK version: 6.0.302
Running UnrealBuildTool: dotnet “…\Engine\Binaries\DotNET\UnrealBuildTool\UnrealBuildTool.dll” -Target=“CryptRaiderEditor Win64 Development -Project=”“C:/Users/Primrose Jameson/Documents/Unreal Projects/CryptRaider/CryptRaider.uproject”"" -LiveCoding -LiveCodingModules=“C:/Program Files/Epic Games/UE_5.4/Engine/Intermediate/LiveCodingModules.json” -LiveCodingManifest=“C:/Program Files/Epic Games/UE_5.4/Engine/Intermediate/LiveCoding.json” -WaitMutex -LiveCodingLimit=100
Log file: C:\Users\Primrose Jameson\AppData\Local\UnrealBuildTool\Log.txt
Building CryptRaiderEditor…
Using Visual Studio 2022 14.38.33135 toolchain (C:\Program Files\Microsoft Visual Studio\2022\Community\VC\Tools\MSVC\14.38.33130) and Windows 10.0.19041.0 SDK (C:\Program Files (x86)\Windows Kits\10).
Determining max actions to execute in parallel (12 physical cores, 24 logical cores)
Executing up to 12 processes, one per physical core
Using Parallel executor to run 17 action(s)
------ Building 17 action(s) started ------
[1/17] Compile [x64] SharedPCH.UnrealEd.Project.ValApi.Cpp20.cpp
[2/17] Compile [x64] CryptRaider.cpp
[3/17] Compile [x64] CryptRaider.init.gen.cpp
[4/17] Compile [x64] CryptRaiderCharacter.gen.cpp
[5/17] Compile [x64] CryptRaiderGameMode.cpp
[6/17] Compile [x64] CryptRaiderGameMode.gen.cpp
[7/17] Compile [x64] TP_PickUpComponent.cpp
[8/17] Compile [x64] CryptRaiderPlayerController.gen.cpp
c1xx: error C3859: Failed to create virtual memory for PCH
c1xx: note: the system returned code 1455: The paging file is too small for this operation to complete.
c1xx: note: please visit https://aka.ms/pch-help for more details
c1xx: fatal error C1076: compiler limit: internal heap limit reached
[9/17] Compile [x64] CryptRaiderPlayerController.cpp
c1xx: error C3859: Failed to create virtual memory for PCH
c1xx: note: the system returned code 1455: The paging file is too small for this operation to complete.
c1xx: note: please visit https://aka.ms/pch-help for more details
c1xx: fatal error C1076: compiler limit: internal heap limit reached
[10/17] Compile [x64] CryptRaiderProjectile.cpp
c1xx: error C3859: Failed to create virtual memory for PCH
c1xx: note: the system returned code 1455: The paging file is too small for this operation to complete.
c1xx: note: please visit https://aka.ms/pch-help for more details
c1xx: fatal error C1076: compiler limit: internal heap limit reached
[11/17] Compile [x64] TP_PickUpComponent.gen.cpp
c1xx: error C3859: Failed to create virtual memory for PCH
c1xx: note: the system returned code 1455: The paging file is too small for this operation to complete.
c1xx: note: please visit https://aka.ms/pch-help for more details
c1xx: fatal error C1076: compiler limit: internal heap limit reached
[12/17] Compile [x64] CryptRaiderProjectile.gen.cpp
c1xx: error C3859: Failed to create virtual memory for PCH
c1xx: note: the system returned code 1455: The paging file is too small for this operation to complete.
c1xx: note: please visit https://aka.ms/pch-help for more details
c1xx: fatal error C1076: compiler limit: internal heap limit reached
[13/17] Compile [x64] Mover.cpp
c1xx: error C3859: Failed to create virtual memory for PCH
c1xx: note: the system returned code 1455: The paging file is too small for this operation to complete.
c1xx: note: please visit https://aka.ms/pch-help for more details
c1xx: fatal error C1076: compiler limit: internal heap limit reached
[14/17] Compile [x64] Mover.gen.cpp
c1xx: error C3859: Failed to create virtual memory for PCH
c1xx: note: the system returned code 1455: The paging file is too small for this operation to complete.
c1xx: note: please visit https://aka.ms/pch-help for more details
c1xx: fatal error C1076: compiler limit: internal heap limit reached
[15/17] Compile [x64] TP_WeaponComponent.gen.cpp
[16/17] Compile [x64] CryptRaiderCharacter.cpp
[17/17] Compile [x64] TP_WeaponComponent.cpp
Total time in Parallel executor: 35.11 seconds
Total execution time: 35.99 seconds
Build failed.

I had to install an earlier library for C++ build tools through Visual Studio Installer. I get this same error when I compile before adding my Mover component. I’m not sure how to compile outside of the engine.

Attached below are screenshots of my code for the Mover component:


I haven’t run in to this myself, but I found a StackOverflow article that pointed to this Microsoft documentation: Precompiled Header (PCH) issues and recommendations - C++ Team Blog It has explanations of the possible causes and some solutions.

On a side note, if you’re using Live Coding, double check that Hot Reload is disabled. It should be when Live Coding is used, it replaced it.

You can compile from Visual Studio Code if you debug it. That will do a build, and then start the editor in debug mode, which is very useful. Epic has instructions on that here: Setting Up Visual Studio Code For Unreal Engine | Unreal Engine 5.4 Documentation | Epic Developer Community

Yeah, reading through that blog post is pretty dense and the solutions aren’t very intuitive. If an expert can help me parse it out and implement what they suggest, I’ll be happy to work through it, but on my own could take a little while and I don’t really think this sort of issue falls under the scope of the lesson or future lessons for this project either.

I’m not sure where to go to check that Hot Reload is disabled. It seems easily accessed from Visual Studio, but I’m not sure where to go in Visual Studio code.

I’ll follow Epic’s documentation to make sure VS Code is properly configured for Unreal.

Hot Reload (and Live Coding) are settings in your UE Settings.


Okay, I’ve ensured those settings are matching what you’ve got in your screenshots.

Compiling in Visual Studio Code results in a new error:
a_error

There are no other errors reported, I’m not sure what’s going on at all.

I’ve ensured as well that VSCode is configured properly for use with Unreal according to Epic’s documentation.

Eek, ok.

So, look at your .vscode/c_cpp_properties.json. It should look similar to this, except the paths will probably be different, and my project name is “Aura”, so that’ll be different, too.

{
	"configurations": [
		{
			"name": "AuraEditor Editor Win64 Development (Aura)",
			"compilerPath": "C:\\Program Files\\Microsoft Visual Studio\\2022\\Community\\VC\\Tools\\MSVC\\14.38.33130\\bin\\Hostx64\\x64\\cl.exe",
			"cStandard": "c17",
			"cppStandard": "c++20",
			"intelliSenseMode": "msvc-x64",
			"compileCommands": "D:\\Epic\\Projects\\Aura\\.vscode\\compileCommands_Aura.json",
			"includePath": [
				"${workspaceFolder}\\Intermediate\\**",
				"${workspaceFolder}\\Plugins\\**",
				"${workspaceFolder}\\Source\\**"
			],
			"defines": [
				"UNICODE",
				"_UNICODE",
				"__UNREAL__",
				"UBT_COMPILED_PLATFORM=Windows",
				"WITH_ENGINE=1",
				"WITH_UNREAL_DEVELOPER_TOOLS=1",
				"WITH_APPLICATION_CORE=1",
				"WITH_COREUOBJECT=1"
			]
		},
		{
			"name": "Win32",
			"compilerPath": "C:\\Program Files\\Microsoft Visual Studio\\2022\\Community\\VC\\Tools\\MSVC\\14.38.33130\\bin\\Hostx64\\x64\\cl.exe",
			"cStandard": "c17",
			"cppStandard": "c++20",
			"intelliSenseMode": "msvc-x64",
			"compileCommands": "D:\\Epic\\Projects\\Aura\\.vscode\\compileCommands_Default.json"
		}
	],
	"version": 4
}

When selecting what to debug, you should be pointing to this target:
image

And down in the lower right of VSCode, you shouldn’t have Win32 selected, but your project:
image

1 Like

Wow, thank you so much. Fixing my .json to match exactly what you had made it work. Must have been something off about IntelliSense or something! I can add my Mover component now and everything functions normally! Thank you again! :smiley:

1 Like

If something from Live Coding has corrupted something, make sure UE is shut down and then delete these 3 directories. That will cause Visual Studio to do a new, clean build:

1 Like

It’s very interesting. Deleting those directories and attempting to rebuild the project from Unreal failed. I wonder if I have some kind of virus, maybe? Or just something preventing Unreal from compiling. It only works when I compile manually from VS Code.

I doubt it’s a virus. It’s more likely resource oriented. Are you running low on disk space? If you have a physical drive, is it very fragmented?

I was looking over that blog and if you scroll down to the screenshots, they tell you to get in to your control panel and look at your paging file size, etc. You shouldn’t have to change that, but you might look at it to see what it says. Just take note of any changes you make so you can put them back if you need to.

1 Like

Thanks so much for your attention on this. I have 2 drives and both aren’t too low on space, but maybe getting there. 100 GB on one and about 300 on the other. I did actually run defragging yesterday too since I read something about that. It wasn’t very fragmented, 1% fragmentation for that drive. I ran it anyway and it says it isn’t fragmented anymore. I checked the virtual memory allocation thing in the control panel just now and I noticed it was pretty low, only about 2 GB. I bumped it up to the recommended value that the window shows, but if for some reason I need to bump it back down I know where to go and what value to set it to. Hey and what do you know, deleting those directories and rebuilding the project from Unreal works now after bumping that value up! Very interesting stuff! I learned a lot from all this, haha!

1 Like

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

Privacy & Terms