Cook failed -> FMemoryWriter does not support data larger than 2GB


I am new to UE4 but since my very first project I have been getting this error when I try to cook for win 7 64 and Android :

[2014.07.27-13.53.04:909][  0]LogWindows: === Critical error: ===
Unhandled Exception: 0x00000001

[2014.07.27-13.53.04:925][  0]LogWindows: FMemoryWriter does not support data larger than 2GB. Archive name: C:/Users/PieMan/Documents/Unreal Projects/BigProject2/Content/Maps/FinalGood.umap.

So far I have been avoiding this error by creating a new project, importing my stuff again … wait a long for the light to be built. But I do not consider this an effective solution.

The FinalGood.umap file at the path mentioned in the log is only 600 MB now, but I did get this error when it was smaller → under 100 MB. Please note that when I was able to cook for windows I was unable to cook for Android because of the same error.

I did find another user that experienced same kind of error, but it does not help me → link text

Also I have no iddea why the if( NewArrayCount >= MAX_int32 ) is true in the FMemoryWriter::Serialize method → link text.

Here is Cook.txt → link text.
And UAT log → link text.

Thank you.

It hard to tell what is exactly a problem here, but I would divide your map to more sub-levels and stream them as “always loaded”(of course if your don’t want stream them:) ).


I am sorry but I fail to understand your resolution. I am unable to “cook” the project meaning unreal engine is unable to properly archive the project and deploy it. This is not a run-time problem as I partially understand from your answer as streaming is a thing that happens after the project is … “cooked”.

Also I do not know where to find this “always loaded” option.

Thank you.


we are running into the same issues here.
The MemoryWriter complains about Filesizes larger than 2GB, while our largest Map-Files are “just” at around 700MB.
That might sound a lot, but in fact isn’t. We tried to be as efficient as possible, given the circumstances. We are doing professional Viz-Work with UE4, means large environments with plenty of objects. We divide our scenes in SubLevels and all that, but the Furniture-Level alone in the current project takes up to 690MB right now. Mostly because of the Lightmaps that got stored in them (we HAVE to use uncompressed Lightmaps, thanks to the nice compression artifacts that DXT5 gives you)

So…right now we are splitting up our Levels in even smaller sub-levels…but it would be nice to know, why there is such a limit after all.

The aforementioned source-code with the check against Int32-Limits makes sense, when you look deeper into the engine-core TArray-part. Those arrays are simple 32-Bit Integer-Arrays. I think, changing them to 64-Bit arrays would pose kind of a problem to the rest of the code, otherwise you guys would have done that already, right?

So…to sum it up…is there really no other way than seperating maps down into smaller chunks to make things package? Why is the FMemoryWriter limited to 2GB and how does that filesize get calculated (having in mind that our maps - and all the other maps that are reported with those errors - never even reached 1GB of filesize)?

Did you find the problem?

Try to bake your lightning with “compress lightmaps” under “world settings”… It solved it for me! :slight_smile:

Good luck!

at the moment I have exactly the same problem with my project. I am using the Unreal Engine 4.8. I am not able to cook my project because of this strange 2GB limitation. In my project I have not used footage with this file size. For this reason I do not understand this error message. Has anyone found a solution in the meantime ? To use compressed lightmaps does not help me.

Best regards, Andreas

Hi all,

Problem is the package is too large. Please see this other thread for resolution.