I’ve recently expanded my map and it now fails to cook. I’m getting the following error in my logs:
[0194.90] Critical: appError called: Ran out of virtual memory. To prevent this condition, you must free up more space on your primary hard disk.
[0194.90] Critical: Windows GetLastError: The system cannot find the file specified. (2)
[0197.66] Log: === Critical error: ===
Ran out of virtual memory. To prevent this condition, you must free up more space on your primary hard disk.
I have over 150gig free on my primary hdd, and i have 16 gig of ddr4 ram.
Has anyone experienced this or know how to fix it? Also, what are the implications of not cooking a map?
Windows might be limiting how much space is available for a swap file. You can fix that in Control Panel, System, Advanced system settings, Advanced, Advanced. On that tab there’s an option to change available virtual memory.
If you need to do a lighting build bigger than what your computer can handle, you can try building it on an Amazon Web Services EC2 instance. You can upload your whole UDK folder to an AWS S3 folder (or you could upload it to Dropbox or similar if you have the room available). Start an EC2 instance with all the memory you could possibly want. Connect to it via RDP, retrieve your UDK folder, and start cooking.
If you don’t cook the map, you can still play it. You’ll just get a message telling you that maps need to be cooked. You can turn that off with the console command DisableAllOnScreenMessages or something like that. And of course, the map won’t have cooked lighting. Cooked lighting performs better and looks much better.
In some cases you just won’t be able to cook the lighting. If you have hundreds of thousands of foliage instances spread across a 10 km x 10 km map with lots of toggleable lights, all the memory in the world isn’t going to let you cook that lighting.
Oh wait, I was confused about something for a second. You’re cooking the map for distribution, right? Not building the lighting?
Even if the map doesn’t get cooked, you can still copy the uncooked map file into the directory structure that you’re going to distribute. You might not be able to include it with the installer that UDK makes, so you’ll have to make your own installer. If you’re going to distribute it on Steam, then you won’t be using the UDK installer anyway.
Interesting… I’ve had mixed luck with past experiments similar to this. Working backwards for a moment… A cooked map (100km with dynamic / no pre-computed lighting), is a different size for starters, which offers some clues…
When opened inside the Editor, it looks different. often missing translucent materials etc. However a cooked map running inside PIE seems to work ok… But once you copy or save out an Editor-map into the Cooked installation folder, its a train-wreck. The packaged EXE using the Editor map has no textures on anything, from landscapes to skyspheres!
So what’s going on? It looks like Cooking embeds UPK info into the Level map. Notice how few UPK’s there are in cooked builds / distribution folders etc. In short, copying an Editor map breaks all links to Editor-installed UPK’s etc. Things get worse in multiplayer… You can’t join a game anymore (Local Machine + LAN tested).
There’s a GUID / ID matching system that exists between Multiplayer installations. If you change a level (move a mesh etc) or edit Kismet without altering UPK or UC, then its ok, you can safely copy a newly cooked Level on-top of existing installations and everything works ok. But once you change a line of UC or tweak an asset inside a UPK, the syncing breaks down. You can’t join a Multiplayer game anymore after that…
It’d be interesting to discover why this is exactly. Is the GUID or common identifier a safety check to reduce crashes, or an anti-cheat mechanism, or something else…??? Either way, copying Editor-maps into Cooked-Build folders also breaks this process…
When doing a full cook in Unreal Frontend, my system memory (ram) rarely exceeds 50%. It seems whenever it reaches ~8Gb of usage is when frontend will error out. I wonder if frontend has some memory limit cap…?
I did manage to finally package a cooked version by doing the following:
While in Unreal Frontend, I removed all maps from “Maps to Cook”. Then did a “Clean and Full Recook”.
Then I added my menu map and did a “Cook Packages”.
Then added my main map and did another “Cook Packages”.
Note: If I try to cook my main map before my menu map, it always fails with the “ran out of virtual memory” error. However the ordered steps above do allow everything to be cooked and packaged.
However now I’m concerned I have a compounding problem that will continue to get worse as my game grows (as I was always previously able to do a “Clean and Full Recook”).
As @franktech mentions above, I’ve also tried dropping the uncooked map into the installed UDKGame\CookedPC\Maps directory and results in the map loading with no textures or any assets (just the landscape).
Ever since I distributed my first Built With UDK game, I’ve had issues with assets not appearing in the cooked levels. For me it was almost always particle emitters and sounds. I never had an issue with missing textures (unless the missing particles were ultimately the result of missing textures). I was able to fix the problem by copying my own uncooked upk content files and maps into the final distribution (into the Content folder, not the CookedPC folder). I’ve never had a problem cooking the maps. And I’ve never tried making a multiplayer game. I’d be very interested in hearing how you end up fixing this.
Edit to include some information that might be useful: IIRC, you don’t actually have to cook anything unless you’re distributing on consoles. Just don’t run the executable with seekfreeloading.
Yeah, -seekfreeloading is a command line option for starting the game. It tells the game executable to use cooked packages. I’m not sure whether Frontend creates an executable with -seekfreeloading hardcoded. I don’t think it would. Does it make a shortcut that runs “YourGame.exe -seekfreeloading”? In your Steam Pipeline options somewhere you can set the command to run (with command line options) when the player starts your game.
If you distribute and play your game with uncooked packages, be sure to place them in the Content or Content/Maps folder, and not in the CookedPC folder or other cooked folders.
Cooked packages are smaller and they load faster, so cook them if you can. But they shouldn’t be strictly necessary if you have a map that just refuses to cook. In my experience, I was able to run “MyGame.exe -seekfreeloading” and it seemed to have loaded the cooked packages if available. But I always had missing assets for some reason, and when I copied my uncooked packages into the Content folder, I could still run my game with seekfreeloading, and the game found the missing content in the uncooked packages.
I’m still not sure how I would even package the game without cooking the maps. If I remove the maps from “Maps to cook” in Frontend, and then package and install the game. Then manually place the maps in the UDKGame/Content/Maps/ directory, it won’t run. It just asks if i want to recompile and then spits out a bunch of warnings like:
@Coldscooter that’s strange. I’ve never had that happen to me. Caveat here, I’m using UE3 and not UDK, so maybe I have more freedom with how I do things…
I get an updated list of my maps by opening a Windows command prompt and typing this command from my Content\Maps folder:
dir /s /b /o > filenames.txt
I compile, build lighting, and cook the maps. I cook the maps with a .bat file:
RPGTacGame.exe CookPackages -platform=PC (...lots of map filenames copy/pasted from filenames.txt...) -final_release -full
Then I take everything that I need and copy it all into a staging directory. That includes Content and Content\Maps. I include all of my UnrealScript files to make everything more mod-friendly, but I think there’s a way to build the game so that it doesn’t need or include the uncompiled UnrealScript. Maybe the uncooked files require you to have the UnrealScript there? If you manually copy files from your development environment instead of letting the installer move them, maybe you get different versions with different functionality? Anyway, from the staging directory, I can run my game’s executable just to test everything out.
Once I have everything I need in the staging directory, I use steamcmd.exe to upload the files from my staging directory to Steam. And once I download my own update from Steam, my game installation works just as well as my development copy.