I’ve built UE4 from source to get access to a more redeable stack trace (I’m testing on the last 4.8 Promoted branch). It’s failing on this assert:
void FOpenGLDynamicRHI::RHIClearMRT(bool bClearColor,int32 NumClearColors,const FLinearColor* ClearColorArray,bool bClearDepth,float Depth,bool bClearStencil,uint32 Stencil, FIntRect ExcludeRect)
{
VERIFY_GL_SCOPE();
HERE----> check((GMaxRHIFeatureLevel >= ERHIFeatureLevel::SM5) || !PendingState.bFramebufferSetupInvalid); <------
if (bClearColor)
{
// This is copied from DirectX11 code - apparently there's a silent assumption that there can be no valid render target set at index higher than an invalid one.
int32 NumActiveRenderTargets = 0;
for (int32 TargetIndex = 0; TargetIndex < MaxSimultaneousRenderTargets; TargetIndex++)
{
if (PendingState.RenderTargets[TargetIndex] != 0)
{
NumActiveRenderTargets++;
}
else
{
break;
}
}
// Must specify enough clear colors for all active RTs
check(NumClearColors >= NumActiveRenderTargets);
}
This is the stack trace on Xcode (Mac build):
#5 0x0000000100889a10 in FDebug::AssertFailed(char const*, char const*, int, wchar_t const*, …) at /Users/…/UnrealEnginePromoted/Engine/Source/Runtime/Core/Private/Misc/OutputDevice.cpp:360
#6 0x0000000137c7e223 in FOpenGLDynamicRHI::RHIClearMRT(bool, int, FLinearColor const*, bool, float, bool, unsigned int, FIntRect) at /Users/…/UnrealEnginePromoted/Engine/Source/Runtime/OpenGLDrv/Private/OpenGLCommands.cpp:3194
#7 0x0000000137c7dfa9 in FOpenGLDynamicRHI::RHIClear(bool, FLinearColor const&, bool, float, bool, unsigned int, FIntRect) at /Users/…/UnrealEnginePromoted/Engine/Source/Runtime/OpenGLDrv/Private/OpenGLCommands.cpp:3087
#8 0x0000000137c7ef26 in non-virtual thunk to FOpenGLDynamicRHI::RHIClear(bool, FLinearColor const&, bool, float, bool, unsigned int, FIntRect) at /Users/…/UnrealEnginePromoted/Engine/Source/Runtime/OpenGLDrv/Private/OpenGLCommands.cpp:3088
#9 0x0000000104e89b69 in FRHICommandList::Clear(bool, FLinearColor const&, bool, float, bool, unsigned int, FIntRect) at /Users/…/UnrealEnginePromoted/Engine/Source/Runtime/RHI/Public/RHICommandList.h:1758
#10 0x0000000104ff968c in FViewport::GetRawHitProxyData(FIntRect)::EURCMacro_BeginDrawingCommandHitProxy:: DoTask(ENamedThreads::Type, TRefCountPtr<FGraphEvent> const&) at /Users/…/UnrealEnginePromoted/Engine/Source/Runtime/Engine/Private/UnrealClient.cpp:1083
#11 0x00000001051d2837 in TGraphTask<FViewport::GetRawHitProxyData(FIntRect)::EURCMacro_BeginDrawingCommandHitProxy>::ExecuteTask(TArray<FBaseGraphTask*, FDefaultAllocator>&, ENamedThreads::Type) at /Users/…/UnrealEnginePromoted/Engine/Source/Runtime/Core/Public/Async/TaskGraphInterfaces.h:733
#12 0x000000010040ae80 in FBaseGraphTask::Execute(TArray<FBaseGraphTask*, FDefaultAllocator>&, ENamedThreads::Type) at /Users/…/UnrealEnginePromoted/Engine/Source/Runtime/Core/Public/Async/TaskGraphInterfaces.h:308
#13 0x00000001004010b9 in FTaskThread::ProcessTasks(int, bool) at /Users/…/UnrealEnginePromoted/Engine/Source/Runtime/Core/Private/Async/TaskGraph.cpp:428
#14 0x00000001003fabe9 in FTaskThread::ProcessTasksUntilQuit(int) at /Users/…/UnrealEnginePromoted/Engine/Source/Runtime/Core/Private/Async/TaskGraph.cpp:271
#15 0x00000001003eba7d in FTaskGraphImplementation::ProcessThreadUntilRequestReturn(ENamedThreads::Type) at /Users/…/UnrealEnginePromoted/Engine/Source/Runtime/Core/Private/Async/TaskGraph.cpp:946
#16 0x000000010c2cdc4f in RenderingThreadMain(FEvent*) at /Users/…/UnrealEnginePromoted/Engine/Source/Runtime/RenderCore/Private/RenderingThread.cpp:278
#17 0x000000010c3b134d in FRenderingThread::Run() at /Users/…/UnrealEnginePromoted/Engine/Source/Runtime/RenderCore/Private/RenderingThread.cpp:399
#18 0x00000001004164ea in FRunnableThreadPThread::Run() at /Users/…/UnrealEnginePromoted/Engine/Source/Runtime/Core/Private/HAL/PThreadRunnableThread.cpp:25
#19 0x00000001003d6c99 in FRunnableThreadPThread::_ThreadProc(void*) at /Users/…/UnrealEnginePromoted/Engine/Source/Runtime/Core/Private/GenericPlatform/…/HAL/PThreadRunnableThread.h:167