See the UDN question (duplicated below). I think we need to better manage the lifetime of the event we use for synchronization here.
We are experiencing an issue where when FPlatformMisc::RequestExit or any other function that exits the app is called, render thread waits indefinitely for FrameReadyEvent in FMetalDeviceContext::EndDrawingViewport. FrameReadyEvent is not fired because since FPlatformMisc::RequestExit has been called, IsEngineExitRequested() returns true and FIOSFramePacer::signal function (IOSPlatformFramePacer.cpp) returns prematurely before reaching the event firing logic (at line 118).
Simply changing ListeningEvents to always fire solves the issue for now (like in the following snippet) but what would be the proper way to handle it?
// during shutdown, this can cause crashes (only non-backgrounding apps do this) if (IsEngineExitRequested()) { for( auto& NextEvent : ListeningEvents ) { NextEvent->Trigger(); } return; };
There's no existing public thread on this issue, so head over to Questions & Answers just mention UE-159215 in the post.
2 |
Component | UE - Platform - Apple |
---|---|
Affects Versions | 4.27 |
Target Fix | 5.6 |
Created | Jul 12, 2022 |
---|---|
Updated | Oct 25, 2024 |