-
Notifications
You must be signed in to change notification settings - Fork 127
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Chunked archive readers for large files #127
base: master
Are you sure you want to change the base?
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please add a way to force disable reading files larger than int.MaxValue as well. It should be enabled by default, and if someone wishes to allow large files, they should do so manually. Reading large files utilizes a very large amount of memory, and take significantly longer than other files as well (which is to be expected)
Would rather prevent accidental loading of files of this size as opposed to letting people unknowingly use it, causing their system to most likely lock up and become unresponsive for a considerable amount of time or until a restart.
7bfb62a adds two new options in Globals:
Large files as determined by |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
please, create a method in GameFile.cs to verify the size of the payload
added |
I got out of memory with this patch on extract Palworld' umap file "
and get out of memory on extract " |
this PR would only enable reading of large files, you still would end up using a large amount of memory if you were to serialize it to a JSON file.
the new code shouldn't run on any of the |
Provide more information. |
Need this for Stock FModel cannot open it: [ERR] System.OverflowException: Array dimensions exceeded supported range. at CUE4Parse.UE4.IO.IoStoreReader.Read(Int64 offset, Int64 length). If you rollback and rebuild FModel with this patch it opens T_WorldMap_UDIM.uasset but says Value cannot be null. (Parameter 'sourceArray'). With AlwaysUseChunkedReader = true and AllowLargeFiles = true it reads ubulk, but still fails at image saving ([ERR] System.NullReferenceException: Object reference not set to an instance of an object). |
Allows large files to be read. The issue occurs because these files (usually .umaps) are over 2 GB which is too big for an array. This new reader loads the file in chunks stored in a 128 MB buffer.
This might prevent the issue described in #95.
I briefly tested this and it seems to work, but due to the minor refactor in PakFileReader, I'm not sure if I haven't introduced side-effects.