5.8 UBA crashes while compiling ISPC files for a program target

UBA fails to compile ispc files and crashes with an access violation. This only happens for a custom program target that’s being compiled against the Engine, not for our primary game module or when compiling the engine itself.

I used the ChaosVisualDebugger program as a sample program to reproduce the issue. Compiling it directly from the UE5.sln works as expected, but when I copy the program to a new project and try to compile it from there, the UBA crash occurs.

When I completely disable UBA via BuildConfiguration.xml the program compiles without any issues, however I’d like to keep UBA enabled to speed up other game and engine builds.

This is happening on Windows 11 using Visual Studio 2022 and MSVC 14.44.

[Attachment Removed]

Steps to Reproduce

  1. Create new empty project in UE 5.8.
  2. Copy the Engine\Source\Programs\ChaosVisualDebugger folder to the project’s source folder.
  3. Rename Build.cs, Target.cs, ChaosVisualDebuggerMain.h, ChaosVisualDebuggerMain.cpp and the classes therein so there are no name conflicts.
  4. Generate project files.
  5. Open .sln and build the ChaosVisualDebugger copy.
    [Attachment Removed]

Hi,

The problem seems related to PGHook.dll that injects itself in the ispc dll chain. That DLL is part of BeyondTrust which likely come from your organization. I logged a bug report so that the dev team can review the problem and find a fix. You will soon be able to follow the evolution here: http://issues.unrealengine.com/issue/UE\-401853

In the meantime, there might be a way to exclude ispc.exe from being subjected to the DLL injection of PGHook. Another possible workaround would be to force UBA to retry failed local jobs. The retried local jobs are executed outside of UBA so Detour will not virtualize the file access and PGHook should not inject itself. This can be done by adding -UBAForcedRetry as UBT launch argument or in the build configuration:

<?xml version="1.0" encoding="utf-8" ?>
<Configuration xmlns="https://www.unrealengine.com/BuildConfiguration">
  <UnrealBuildAccelerator>
    <bForcedRetry>true</bForcedRetry>
  </UnrealBuildAccelerator>
</Configuration>

Regards,

Martin

[Attachment Removed]

Thanks for the quick reply!

Ah that makes sense, I should have suspected BeyondTrust to be the culprit here. I can confirm with bForcedRetry enabled the program compiles successfully.

[Attachment Removed]