macOS - Unreal Engine 4.13 - 4.16 hangs every few clicks.
Unreal Editor keeps hanging all over the place on my 15" Late 2013 Macbook Pro. This is happening in every version after 4.12.
I have tried fresh installing macOS, running the editor alone without other software installed without success. I have installed various Cuda drivers. Still no luck. I have tried to install previous versions of UE with previous versions of OSX. No success, since from 4.13 and onward I am struggling with unstable Unreal Engine versions, that just used to crash. This is something entirely new.
The editor keeps hanging at random intervals, even when doing simple tasks like adding a node to a blueprint, saving or switching folders in the content browser. It doesn't seem to be affected by the size of the project. I can't seem to recreate the problem or pinpoint what causes it. You can work fine for a whole day and the next day it hangs after 4-5 clicks, no matter what you do. I tried doing one thing in the editor (only placing meshes or only creating materials), it doesn't care, it just hangs when it feels like it. I tried reducing the resolution, disabling real time everywhere, from thumbnails to the material editor. I tried working with an empty vault, with projects without starting content. I tried running the editor without any USB device attached. I literally have tried almost everything but I can't get a UE to work, stable, as in 1-2 crashes per day. Crashes not hangs.
This problem started appearing a few versions back but now it happens so often it renders the Unreal Engine useless. As an IT pro troubleshooting things is what I do for a living, but this makes no sense at all.
No other software has issues on my MBP. None. Also all the hardware diagnostics check out nothing is wrong with my laptop.
Please help, I'm halfway through my project and I can't work with the editor anymore.
All the settings you have suggested are the actions I usually take when faced with a situation and they didn't influence the problem, but I think we are getting somewhere. For the first time I have been able to recreate the problem and cause the Editor to hang at will.
I opened the Unreal Marketplace asset PUPI as a project in the Editor for the first time.
As expected it had to compile the shaders and as expected (for that particular project) it displayed the Message Log window on start up. This is where things get interesting.
If I close the Message Log Window a few seconds after the project loads, the Editor hangs and the Activity Monitor looks like in the image below. If I leave the Editor alone, without closing the Message Log, the Activity Monitor still displays the same load but the Editor does not become unresponsive and compiles the shaders without a problem.
If I click on any other area on the Editor it does not hang, switching windows, dragging the Message Log window to the secondary monitor and back, clicking inside the viewport, adding an actor to the Level, it does not hang. If I close the Message Log Window the Editor hangs.
Now the above Activity Monitor readings are nothing unusual since I oftentimes work like in the pictures below and I never had a performance issue:
This is just my workflow when creating 3D assets for my projects but most of the time Unreal runs "alone" plus 1-2 apps. With the above "heavy" load, the Editor compiles shades, builds lights and pretty much used to work without a problem (with the occasional crashes but it never, ever hanged).
Further testing has showed that if I wait approximately 1 minute and 30 seconds, and then close the Message Log window the Editor works fine.
I have tried the above theory with various projects (blank, complex, older versions). Those that pop up an extra window (usually the Message Log) need a period of 1 minute and 30 seconds (± a few seconds) before I can close that window, else the Editor becomes unresponsive. I can interact with the editor from the get go as long as I don't close the extra window. If no extra window pops up when I load a project, I can begin work immediately.
Now this is a totally different behavior than 4.15.0 and the issues described in the OP. It seems that the problem I faced in the OP is gone with 4.15.1 and only this latest weird glitch remains. Let me know how I should proceed.
It seems like the Editor performs a bad call to Sierra during start that the OS or the Editor removes/kills after around 1 minute and 30 seconds.
After an exhaustive day looking at everything inside the box for macOSX/CoreFoundation support, and a bunch of different fixes, the simplest seems to be the top (one I'll send a PR in for).
Because closing windows is already deferred, there seems to be a race condition between two threads when a window is closed. To counter this we simply say when its time to run the close call it isn't put off any longer (already is deferred a cycle).
Engine/Source/Runtime/Core/Private/Mac/MacApplication.cpp:1678 ( 4.18 code base )
I recently had this start happening as well... I decided to take a more direct approach of figuring out what was locking up there editor, here's are the threads frames, showing the os lock. I had thought originally that it was related to Perforce, but you are correct on your 'around 1:30' seconds it locks up.
Something to note is that if you enter play mode prior to that, it doesn't seem to lock up till after you exit play-in-editor mode (in my case). We're talking within seconds it crashes.
I'll keep looking for a solution/narrowing this down, I'm thinking it might be related to the lazy loading of fonts for Slate
The other threads are waiting nicely
The NSEvent thread might be of interest ...
answered Jul 10 '17 at 01:33 AM
Follow this question
Once you sign in you will be able to subscribe for any updates here