Editor and Game freezes when tabbed out too long

These happened since 4.11, but I’ve not noticed them as much until upgrading to 4.12. Whenever it would go into the low-usage mode when tabbed out, it would eventually freeze, still using CPU but not rendering anything or updating the window. It seems that there is a deadlock going on somewhere that would normally not happen, but happens due to the reduced render rate.

Last entries from log:

[2016.06.09-20.23.33:993][693]LogMaterial: Missing cached shader map for material SplineEditorMeshMat, compiling. 
[2016.06.09-20.23.34:013][693]LogMaterial: Missing cached shader map for material SplineEditorMeshMat, compiling. 
[2016.06.09-20.23.34:024][693]LogMaterial: Missing cached shader map for material SplineEditorMeshMat, compiling. 
[2016.06.09-20.23.34:315][694]LogMaterial: Missing cached shader map for material LandscapeGizmoHeight_Mat, compiling. 
[2016.06.09-20.23.34:372][694]LogMaterial: Missing cached shader map for material LandscapeGizmoHeight_Mat, compiling. 
[2016.06.09-20.23.34:434][694]LogMaterial: Missing cached shader map for material LandscapeGizmoHeight_Mat, compiling. 
[2016.06.09-20.23.34:644][695]LogMaterial: Missing cached shader map for material LandscapeGizmo_Mat, compiling. 
[2016.06.09-20.23.34:660][695]LogMaterial: Missing cached shader map for material LandscapeGizmo_Mat, compiling. 
[2016.06.09-20.23.34:675][695]LogMaterial: Missing cached shader map for material LandscapeGizmo_Mat, compiling. 
[2016.06.09-20.23.34:979][696]LogMaterial: Missing cached shader map for material FloorPlaneMaterial, compiling. 
[2016.06.09-20.23.35:026][696]LogMaterial: Missing cached shader map for material FloorPlaneMaterial, compiling. 
[2016.06.

As you can see above, it clearly tried to do something, freezing mid write. It does not recover from this after ~30 minutes of running.

Discovered in Tower Unite (a UE4 game) and later reproduced in my own project by tabbing out for ~5 minutes. Eventually it begins to stutter and get stuck on whatever was last shown.

Edit: I’m beginning to think this is some sort of streaming issue, as in it tries to stream in too much at the same time and thus gets stuck until enough memory is freed up.

After more than one hour, it recovered. Almost unuseable, but it’s back. A simple restart fixes it though.

Hi Xaymar,

I am looking into this now. I intend to allow the editor to remained overnight to see if an extended time period is causing the error. Are you able to reproduce this in a clean, blank project with no additional content or is it limited to one project?

Additionally, can you post your dxdiag so I can take a look?

Hello ,

I’ve not tested this with a blank project yet, but I’ll try with one of the templates projects - if it happens there too, I’ll probably be able to reproduce it in a completely blank one too.
My DxDiag can be found here: http://pastebin.com/raw/2jLrB0he

  • Xaymar

I see that you have an SLI setup with two r9 200 series cards, please note that the editor does not use SLI, so if you have it set to do so this may be part of the error. To test, please make sure that the editor is only being used by a single card and see if the error occurs again.

Hey ,

I actually only have one card (non-SLI). I don’t know why DxDiag lists two (Device Manager & Devices only list one Card, same with the Driver).

I did some further testing on my end and played around with some gpu profiling tools and I think this freeze is related to streaming getting stuck trying to read/write the same memory. Possibly a driver error, but I’m not sure yet.

  • Xaymar

Hey ,

I’ve been tracking GPU usage and noticed that this happens when the memory usage is above 95%. Perhaps this is related to offloading to disk? If so, why is Unreal Engine attempting to use more memory than it should? And where does it even come from, is something not being destroyed properly?

Additionally, I’ve been able to reproduce it in a new project (only Starter Content). It is especially trigger happy when another program is using a minor amount of video memory or playing a hardware assisted video stream - Chrome, VLC, Windows Media Player can all trigger this behaviour.

I feel like this is a bug that will be insanely hard to track down as it isn’t consistent with when it happens.

Xaymar

I get a same freez of my project… in 4.11 it was runing proper, but now in 4.12.2 after a wgile the game freez, and some times it run for a second, then freez again. i get no error mesages or some thing. really hard to find out what it is. if i dont spawn the AIs in the project, it run a bit longer before it freez. If it freez, i just see the scene, like a picture, but noting more happen then. I think it is a bug some where in the engine. I using MSI R9 380 4gb. 16 gb ram Xeon cpu.

In my case, it hapens most short after start the game/project (play). I now try to find out what is wrong. At moment it only hapen in one project. I did copy this project, and now i removing part by part, to find out what is causing it. Could be in projectiles, or maybe in the AI code i made. Just weird, that it not hapen in 4,11, with same project, but in 4,12 it freez the screen. Some times , after maybe 5 minuts, it short run a bit and get freez again.

So this bug only happens if you have another program open? How long do you usually have to wait before the freeze occurs and is it limited to specific programs or is it if you have any other program open?

It happens even without other programs open, unless you count the OS as a program. Usually between 5-30 minutes before it occurs. And it’s not limited to specific programs - it happens out of the blue for no reason.

Is it possible that the low-power mode (that thing that reduces framerate) of the Engine causes the GPU driver to offload the used memory to disk, causing extreme slow downs? I do not have an SSD in my system and random 4k read is at 3.3mb/s, which is not really fast.

If you have a copy of the project that this is occurring with, can you upload it so I can take a look? I’ll be happy to try to reproduce this on my end.

Hi , Can you send me your Email to (at) .ch, for send you a download link? About it is a marketplace product, where i get the freez (new update i making), So i can’t link it here.
What i find out, if i remove the generated nav mesh, then it work without freezing. But i need to have a Nav mesh. After generate the nav mesh again, it freez.

You can send them to me on the forum in a private message here:

Hi ,

Can you post your dxdiag here? I think I have an idea of what is occurring.

http://www…ch/FREE/DxDiag.txt

Hi , will do the test soon.

I find out some thing. If i don’t using AI sight at the bots, then it don’t freez. Maybe it have to do with the nav mesh, about if i re,ove the nave mesh, it also don’t freez.

Thank you. I am fairly certain this may be a memory leak that is occurring. I have one last thing for you to try so I can be certain. Please open your task manager and then open the editor. Once you do, please note what the memory usage of the editor is when you first open it, then alt tab out. In the memory usage section, do you see the amount of memory being utilized going up? What does it start at and what does it end at when the crash occurs? Finally, how quickly did this occur?

I saw a very slow memory leak on my end. After 5-6 hours I noticed that the editor had jumped almost 2 gbs in memory used. Having said that, my work PC has a large amount of memory, so there was no way it would freeze any time quickly at that rate of increase. If I can confirm this is what is occurring on your end, it would go a long way towards helping find the cause.

Hi again, Ok, did the task manager test. it is looking thatway:
Start project : Ram = 20.6% / CPU = 29.5%
It freez after 60 second, while i be under enemy attack. Then it looking like this: Ram = 20.6 / CPU = 14.5%

And no freez, if i switch off AI sight or remove the nav mesh.