【发布时间】:2021-09-16 09:07:48
【问题描述】:
我正在尝试建立一个基于 Windows Server 的持续集成服务器来完全构建和打包一个 Unreal Engine 4 项目。绝大多数过程都有效,但在内容烹饪阶段,我不断遇到以下错误:
********** COOK COMMAND STARTED **********
Running UE4Editor Cook for project C:\workspace\CEIT_ingame-native-plugins_PR-44\sampleProjects\unreal\ShooterGame26\ShooterGame.uproject
Commandlet log file is C:\Unreal426\Windows\Engine\Programs\AutomationTool\Saved\Cook-2021.07.05-13.56.23.txt
Running: C:\Unreal426\Windows\Engine\Binaries\Win64\UE4Editor-Cmd.exe C:\workspace\CEIT_ingame-native-plugins_PR-44\sampleProjects\unreal\ShooterGame26\ShooterGame.uproject -run=Cook -TargetPlatform=WindowsClient -fileopenlog -ddc=DerivedDataBackendGraph -unversioned -abslog=C:\Unreal426\Windows\Engine\Programs\AutomationTool\Saved\Cook-2021.07.05-13.56.23.txt -stdout -CrashForUAT -unattended -NoLogTimes -UTF8Output
LogInit: Display: Running engine for game: ShooterGame
LogModuleManager: Warning: ModuleManager: Unable to load module 'C:/Unreal426/Windows/Engine/Binaries/Win64/UE4Editor-OpenGLDrv.dll' because the file couldn't be loaded by the OS.
LogModuleManager: Warning: ModuleManager: Unable to load module 'C:/Unreal426/Windows/Engine/Plugins/Lumin/MagicLeap/Binaries/Win64/UE4Editor-MagicLeap.dll' because the file couldn't be loaded by the OS.
Took 14.257796s to run UE4Editor-Cmd.exe, ExitCode=1
ERROR: Cook failed.
(see C:\Users\jenkins\AppData\Roaming\Unreal Engine\AutomationTool\Logs\C+Unreal426+Windows\Log.txt for full exception trace)
AutomationTool exiting with ExitCode=25 (Error_UnknownCookFailure)
BUILD FAILED
具体来说,UE4Editor-OpenGLDrv.dll 和 UE4Editor-MagicLeap.dll 无法加载,但没有任何明确的指示说明为什么会这样,只是“操作系统无法加载文件”。写入磁盘的日志文件并没有告诉我比上面的信息更多的信息。我已经验证了两个 DLL 确实存在于 CI 服务器上,因此我怀疑缺少其他一些子依赖项。
我尝试在 Unreal 可执行文件和日志中提到的 DLL 上运行 Dependencies,以找出服务器机器本身可能缺少哪些 DLL,但这需要三个多小时才能完成,因此反复做有点尴尬和费时。我已经遵循了来自this page 的关于缺少依赖项的建议,并检查了依赖实用程序报告为未找到的所有可能的 DLL(主要是 DirectX/OpenGL 相关的),但构建仍然失败,我我的想法不多了。
在 Windows 中是否有任何简单的方法可以准确找出 DLL 无法加载的原因?我似乎记得 Windows DLL 加载错误消息远不如 Linux 上的信息丰富,但也许有一个我不熟悉的工具或更简单的方法来解决它。
编辑:我已经缩小了一些范围 - 如果我尝试在我自己的程序中完全动态加载 glu32.dll,我会收到加载错误 Could not load C:\Windows\System32\glu32.dll: The specified procedure could not be found. 因为这是加载尝试,而不是尝试查找一个函数,这意味着在 glu32.dll 的子依赖项上缺少某些过程,但我不知道如何确定它是哪个。
【问题讨论】:
-
根据源代码,您可以使用 -dllerrors 运行命令行,这将打开一个显示错误的窗口。请参阅 FWindowsPlatformProcess::GetDllHandle。
-
啊,这听起来不错。我去看看。
-
不幸的是,-dllerrors 似乎对构建程序的输出没有影响。
-
会不会是 32bit - 64bit 不匹配?输出根本不清楚。它应该包含底层 Win 错误(代码)。
-
我得到的唯一退出代码是
1,尽管在我将一些 DLL 添加到桌面计算机上的 CI 服务器之前,它曾经是FFFFFFFFC0000135。我已确保已将 32 位和 64 位 DLL 复制到服务器。
标签: windows dll unreal-engine4