Cooking content freezes after specific asset

Hi, I’m trying to cook the content to package my game for win64, however every time it gets stuck after ‘Finished SavePackage’ of one particular asset (in my case ‘Wine_Bottle_001’).

I’ve tried deleting the Intermediate, Config and Saved folders and restarting to no avail. I’ve also run the ‘Fix up redirectories’ command on my content folder, again, no change.

If I remove the asset it gets stuck on Wine_Glass_001 (the previous asset in the cook list) presumably its stalling on the next asset in line to be cooked, any idea how I can identify what this is?

Any help would be appreciated.

(I don’t have a Cook.txt in my AppData folder, presumably because the cook process doesn’t finish or error, it just hangs)

Hello!

Go the windows browser directory and delete the directory: Saved. Then, open the project again and try to cook again. It might work.

Sometimes the file inside the current “Saved” folder can be corrupted, avoiding the cook to be finished. So, just delete the saved directory and cook again, unreal will create another clean Saved directory.

Good luck!

I am having the same problem and I tried deleting the saved folder and it’s still not working. Same for the OP.

Hi JTLR,

Can you post your logs here? They can be found at \Unreal Projects\PROJECTNAME\saved\logs. Additionally, have you run “Fix up Redirectors” in your content folder? Try doing so by going to Content Browser>Content folder>RMB>FIx up Redirectors.

I’m having the same problem and this didn’t work either. Here are my logs, including files from the CookingTemp directory: link. Also I’m using 4.11.

I did some digging and ran the editor through Visual 's debugger while it was cooking my project and found out that it’s endlessly trying to cache certain assets. It seems to only be textures though. I’m not sure what’s going on when it does that, but hopefully I’ve shed some light on this issue.

Does this occur in a clean, blank project with no additional content or is it limited to one project?

It does occur in a clean project.

Can you post your dxdiag here so I can take a look?

Here it is.

Unfortunately, it looks like your system is a bit underspecced, which may be causing the error you are seeing. Especially if it is getting stuck on textures, the most likely scenario is that it is running out of RAM while attempting to either cook or compile shaders. Your processor may also be lending to the overall freeze. Do you have any other computers that you can compare to this PC to determine if this is the cause?

Our recommended minimum specs can be found here:

No, I unfortunately do not have another computer. I understand my PC is underspecced. I am in the middle of upgrading it, but it’s taking a while because I don’t make a lot of money. Anyways, the problem is that I never had this problem before 4.11. I had my cook times down to 15 minutes. My PC specs haven’t changed either. That’s why I haven’t considered it to be the cause. I even cooked a test project in 4.10.2 last night and had no problems.

Try opening your task manager when you run the cook, do you see a significant jump in memory used during this time?

Strange, I sent a reply, but it’s disappeared. Bugs, bugs everywhere…

Anyways, what I had said in my previous comment is that it does. My average memory usage when I’m not using the editor is about 30%-60%. When I am using the editor, it’s about 70%-80%. When I cook my project it’s 80%-90% mainly because I have to set it to spawn a child cooker otherwise, if it’s just a single cooker (this is only 4.11) it endlessly tries to cook a map instead of textures or any other asset. So I have to have two cookers running and both of them only use about 500 MB of memory per process before Windows starts putting it in virtual memory. By then, it’s been a few hours. It only takes a few minutes until it starts trying to cook textures. Hope that helps.

Unfortunately, this confirms my suspicions that it is most likely related to your RAM being less than the minimum recommended. While 4.10 may cook, there are additional content additions to 4.11 that may be drawing more memory, thus leading to the freeze you are seeing. If 4.10 is working for what you need, it would be recommended to stay with this build, especially given that 4.11 is currently in a preview stage and not intended for active development.

I was afraid of that. Thanks for the help, though. I appreciate it. Looks like I’ve gotta work without cooking my project until I can raise the money to finish upgrading my PC. I accidentally converted my project to 4.11, a stupid decision I deeply regret, and I can’t go back to 4.10. Fortunately, my game is just a hobby project, so I can wait. Still though, I was hoping this was a bug that can be fixed. Oh well. Once again, thanks for helping me out. I hope this helps JTLR as well.

I have 32gb of RAM, so don’t think that’s my issue, not sure why this has been marked as the correct answer

HI JTLR,

Answers are typically marked as accepted if we have not heard from the original poster in several days. If a post is marked as answered and you are still experiencing the error, please feel free to post and re-open the issue. If the OP posts on a question, it will unmark “answered” posts so we can assist further. It should also be noted that if a staff member posts on a question that has received an accepted answer it will auto-mark accepted again, please feel free to simply post again with updated information to unmark it.

In this case, have you tried this in the released 4.11 version to see if it is still occurring? If so, what steps are you taking to reproduce this on your end? I’ll be happy to take another look.

I am experiencing the same problem. I posted a question about it (UE 4.11 hangs cooking on Macbook Pro) but got no answers. I have compiled the engine from source and am debugging now to try and figure out where it is getting stuck. I do not believe that the problem is RAM related; I have two machines, both with 8gb of RAM. One machine is a dual core, and the other is a quad core, both the same generation of Intel processors. The problem never occurs on the quad core. There is more than 4gb of memory free when things get stuck.

If you debug, you find that the main thread is hanging endlessly waiting for another task to complete, but no other threads seem to be doing anything. I suspect some sort of race condition or deadlock.

The thread pool stuff is extremely complex and it is very hard to figure out exactly what is going on.

If you set
bAllowCompilingThroughWorkers=False
bAllowAsynchronousShaderCompiling=False
in DefaultEngine.ini it doesn’t work any better, but there are a lot less threads to contend with when you are looking.

If you set the OLDCOOK flag, it never finishes on either the dual or quad core. The dual core breaks on the second asset it tries to cook, and the quad core processes lots of assets before it gets stuck.

If I figure anything more out, I’ll post it here.

I figured out the problem and came up with a patch to the source. I have filed a pull request, but in the meantime check out

for the fix.