【发布时间】:2020-08-20 19:13:39
【问题描述】:
在构建新源并运行 UE_4.11.0 的新安装后,它会加载 100%,并且新项目会 100% 创建,但是在将项目加载到 99% 时它会因错误而崩溃。
日志:断言失败:!bSrcDepthWrite || bDstDepthWrite [D:\UE4.11.0\Engine\Source\Runtime\Windows\D3D11RHI\Private\D3D11Commands.cpp [行:715]
D3D11Commands.cpp源代码
void FD3D11DynamicRHI::ValidateExclusiveDepthStencilAccess(FExclusiveDepthStencil RequestedAccess) const
{
const bool bSrcDepthWrite = RequestedAccess.IsDepthWrite();
const bool bSrcStencilWrite = RequestedAccess.IsStencilWrite();
if (bSrcDepthWrite || bSrcStencilWrite)
{
// New Rule: You have to call SetRenderTarget[s]() before
ensure(CurrentDepthTexture);
const bool bDstDepthWrite = CurrentDSVAccessType.IsDepthWrite();
const bool bDstStencilWrite = CurrentDSVAccessType.IsStencilWrite();
// requested access is not possible, fix SetRenderTarget EExclusiveDepthStencil or request a different one
check(!bSrcDepthWrite || bDstDepthWrite); // Line: 715
check(!bSrcStencilWrite || bDstStencilWrite);
}
}
【问题讨论】:
-
不相关:UE 4.25.3 已经发布,你为什么还在使用旧版本? answers.unrealengine.com: Assertion failed: !bSrcDepthWrite || bDstDepthWrite UE 4.11中的类似问题
-
@JeJo 我在笔记本电脑 Corei3 中使用,它永远不会支持 UE 4.25.3。
-
@JeJo 我正在尝试使用最新版本,如果不支持,那么我会降级。 v4.11 给了我一个绿色信号:P
-
@Arnold-Baba 它因错误而崩溃——我知道这听起来可能很挑剔,但断言不是崩溃。由于程序知道的违规行为,程序会生成一个断言。这与崩溃不同,崩溃时程序无缘无故停止。
-
我的意思是崩溃和断言是有区别的。由于违反了某些条件,程序生成了一个断言,并且程序明确地检查了这个条件。如果不满足条件,则程序停止。这与崩溃不同,在崩溃中,由于任何原因(程序或程序员不知道,直到程序被调试),程序只是简单地停止运行。显然问题是
check(!bSrcDepthWrite || bDstDepthWrite);,程序正在检查这个条件,但它没有得到满足。
标签: c++ unreal-engine4