Description

CriticalErrors in FWindowsErrorOutputDevice::Serialize (and other platforms) run some code after the error is detected rather than immediately terminating the process. Some of this other code is specific and important, such as flushing logs, crashreporting, and restoring hardware settings. But it also calls FPlatformMisc::RequestExit, which then runs a lot of shutdown code.

Assertions during this shutdown code continue to be reported, and can confuse developers reviewing the log of a crash.

Add code to prevent those followup assertions in the most robust way possible.

Example log:

LogSourceControl: Attempting 'p4 fstat -Or <filename.uasset>'
LogWindows: Error: appError called: Assertion failed: Pipeline->MaxLocalRootSignatureSize <= SBT->GetInitializer().LocalBindingDataSize [File:Engine\Source\Runtime\D3D12RHI\Private\D3D12RayTracing.cpp] [Line: 5058] 


LogWindows: Windows GetLastError: The operation completed successfully. (0)
LogRHI: Error: Breadcrumbs 'RHIThread'
 - Scene
 - FRDGBuilder::Execute
 - Frame 32043

LogAudioMixer: Warning: AudioMixerPlatformInterface Timeout [21 Seconds] waiting for h/w. InstanceID=1
LogThreadingWindows: Error: Runnable thread RHIThread crashed.
LogWindows: Error: Error reentered: Assertion failed: Pool != FPoolRoot::Instance() [File:Engine\Source\Runtime\Core\Private\External\Memory\MemoryPoolImpl.cpp] [Line: 759] 
Don't allocate against FPoolRoot!

LogWindows: Error: HandleError re-entered.
LogWindows: FPlatformMisc::RequestExit(1, WindowsErrorOutputDevice::Serialize.!GIsGuarded)
LogWindows: FPlatformMisc::RequestExitWithStatus(1, 3, WindowsErrorOutputDevice::Serialize.!GIsGuarded)
LogCore: Engine exit requested (reason: Win RequestExit)
LogWindows: Error: Error reentered: Assertion failed: Pool != FPoolRoot::Instance() [File:Engine\Source\Runtime\Core\Private\External\Memory\MemoryPoolImpl.cpp] [Line: 759] 
Don't allocate against FPoolRoot!

... <message repeats forever until process is terminated>

Steps to Reproduce

Not yet known; reporter is working on creating a repro case.

Have Comments or More Details?

There's no existing public thread on this issue, so head over to Questions & Answers just mention UE-221417 in the post.

0
Login to Vote

Backlogged
CreatedAug 8, 2024
UpdatedAug 19, 2024
View Jira Issue