C++ Compile error Invalid Access to memory location [Solved]

Hello Every, I have gotten to the point in the course where I need to compile my project. Specifically the Obstacle Assault one. However, after following the steps, reinstalling all the relevant programs. Including Unreal Engine. I still hit the same wall. Here is the error code:

  • Executing task in folder StoneRunner: Engine\Build\BatchFiles\Build.bat StoneRunnerEditor Win64 Development ‘D:\Unreal Projects\StoneRunner\StoneRunner.uproject’ -waitmutex

Running UnrealBuildTool: dotnet “…\Engine\Binaries\DotNET\UnrealBuildTool\UnrealBuildTool.dll” StoneRunnerEditor Win64 Development “D:\Unreal Projects\StoneRunner\StoneRunner.uproject” -waitmutex
Log file: C:\Users\archa\AppData\Local\UnrealBuildTool\Log.txt
Invalidating makefile for StoneRunnerEditor (cl.exe deleted)
Building StoneRunnerEditor…
Using Visual Studio 2019 14.29.30147 toolchain (C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Tools\MSVC\14.29.30133) and Windows 10.0.22000.0 SDK (C:\Program Files (x86)\Windows Kits\10).
[Upgrade]
[Upgrade] Using backward-compatible include order. The latest version of UE has changed the order of includes, which may require code changes. The current setting is:
[Upgrade] IncludeOrderVersion = EngineIncludeOrderVersion.Unreal5_0
[Upgrade] Suppress this message by setting ‘IncludeOrderVersion = EngineIncludeOrderVersion.Unreal5_1;’ in StoneRunnerEditor.Target.cs.
[Upgrade] Alternatively you can set this to ‘EngineIncludeOrderVersion.Latest’ to always use the latest include order. This will potentially cause compile errors when integrating new versions of the engine.
[Upgrade]
Determining max actions to execute in parallel (4 physical cores, 8 logical cores)
Executing up to 4 processes, one per physical core
Requested 1.5 GB free memory per action, 1.3 GB available: limiting max parallel actions to 1
Building 9 actions with 1 process…
ERROR: System.ComponentModel.Win32Exception (998): Invalid access to memory location.
at EpicGames.Core.ManagedProcessGroup.get_TotalProcessorTime() in D:\build++UE5\Sync\Engine\Saved\CsTools\Engine\Source\Programs\Shared\EpicGames.Core\ManagedProcess.cs:line 165
at EpicGames.Core.ManagedProcess.get_TotalProcessorTime() in D:\build++UE5\Sync\Engine\Saved\CsTools\Engine\Source\Programs\Shared\EpicGames.Core\ManagedProcess.cs:line 1207
at UnrealBuildTool.ParallelExecutor.RunAction(LinkedAction Action, ManagedProcessGroup ProcessGroup, CancellationToken CancellationToken) in D:\build++UE5\Sync\Engine\Saved\CsTools\Engine\Source\Programs\UnrealBuildTool\Executors\ParallelExecutor.cs:line 301
at UnrealBuildTool.ParallelExecutor.ExecuteAction(Task1[] AntecedentTasks, LinkedAction Action, ManagedProcessGroup ProcessGroup, SemaphoreSlim MaxProcessSemaphore, CancellationToken CancellationToken) in D:\build\++UE5\Sync\Engine\Saved\CsTools\Engine\Source\Programs\UnrealBuildTool\Executors\ParallelExecutor.cs:line 268 [1/9] Compile StoneRunner.init.gen.cpp cancelled [2/9] Compile MovingPlatform.gen.cpp cancelled [3/9] Compile SharedPCH.Engine.ShadowErrors.InclOrderUnreal5_0.cpp cancelled [4/9] Compile StoneRunner.cpp cancelled [5/9] Compile MovingPlatform.cpp cancelled ERROR: System.ComponentModel.Win32Exception (998): Invalid access to memory location. at EpicGames.Core.ManagedProcessGroup.get_TotalProcessorTime() in D:\build\++UE5\Sync\Engine\Saved\CsTools\Engine\Source\Programs\Shared\EpicGames.Core\ManagedProcess.cs:line 165 at EpicGames.Core.ManagedProcess.get_TotalProcessorTime() in D:\build\++UE5\Sync\Engine\Saved\CsTools\Engine\Source\Programs\Shared\EpicGames.Core\ManagedProcess.cs:line 1207 at UnrealBuildTool.ParallelExecutor.RunAction(LinkedAction Action, ManagedProcessGroup ProcessGroup, CancellationToken CancellationToken) in D:\build\++UE5\Sync\Engine\Saved\CsTools\Engine\Source\Programs\UnrealBuildTool\Executors\ParallelExecutor.cs:line 301 at UnrealBuildTool.ParallelExecutor.ExecuteAction(Task1 AntecedentTasks, LinkedAction Action, ManagedProcessGroup ProcessGroup, SemaphoreSlim MaxProcessSemaphore, CancellationToken CancellationToken) in D:\build++UE5\Sync\Engine\Saved\CsTools\Engine\Source\Programs\UnrealBuildTool\Executors\ParallelExecutor.cs:line 268
[6/9] Resource Default.rc2 cancelled
[7/9] Link UnrealEditor-StoneRunner.dll cancelled
[8/9] Link UnrealEditor-StoneRunner.lib cancelled
[9/9] WriteMetadata StoneRunnerEditor.target cancelled

Okay so the way I solved it is by having the engine, VS Code, VS and the project itself on the same drive. And that is the main drive for me. Apparently not having your projects and Engine on the same drive get’s a bit weird with the compile.

1 Like

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

Privacy & Terms