Consistent Issue with Builds

Not sure if this is best posted where I currently am in the course, or in the Live Coding section. When building with live coding it always fails the first time regardless if everything is set up correctly, giving an error of:

“ERROR: System.ComponentModel.Win32Exception (998): Invalid access to memory location.”

If I immediately try to build again, it will succeed without any issues as shown below.

I have also noticed that whenever I have any error in my code, instead of giving me useful debugging information it will give me seemingly the same error as before. As an example, I have re-added the code (Damage = 2) commented out in the Crypt Raider Const References & Out Parameters.

VS Code mentions “Expression must be a modifiable lvalue” so I would expect to see something similar in UE5.1’s log, but that is not the case. Instead, I recieve:

Initially thinking it may be either my anti-virus or firewall, I went and disabled both of those and put exceptions to my projects folders as well as the UE5.1 folder, but it seemed to make no difference as It has persisted through multiple projects and restarts. I have been able to work around it for the time being, but am worried I will have a bigger headache later if I don’t find a solution to this. I have also noticed that VS Code will fail builds itself but if I open a new Powershell Terminal within VS Code, or occasionally close any that are open, and then attempt the build It will sometimes work.

Fail:

Success after some fighting(had to close down every terminal instance and start a new one with the Development Build task. Previously just opening another Powershell instance usually worked):

I am unsure if these are tied to the same problem or just coincidental, but it always seems to be Invalid Access to Memory Location which makes me think it’s the former. Has anyone ran into anything similar or have any suggestions?

That says it cancelled compiling Grabbet.cpp because of the error listed. So before the compiler would have encountered that error. It’s likely the same issue

Could you try verifying your engine

verify

Thanks for the suggestion! I’m not sure why I didn’t try that earlier. Sadly, it seems my issue still persists after the verification. When adjusting the same code as before, it appears to have failed in the same way:

It also has similar behavior as before with successful builds, with the first attempt failing and the second having no issue.

It’s a bit of a shot in the dark, but I may try completely uninstalling my antivirus to see if it’s causing some conflict even when disabled.

Just finished up a bit of testing after completely uninstalling my firewall and antivirus, but sadly it did not seem to make a difference. It had the exact same behavior as when it was installed, so the source of the issue must be elsewhere.

I’ve noticed immediately after the error it mentions file locations in the “D:” drive, but when checking my folder hierarchy there is no similar folder or file listed (Example: D:\build++UE5\Sync\Engine\Saved\CsTools\Engine\Source\Programs\Shared\EpicGames.Core\managedProcess.cs). As far as I’m aware, both UE5.1 and my project files should be installed on my “X:” drive, though I have seen error messages posted by others also including references to the “D:”. I doubt this is the problem, but would having a drive already assigned to “D:” potentially cause issues?

I can work around this issue for now and still continue the course, albeit debugging might be a bit more of a challenge. I’ll toss this on the back burner for the time being but am willing to try any suggestions!

No that’s normal “D:\build++UE5” isn’t your file system.

I would suggest reinstalling .NET as that error is coming from Unreal’s build system that uses that.

Wanted to say thank you for taking the time to help me with this! It’s very much appreciated.

I think we might be getting closer! I initially re-downloaded the .NET 6.0 SDK and had that repair the installation, but it had the same behavior as before. At that point, I figured I may as well completely uninstall anything related to .NET 6.0 and reinstall from the SDK, which then gave me a different error:

I find it odd that it is looking for a 32-bit version of the .NET instead of using the 64-bit that was installed, but I followed the link provided and installed the 32-bit runtime and now it won’t compile at all no matter what I do, with the outputs always appearing the same:

I’m starting to think the issue might be that it’s not picking up on the 64-bit version. I was reading that sometimes there’s issues with how the PATH is defined under Window’s Environment Variables, so I tried re-ordering those (x86 was listed first) as well as removing the 32-bit entry altogether, but neither of those had any effect so I reverted those changes. I also tried uninstalling the 32-bit runtime, downloading and installing the 64-bit runtime (figured it was worth a shot even though I had the SDK) but that gave the same error as before telling me to download the 32-bit version. I’m currently unable to compile at all, so I will be working diligently on finding a solution.

I suggest trying the Unreal forum or contacting Epic Games.

P.s. Win32XX is just a name, most (if not all) would be used by both.

Will do! I’ll try a couple more things and then reach out on the Unreal forums if I don’t have any luck.

What caused me to wonder about the version difference was due to lines 10-13 in the first image where it only found a 32-bit 5.0.10 framework followed by line 15-18 where it directly linked the 32-bit download for the .NET 6 even though I already had the 64-bit .NET 6 SDK installed at the time, but I’m not even sure if that matters in this situation. I need more practice reading error logs lol.

Thanks again for your assistance!

Finally got it working!

In an attempt to start from scratch, I ended up completely uninstalling Visual Studio as well as my .NET frameworks, then reinstalled Visual Studio first followed by the .NET sdk from Microsoft. At that point, I was still receiving same the error as before and while reading into it I ran into a couple more posts talking about an issue with the PATH. I opened my command prompt and typed “dotnet --version” to see what windows was saying was installed and it would not find anything. I figured adjusting my PATH would be worth a try again, so I shut down Unreal Engine and the Epic Launcher, went to System Environment Variables in Windows and made sure the path for “C:\Program Files\dotnet” was above “C:\Program Files (x86)\dotnet” in the list. At this point, I was able to see my dotnet installation in the command prompt, so I launched Unreal Engine and attempted to use live coding. This time I was greeted by a different error:

I tried a couple of things here, but what got everything working was opening the project in VS Code, closing it in Unreal Engine and closing the Epic Launcher for good measure, then re-built the project using the Development Build Task. Everything built perfectly, I can use live coding without issue, and when there’s errors in my code it’s giving me debug info now!

I’m not certain if the issue was only my PATH settings, a bugged install of Visual Studio or .NET, or maybe a combination of the 3, but it’s working perfectly at this point!

steps in case of tl;dr:
Uninstalled Visual Studio and .NET
Reinstalled first Visual Studio then .NET
Verified .NET was installed by typing “dotnet --version” in the command prompt
When nothing was found, adjusted PATH in System Environment Variables to have “C:\Program Files\dotnet” above “C:\Program Files (x86)\dotnet” in the list
Verified again with command prompt, this time seeing the installed .NET
Re-Built Project with Development Build Task

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

Privacy & Terms