# Unreal Engine Crashing on macOS When Applying Fullscreen to a Monitor

**URL:** <https://forums.unrealengine.com/t/unreal-engine-crashing-on-macos-when-applying-fullscreen-to-a-monitor/2051234>\
**Category:** C++\
**Tags:** unreal-engine, crash, CPP, question\
**Created:** [October 3, 2024, 11:41am UTC](https://forums.unrealengine.com/t/unreal-engine-crashing-on-macos-when-applying-fullscreen-to-a-monitor/2051234 "2024-10-03T11:41:44Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![AAKASHBASHYAL](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@AAKASHBASHYAL](https://forums.unrealengine.com/u/AAKASHBASHYAL)\
**Post date:** [October 3, 2024, 11:41am UTC](https://forums.unrealengine.com/t/unreal-engine-crashing-on-macos-when-applying-fullscreen-to-a-monitor/2051234/1 "2024-10-03T11:41:44Z")

</div>

I’m working on an Unreal Engine project, and I’m encountering an issue where my application crashes or becomes unresponsive on macOS when applying fullscreen to a specific monitor.

I have a function, ApplyFullscreenToMonitor(), that applies fullscreen mode to a selected monitor. It first retrieves the display metrics and then tries to move and resize the window based on the monitor’s resolution and position. The function works fine on Windows, but on macOS, the app freezes or becomes unresponsive.

Here’s the code:

```auto
void UEtrResolutionSetting::ApplyFullscreenToMonitor()
{
    // Get game user settings
    UGameUserSettings* GameUserSettings = GEngine->GetGameUserSettings();
    if (GameUserSettings)
    {
        FDisplayMetrics displayMetrics;
        FSlateApplication::Get().GetDisplayMetrics(displayMetrics);
        const int32 num = displayMetrics.MonitorInfo.Num();

        int32 chosenIndex = -1;
        int32 primaryIndex = 0;

        for (int32 i = 0; i < num; i++)
        {
            FMonitorInfo& info = displayMetrics.MonitorInfo[i];
            if (info.Name == SelectedMonitor.Name)
            {
                chosenIndex = i;
                break;
            }
            if (info.bIsPrimary) { primaryIndex = i; }
        }

        int32 finalIndex = (chosenIndex < 0) ? primaryIndex : chosenIndex;
        if (chosenIndex < 0 && !SelectedMonitor.Name.IsEmpty())
        {
            // NOTE: Log something here
        }

        const FMonitorInfo& info = displayMetrics.MonitorInfo[finalIndex];
        const FIntPoint resolution = GameUserSettings->GetScreenResolution();

        if (resolution.X > info.NativeWidth || resolution.Y > info.NativeHeight)
        {
            GameUserSettings->SetScreenResolution({ info.NativeWidth, info.NativeHeight });
        }
        GameUserSettings->SetWindowPosition(info.WorkArea.Left, info.WorkArea.Top);

        if (GEngine && GEngine->GameViewport && GEngine->GameViewport->GetWindow())
        {
            TSharedPtr<SWindow> window = GEngine->GameViewport->GetWindow();
            EWindowMode::Type const WindowMode = GEngine->GetGameUserSettings()->GetFullscreenMode();

            window->MoveWindowTo(GameUserSettings->GetWindowPosition());
            window->Resize(GameUserSettings->GetScreenResolution());
            window->SetWindowMode(WindowMode);

            GameUserSettings->SetFullscreenMode(WindowMode);
            GameUserSettings->ApplyResolutionSettings(false);
        }
        else
        {
            mDelegateHandleViewportCreated = UGameViewportClient::OnViewportCreated().AddUObject(
                this, &UEtrResolutionSetting::ApplyFullscreenToMonitor);
        }
        if (mDelegateHandleViewportCreated.IsValid())
        {
            UGameViewportClient::OnViewportCreated().Remove(mDelegateHandleViewportCreated);
            mDelegateHandleViewportCreated.Reset();
        }
    }
}

```

---

<div class="post-metadata">

**Author:** ![FrostyJas](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/frostyjas/32/1194640_2.png) [@FrostyJas](https://forums.unrealengine.com/u/FrostyJas)\
**Post date:** [October 7, 2024, 2:59am UTC](https://forums.unrealengine.com/t/unreal-engine-crashing-on-macos-when-applying-fullscreen-to-a-monitor/2051234/2 "2024-10-07T02:59:24Z")

</div>

Greetings @AAKASHBASHYAL

I’d be happy to take a look into this issue. Do you have a crash log I can take a peek at? Thanks!

---

<div class="post-metadata">

**Author:** ![AAKASHBASHYAL](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@AAKASHBASHYAL](https://forums.unrealengine.com/u/AAKASHBASHYAL)\
**Post date:** [October 7, 2024, 6:16am UTC](https://forums.unrealengine.com/t/unreal-engine-crashing-on-macos-when-applying-fullscreen-to-a-monitor/2051234/3 "2024-10-07T06:16:11Z")

</div>

I did tried to search for the crash log, but couldn’t find it on my mac. Can you guide me where could i find them?

---

<div class="post-metadata">

**Author:** ![FrostyJas](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/frostyjas/32/1194640_2.png) [@FrostyJas](https://forums.unrealengine.com/u/FrostyJas)\
**Post date:** [October 9, 2024, 10:23am UTC](https://forums.unrealengine.com/t/unreal-engine-crashing-on-macos-when-applying-fullscreen-to-a-monitor/2051234/4 "2024-10-09T10:23:01Z")

</div>

Take a peek here [[question] Where are logs generated on Mac? [UE4-27]](https://forums.unrealengine.com/t/question-where-are-logs-generated-on-mac-ue4-27/561381). They’re usually located in one of the locations they’re mentioning in that post.

---

<div class="post-metadata">

**Author:** ![AAKASHBASHYAL](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@AAKASHBASHYAL](https://forums.unrealengine.com/u/AAKASHBASHYAL)\
**Post date:** [October 9, 2024, 3:37pm UTC](https://forums.unrealengine.com/t/unreal-engine-crashing-on-macos-when-applying-fullscreen-to-a-monitor/2051234/5 "2024-10-09T15:37:42Z")

</div>

I thank you for replying, It seems like when i made the development build and try it, the app doesn’t get crash, and it crash or say it get not responsive only on shipping build. And on shipping build i don’t get logs.

Seems this is the issues here.

> [@Mac UE5: Window resize in shipping build freezes game](https://forums.unrealengine.com/t/mac-ue5-window-resize-in-shipping-build-freezes-game/1617629):
>
> Hi, I am currently porting my UE 4.27 game to UE 5.2. I have most issues worked out, but I stumbled on something new when building a shipping version for Mac: when the game window is resized, when switching from fullscreen to windowed, or when the resolution is changed, the game freezes. The freeze can last for several seconds or even longer, effectively crashing the game. Trying to isolate the problem, I have determined: The problem only occurs on Mac It only happens in Shipping builds, pack…

Because I am also using version 5.2.1.

---

<div class="post-metadata">

**Author:** ![FrostyJas](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/frostyjas/32/1194640_2.png) [@FrostyJas](https://forums.unrealengine.com/u/FrostyJas)\
**Post date:** [October 11, 2024, 5:03am UTC](https://forums.unrealengine.com/t/unreal-engine-crashing-on-macos-when-applying-fullscreen-to-a-monitor/2051234/6 "2024-10-11T05:03:00Z")

</div>

Does this happen only on the 5.2 build or is it occurring on other versions as well?

---

<div class="post-metadata">

**Author:** ![Zxgnj](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Zxgnj](https://forums.unrealengine.com/u/Zxgnj)\
**Post date:** [January 25, 2025, 6:29am UTC](https://forums.unrealengine.com/t/unreal-engine-crashing-on-macos-when-applying-fullscreen-to-a-monitor/2051234/7 "2025-01-25T06:29:07Z")

</div>

From:

> [@Mac UE5: Window resize in shipping build freezes game](https://forums.unrealengine.com/t/mac-ue5-window-resize-in-shipping-build-freezes-game/1617629):
>
> Hi, I am currently porting my UE 4.27 game to UE 5.2. I have most issues worked out, but I stumbled on something new when building a shipping version for Mac: when the game window is resized, when switching from fullscreen to windowed, or when the resolution is changed, the game freezes. The freeze can last for several seconds or even longer, effectively crashing the game. Trying to isolate the problem, I have determined: The problem only occurs on Mac It only happens in Shipping builds, pack…

K so good news: I found a solution for this using UE5.3.2, however it requires building it from source. The solution to this bug looks like you would have to apply the bug solution ([this git commit](https://github.com/EpicGames/UnrealEngine/commit/a0d2597db31cc9a996be2907564cb4aee3a31962)) to UE5.3.2’s source code by cloning and building it from GitHub and changing the code in the MetalViewport.cpp file as indicated through the changes in these two photos below (\*Note: The line numbers shown here aren’t one-to-one, so just try to compare the code to locate where to make these changes):

 ![Capture d’écran 2025-01-24 à 21.53.47](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/f/28f394c78507416783bb23e0f6644edf51c2a34d.png)  
 ![Capture d’écran 2025-01-23 à 23.27.02](https://d3kjluh73b9h9o.cloudfront.net/original/4X/6/2/c/62c8afc1c594c3005dddde2481c87e7808dbc654.png)

That said, this fix may be unattainable as I write this (Jan 2025), due to the awkwardness with building UE5 from source with Xcode 16.2, but hopefully this helps anyways.

Another solution would be to upgrade to UE5.5 through the Epic Games installer, however all things considered it seems that UE5.3.2 is the most stable release (for my project at least).

**So TL;DR** : unless we get a patch from Epic Games to UE5.3.2 that directly resolves this bug (i.e. UE5.3.3[?]), it looks like modifying UE5 from the source code is the best solution.

Hope this helps 😅

---

<div class="post-metadata">

**Author:** ![ShadowBr0kerz](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/shadowbr0kerz/32/1201558_2.png) [@ShadowBr0kerz](https://forums.unrealengine.com/u/ShadowBr0kerz)\
**Post date:** [September 6, 2026, 6:17am UTC](https://forums.unrealengine.com/t/unreal-engine-crashing-on-macos-when-applying-fullscreen-to-a-monitor/2051234/8 "2026-09-06T06:17:01Z")

</div>

that macOS freeze in ApplyFullscreenToMonitor is separate from Windows — on macOS windowing/metal fullscreen path is different so moving/resizing there can deadlock if you do it on wrong thread. your snippet using GetDisplayMetrics + GameUserSettings works on Windows because it resolves MonitorInfo there.

note the BP plugin i share here is Win64-only (Windows path), so it wont solve the mac crash — you’d need the macOS native window path. for Windows the equivalent is SetGameWindowFullscreenOnMonitor which handles the FindMonitor + move for you. [Multi-Monitor Display Controller | Fab](https://www.fab.com/listings/8cc2b168-3642-4e24-9aa8-750c0bc49771) if you want the BP side for your Windows build.
