Invalid access to memory location at compile

Hello everyone,
I’m encountering an issue when I try to build my project from visual studio mentioning Invalid access to memory location. I also get this error when using live coding but only from time to time. This is the error:
1>EXEC : error : System.ComponentModel.Win32Exception (998): Invalid access to memory location.
1> at EpicGames.Core.ManagedProcessGroup.get_TotalProcessorTime() in D:\build++UE5\Sync\Engine\Saved\CsTools\Engine\Source\Programs\Shared\EpicGames.Core\ManagedProcess.cs:line 165
1> at EpicGames.Core.ManagedProcess.get_TotalProcessorTime() in D:\build++UE5\Sync\Engine\Saved\CsTools\Engine\Source\Programs\Shared\EpicGames.Core\ManagedProcess.cs:line 1207
1> 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
1> at UnrealBuildTool.ParallelExecutor.ExecuteAction(Task`1[] 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 286
1>[21/22] Copy OpenImageDenoise.dll cancelled

I have visual studio, unreal engine 5.1 and the project on the same drive and I just reinstalled visual studio to see if it fixes something but it’s still the same. Has anyone encountered this?

I found a solution for this problem, where the problem was with “dotnet” program.

Solutions:
1-Write in the cmd " where.exe dotnet "
if you found that dotnet is exist in two different location just delete the 32bit version
“Program Files(x86)/dotnet” and that will solve the problem.

2-if its not the case just uninstall dotnet and re-download the right version, which is dotnet 6 for unreal engine 5.

That’s all I hope its use full and for more details check this : https://github.com/OmniSharp/omnisharp-vscode/wiki/Troubleshooting:-‘The-.NET-Core-SDK-cannot-be-located.’-errors

2 Likes

You are literally the best.