Skip to content
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

System.OutOfMemoryException when Unpack #61

Open
johnwhile opened this issue Nov 28, 2021 · 1 comment
Open

System.OutOfMemoryException when Unpack #61

johnwhile opened this issue Nov 28, 2021 · 1 comment

Comments

@johnwhile
Copy link

johnwhile commented Nov 28, 2021

I am trying to uncompress the bundle files because I can't read the compressed files.
This code:

    AssetsManager helper = new AssetsManager();
    helper.LoadClassPackage("classdata.tpk");
    var inst = helper.LoadBundleFile(inputFilename, false);
    var file = inst.file;
    if (file.bundleHeader6.GetCompressionType() == 0) return;
    using (FileStream stream = File.Open(outputFilename, FileMode.Create, FileAccess.ReadWrite))
    {
        file.reader.Position = 0;
        file.Unpack(file.reader, new AssetsFileWriter(stream));
        stream.Position = 0;
    }

With reference from NuGet crash with message for a bundle file of 900MB but not with a bundle of 6MB
System.OutOfMemoryException in AssetsTools.NET.AssetBundleFile.Unpack(AssetsFileReader reader, AssetsFileWriter writer)
same error from version 2.0.7 to 2.0.9

but work correctly if i donwload the source code and add to my tool the AssetsTools.NET.csproj project

@johnwhile johnwhile changed the title System System.OutOfMemoryException when Unpack Nov 28, 2021
@Sighyu
Copy link

Sighyu commented Mar 30, 2022

compile as 64 bit

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants