question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

error CS0042: Unexpected error creating debug information file 'c:\UnrealEngine\Engine\Intermediate\Build\BuildRules\UE4Rules.PDB'

See original GitHub issue

Output of the ue4-docker info command:

ue4-docker version:         0.0.81 (latest available version is 0.0.81)
Operating system:           Windows 10 Pro Version 2009 (OS Build 19041.867)
Docker daemon version:      20.10.5
NVIDIA Docker supported:    No
Maximum image size:         500GB
Available disk space:       732.21 GiB
Total system memory:        31.92 GiB physical, 36.67 GiB virtual
Number of processors:       8 physical, 8 logical

Additional details:

  • Are you accessing the network through a proxy server? No

~I am actually running a modified version of ue4-docker (see #144) but I think this issue is not related to my changes.~ This is ruled out, stock ue4-docker 0.0.81 produces exactly the same behavior.

There is an independent report about the same issue with 4.25.3: https://github.com/adamrehn/ue4-docker/issues/99#issuecomment-716697043 by @Agendum.

Way to reproduce

  1. Windows
  2. ue4-docker build 4.26.1 --no-engine --exclude ddc --exclude templates --exclude debug
  3. ue4-docker test 4.26.1

Expected

ue4-docker test passes

Actual

>ue4-docker test 4.26.1
[ue4-docker test] Starting a container using the "adamrehn/ue4-full:4.26.1" image...
[ue4-docker test] Running test "build-and-package.py"...
[RUN COMMAND] ['git', 'clone', '--depth=1', 'https://gitlab.com/ue4-test-projects/4.26/BasicCxx.git', 'C:\\Users\\ContainerAdministrator\\AppData\\Local\\Temp\\tmpo2dkttwc\\BasicCxx'] {}
Cloning into 'C:\Users\ContainerAdministrator\AppData\Local\Temp\tmpo2dkttwc\BasicCxx'...
[RUN COMMAND] ['ue4', 'package', 'Shipping'] {'cwd': 'C:\\Users\\ContainerAdministrator\\AppData\\Local\\Temp\\tmpo2dkttwc\\BasicCxx'}
Running AutomationTool...
Parsing command line: BuildCookRun -utf8output -clientconfig=Shipping -serverconfig=Shipping -project=C:\Users\ContainerAdministrator\AppData\Local\Temp\tmpo2dkttwc\BasicCxx\BasicCxx.uproject -noP4 -cook -build -stage -prereqs -pak -archive -platform=Win64 -nodebuginfo -allmaps -archivedirectory=C:\Users\ContainerAdministrator\AppData\Local\Temp\tmpo2dkttwc\BasicCxx\dist
Setting up ProjectParams for C:\Users\ContainerAdministrator\AppData\Local\Temp\tmpo2dkttwc\BasicCxx\BasicCxx.uproject
********** BUILD COMMAND STARTED **********
Running: C:\UnrealEngine\Engine\Binaries\DotNET\UnrealBuildTool.exe BasicCxxEditor Win64 Development -Project=C:\Users\ContainerAdministrator\AppData\Local\Temp\tmpo2dkttwc\BasicCxx\BasicCxx.uproject  C:\Users\ContainerAdministrator\AppData\Local\Temp\tmpo2dkttwc\BasicCxx\BasicCxx.uproject -NoUBTMakefiles  -Manifest=C:\Users\ContainerAdministrator\AppData\Local\Temp\tmpo2dkttwc\BasicCxx\Intermediate\Build\Manifest.xml -NoHotReload -log="C:\Users\ContainerAdministrator\AppData\Roaming\Unreal Engine\AutomationTool\Logs\C+UnrealEngine\UBT-BasicCxxEditor-Win64-Development.txt"
  Using 'git status' to determine working set for adaptive non-unity build (C:\Users\ContainerAdministrator\AppData\Local\temp\tmpo2dkttwc\BasicCxx).
  While compiling C:\UnrealEngine\Engine\Intermediate\Build\BuildRules\UE4Rules.dll:
  error CS0042: Unexpected error creating debug information file 'c:\UnrealEngine\Engine\Intermediate\Build\BuildRules\UE4Rules.PDB' -- 'Unspecified error '
  ERROR: Unable to compile source files.
Took 14.0685549s to run UnrealBuildTool.exe, ExitCode=6
UnrealBuildTool failed. See log for more details. (C:\Users\ContainerAdministrator\AppData\Roaming\Unreal Engine\AutomationTool\Logs\C+UnrealEngine\UBT-BasicCxxEditor-Win64-Development.txt)
AutomationTool exiting with ExitCode=6 (6)
BUILD FAILED
Using user-specified engine root: C:\UnrealEngine
Traceback (most recent call last):
  File "c:\python37\lib\runpy.py", line 193, in _run_module_as_main
    "__main__", mod_spec)
  File "c:\python37\lib\runpy.py", line 85, in _run_code
    exec(code, run_globals)
  File "C:\Python37\Scripts\ue4.exe\__main__.py", line 9, in <module>
  File "c:\python37\lib\site-packages\ue4cli\cli.py", line 222, in main
    SUPPORTED_COMMANDS[command]['action'](manager, args)
  File "c:\python37\lib\site-packages\ue4cli\cli.py", line 94, in <lambda>
    'action': lambda m, args: m.packageDescriptor(os.getcwd(), args),
  File "c:\python37\lib\site-packages\ue4cli\UnrealManagerBase.py", line 454, in packageDescriptor
    self.packageProject(dir, args[0] if len(args) > 0 else 'Shipping', args[1:])
  File "c:\python37\lib\site-packages\ue4cli\UnrealManagerBase.py", line 429, in packageProject
    ] + extraArgs)
  File "c:\python37\lib\site-packages\ue4cli\UnrealManagerBase.py", line 371, in runUAT
    Utility.run([self.getRunUATScript()] + args, cwd=self.getEngineRoot(), raiseOnError=True)
  File "c:\python37\lib\site-packages\ue4cli\Utility.py", line 145, in run
    raise Exception('child process ' + str(command) + ' failed with exit code ' + str(returncode))
Exception: child process ['C:\\UnrealEngine\\Engine\\Build\\BatchFiles\\RunUAT.bat', 'BuildCookRun', '-utf8output', '-clientconfig=Shipping', '-serverconfig=Shipping', '-project=C:\\Users\\ContainerAdministrator\\AppData\\Local\\Temp\\tmpo2dkttwc\\BasicCxx\\BasicCxx.uproject', '-noP4', '-cook', '-build', '-stage', '-prereqs', '-pak', '-archive', '-platform=Win64', '-nodebuginfo', '-allmaps', '-archivedirectory=C:\\Users\\ContainerAdministrator\\AppData\\Local\\Temp\\tmpo2dkttwc\\BasicCxx\\dist'] failed with exit code 6
Using user-specified engine root: C:\UnrealEngine
Traceback (most recent call last):
  File "C:\workspace\build-and-package.py", line 22, in <module>
    run(['ue4', 'package', 'Shipping'], cwd=projectDir)
  File "C:\workspace\build-and-package.py", line 8, in run
    return subprocess.run(command, check=True, **kwargs)
  File "C:\Python37\lib\subprocess.py", line 512, in run
    output=stdout, stderr=stderr)
subprocess.CalledProcessError: Command '['ue4', 'package', 'Shipping']' returned non-zero exit status 1.

I’m currently rerunning vanilla ue4-docker without my changes, but highly suspect that I will hit exactly the same error.

Additional thoughts

This might be caused by --exclude debug. Has anyone successfully passed ue4-docker test using an engine build with --exclude debug? Omiting --exclude debug is not an option for 4.26.1 because you’ll hit #99. If this assumption is true, it would mean that --exclude debug is unusable and needs fixes.

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Comments:15 (1 by maintainers)

github_iconTop GitHub Comments

1reaction
slonopotamuscommented, Apr 1, 2021

So… I am observing exactly the same behavior using stock ue4-docker 0.0.81.

It means that my changes in #144 are actually unrelated.

It also means that ue4-docker cannot currently produce a working 4.26 engine on Windows. Or I don’t know a way how to achieve it.

0reactions
adamrehncommented, May 18, 2021

I can’t remember which PDB files caused errors when they were removed (i.e. whether they were C++ or C# debug symbols), but I do know that when I attempted to build or package projects in a container image that didn’t have them, UnrealBuildTool complained about them being missing despite being listed in a manifest file somewhere.

In any case, the truncation hack was always fundamentally a workaround for the fact that I couldn’t figure out how PDB files are excluded from Installed Builds distributed through the Epic Games Launcher. If removing the PDB files listed in the Engine’s top-level .target files matches the results in a Launcher distribution then that would be my preferred approach, since the ideal goal is to produce results that match a Launcher build as closely as possible by default.

Read more comments on GitHub >

github_iconTop Results From Across the Web

CS0042: Unexpected error creating debug information file
PDB file. I can manually resolve this issue by setting the DLL project to the "StartUp" project, setting the app project back to...
Read more >
Unexpected Error creating debug information file GG.PDB"--"
When I try to build my project, it returns the following error: Error 1 Unexpected error creating debug information ...
Read more >
CS0042: Unexpected error creating debug information file
pdb: The process cannot access the file because it is being used by another process. Above compilation error seems to occur whenever I...
Read more >
TFS: cannot build the app, CS0042: Unexpected error creating ...
I am trying to deploy my MVC app, but in the TFS build I get this error message;. CSC : fatal error CS0042:...
Read more >
Compile error? CS0042 - C++ - Unreal Engine Forums
When I go to hit compile the error log shows this: ... Source control may have been denying access to the pdb file....
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found