UE5 5.0 branch build error - Chaos

I’m trying to build UE5 from the 5.0 branch using VS2022 Current. I’ve compiled it before with no errors shortly after the branch was created, but now I get stuck with the following problem.

Running GenerateProjectFiles.bat spits out the following error, which fails to find something for Chaos in a non-existent “\Restricted\NotForLicensees” folder. If I go ahead and try to build anyway, it fails.

Anyone encountered this, or have any advice on a work-around? I’m pretty new to building Unreal from source and this is out of my depth.

Thanks!

Binding IntelliSense data...
WARNING: Exception while generating include data for HeadlessChaos: Unable to instantiate module 'HeadlessChaos': System.IO.DirectoryNotFoundException: Could not find a part of the path 'C:\Users\username\Documents\GitHub\UnrealEngine\Engine\Restricted\NotForLicensees\Build'.
     at System.IO.Enumeration.FileSystemEnumerator`1.CreateDirectoryHandle(String path, Boolean ignoreNotFound)
     at System.IO.Enumeration.FileSystemEnumerator`1.Init()
     at System.IO.Enumeration.FileSystemEnumerable`1..ctor(String directory, FindTransform transform, EnumerationOptions options, Boolean isNormalized)
     at System.IO.Enumeration.FileSystemEnumerableFactory.UserEntries(String directory, String expression, EnumerationOptions options)
     at System.IO.Directory.InternalEnumeratePaths(String path, String searchPattern, SearchTarget searchTarget, EnumerationOptions options)
     at System.IO.Directory.GetFileSystemEntries(String path)
     at LowLevelTests.UpdateBuildGraphPropertiesFile() in C:\Users\username\Documents\GitHub\UnrealEngine\Engine\Source\Programs\LowLevelTests\LowLevelTests.Build.cs:line 90
     at LowLevelTests..ctor(ReadOnlyTargetRules Target) in C:\Users\username\Documents\GitHub\UnrealEngine\Engine\Source\Programs\LowLevelTests\LowLevelTests.Build.cs:line 67
     at HeadlessChaos..ctor(ReadOnlyTargetRules Target) in C:\Users\username\Documents\GitHub\UnrealEngine\Engine\Source\Programs\HeadlessChaos\HeadlessChaos.Build.cs:line 16
  (referenced via HeadlessChaos.Target.cs)[/list]
Binding IntelliSense data... 100%

Hi @69_Tensors,

I believe the 5.0 branch is not stable and being used for active development for the upcoming 5.0 release.

If you want a stable compile I recommend the ue5-earlyaccess branch.

1 Like

Thanks for the reply.

I’ve actually been using the early access branch for a while, but I’ve been encountering the D3D DXGI_ERROR_DEVICE_REMOVED error reported in threads like this: Runtime D3D Crash of Ue5-ValleyOfTheAncients especially when using raytracing.

I know it could be a driver problem, but I’ve been trying my luck at building a newer branch of UE5 in hopes of getting a more stable experience. That said, if the branch is under active development, it’s not going to be a reliable solution.

ue5-early access is absolutely outdated and both 5.0 and ue5-main branches are in much better state than early access.

On Linux system 5.0 branch is more stable than ue5-main

1 Like

try to completely remove Engine/Intermediate directory prior to generating and build.

1 Like

Thanks for the suggestion; I tried, but no luck.

ue5-main and 5.0 produce the same error. I’ve deleted and re-cloned both repositories twice, and have even purged and reinstalled VC2022 just in case.

The generation script is clearly looking for a Restricted folder under …\Engine\ that is not being provided by the repo or the UE5-Prerequisites…

I suppose I’ll just have to wait this out and see if a future commit fixes it.

As that message is just a WARNING why it stops compilation? Maybe you just have to disable VC22 “stop on warning” somehow?

Hi @69_Tensors,
I have made many builds, recently on the 12th November 2021, a change was added and now the patch is to create the directory so in the Windows Command shell.

C:> mkdir C:\Users\Owner\source\repos\ue50\Engine\Restricted\NotForLicensees
where ue50 is the root of my branch
then GenerateProjectFiles.bat -2022
again and my generate works.

There were 1709 updates to the 5.0 repository which got automatically copied into one of my forks as well because I did one small update!.

My Quixel forked repo had a slight name change due to the final release of VS2022 day, but it still works.
jimshalo10/UnrealEngine-5: Update the Quixel Plugin to the latest version 2012.0.04. The original Early Access 2 branch for VS2022 is “ue5EA-vs2022” (github.com)

4 Likes

Hi @Jimbohalo10,

THANK YOU. I can hardly believe it, but your suggestion absolutely fixed it. I just created the empty missing folder “…\Engine\Restricted\NotForLicensees\Build” and re-generated. VS2022 built it with zero errors.

I’m almost embarrassed that was such a simple fix!

FYI, GenerateProjectFiles.bat now raises a warning if you pass the -2022 flag in the Terminal, and directs you to update your BuildConfiguration.xml file instead, as follows:

         <?xml version="1.0" encoding="utf-8" ?>
         <Configuration xmlns="https://www.unrealengine.com/BuildConfiguration">
           <ProjectFileGenerator>
             <Format>VisualStudio2022</Format>
           </ProjectFileGenerator>
         </Configuration>

I did that, and am happily running a successful build. Thanks again.

2 Likes

Your solution work so well. Now I am testing 5.1 :heart_eyes: !

1 Like

@Jimbohalo10,
Thanks for the post. It worked for me as well

Is anyone else not able to get the solution above to work? In VS2022 as admin on Windows 11, and on the ue5-main branch, I’ve:

  • created the additional folder and double checked the spelling
  • edited the BuildConfiguration.xml in both AppData and the file itself
  • re-run GenerateProjectFiles.bat (with and without flag)
  • tried both Build and Rebuild

but I always get this same error above at the very end. Any recommendations other than just waiting for the stable branch? Is there an additional step not obvious to newbies, like deleting all or part of the current dirs when rebuilding?

I assume it must be something really simple that I’m not doing, since everyone has it working?

Make sure you’re compiling only your project, not the entire solution with all additional programs. Your IDE might be set to compile something else than a project, when opening IDE for the first time.

Hmm, it’s only for the UE5 engine build, so no additional programs. I am seeing that all my dir, like the Build folder created, are read-only and that there is a known issue with Windows 11 reverting to read-only. Taking steps to fix that now to see if it’s somehow related.

Anyone else have this problem using the engine after succesfully build it?
If i open a blank project or the puzzle template it works fine, but if i try to open an existing 5.0 project or use any other epic templates to create a new project the engine crashes at 95% loading with this error

Assertion failed: IsInGameThread() [File:E:\ue5source\UnrealEngine-ue5-main\Engine\Source\Runtime\Core\Private\HAL\ConsoleManager.cpp] [Line: 556]

UnrealEditor_Core!FConsoleVariable<bool>::GetPlatformValueVariable() [E:\ue5source\UnrealEngine-ue5-main\Engine\Source\Runtime\Core\Private\HAL\ConsoleManager.cpp:556]
UnrealEditor_RenderCore!FShaderPlatformCachedIniValue<bool>::Get() [E:\ue5source\UnrealEngine-ue5-main\Engine\Source\Runtime\RenderCore\Public\RenderUtils.h:550]
UnrealEditor_Engine!FGPUBaseSkinAPEXClothVertexFactory::IsClothEnabled() [E:\ue5source\UnrealEngine-ue5-main\Engine\Source\Runtime\Engine\Private\GPUSkinVertexFactory.cpp:1213]
UnrealEditor_Engine!FSkeletalMeshObjectGPUSkin::ProcessUpdatedDynamicData() [E:\ue5source\UnrealEngine-ue5-main\Engine\Source\Runtime\Engine\Private\SkeletalRenderGPUSkin.cpp:685]
UnrealEditor_Engine!FSkeletalMeshObjectGPUSkin::UpdateDynamicData_RenderThread() [E:\ue5source\UnrealEngine-ue5-main\Engine\Source\Runtime\Engine\Private\SkeletalRenderGPUSkin.cpp:566]
UnrealEditor_Engine!<lambda_465020887a9e532308a20119da2809fd>::operator()() [E:\ue5source\UnrealEngine-ue5-main\Engine\Source\Runtime\Engine\Private\SkeletalRenderGPUSkin.cpp:447]
UnrealEditor_Engine!TEnqueueUniqueRenderCommandType<`FSkeletalMeshObjectGPUSkin::Update'::`2'::SkelMeshObjectUpdateDataCommandName,<lambda_465020887a9e532308a20119da2809fd> >::DoTask() [E:\ue5source\UnrealEngine-ue5-main\Engine\Source\Runtime\RenderCore\Public\RenderingThread.h:184]
UnrealEditor_Engine!TGraphTask<TEnqueueUniqueRenderCommandType<`FSkeletalMeshObjectGPUSkin::Update'::`2'::SkelMeshObjectUpdateDataCommandName,<lambda_465020887a9e532308a20119da2809fd> > >::ExecuteTask() [E:\ue5source\UnrealEngine-ue5-main\Engine\Source\Runtime\Core\Public\Async\TaskGraphInterfaces.h:980]
UnrealEditor_Core!FNamedTaskThread::ProcessTasksNamedThread() [E:\ue5source\UnrealEngine-ue5-main\Engine\Source\Runtime\Core\Private\Async\TaskGraph.cpp:753]
UnrealEditor_Core!FNamedTaskThread::ProcessTasksUntilQuit() [E:\ue5source\UnrealEngine-ue5-main\Engine\Source\Runtime\Core\Private\Async\TaskGraph.cpp:642]
UnrealEditor_Core!FTaskGraphCompatibilityImplementation::ProcessThreadUntilRequestReturn() [E:\ue5source\UnrealEngine-ue5-main\Engine\Source\Runtime\Core\Private\Async\TaskGraph.cpp:2115]
UnrealEditor_RenderCore!RenderingThreadMain() [E:\ue5source\UnrealEngine-ue5-main\Engine\Source\Runtime\RenderCore\Private\RenderingThread.cpp:377]
UnrealEditor_RenderCore!FRenderingThread::Run() [E:\ue5source\UnrealEngine-ue5-main\Engine\Source\Runtime\RenderCore\Private\RenderingThread.cpp:518]
UnrealEditor_Core!FRunnableThreadWin::Run() [E:\ue5source\UnrealEngine-ue5-main\Engine\Source\Runtime\Core\Private\Windows\WindowsRunnableThread.cpp:146]

@ChonusaN

Yes. I can build with zero errors, but any UE5 project crashes with this error on load.

I can import UE4 projects and they work pretty consistently, but any new projects, or opening UE5 projects, generates the same Assertion error that you have.

This has been true of any source build over the last 2 weeks or so. Some commit broke something and I’m not C++ savvy enough to fix it myself.

Yea i tried all the branches of the last week and have the same problem
Lets hope some fix gets commited soon

Has anyone tried lately? I’ve been watching the fixes from the other posts here:

Hi All,
There is a git pull request/patch (PR) which references this problem

This mitigates the issue where the UE5 editor crashes upon creating or opening a newly created UE5 project using the following branches: 5.0, ue5-main.
Below is the error stacktrace of the Assert fail after UE5 crashes:

Assertion failed: IsInGameThread()

The PR is
Crash: Don’t attempt platform override for CVar in non-render-thread by kristjanvalur · Pull Request #8738 · EpicGames/UnrealEngine (github.com)

1 Like

It looks like the PR was accepted 4 days ago. Has anyone had a chance to check? I’m starting from scratch this weekend, and I’ll post my updates.