AssetsTools.NET icon indicating copy to clipboard operation
AssetsTools.NET copied to clipboard

OverflowException when trying to compress a big asset bundle file

Open WhyNot-hub opened this issue 2 years ago • 1 comments

Hi, there is a problem when im trying to compress big assetbundle file (1GB)

OverflowException
AssetsTools.NET.AssetBundleBlockAndDirInfo.Read (AssetsTools.NET.AssetsFileReader reader) (at <c3e815020f7c4b648ca19c7d2006c299>:0)
AssetsTools.NET.AssetBundleFile.UnpackInfoOnly () (at <c3e815020f7c4b648ca19c7d2006c299>:0)
AssetsTools.NET.AssetBundleFile.Read (AssetsTools.NET.AssetsFileReader reader) (at <c3e815020f7c4b648ca19c7d2006c299>:0)
AssetsTools.NET.Extra.BundleFileInstance..ctor (System.IO.Stream stream, System.String filePath, System.Boolean unpackIfPacked) (at <c3e815020f7c4b648ca19c7d2006c299>:0)
AssetsTools.NET.Extra.AssetsManager.LoadBundleFile (System.IO.Stream stream, System.String path, System.Boolean unpackIfPacked) (at <c3e815020f7c4b648ca19c7d2006c299>:0)
AssetsTools.NET.Extra.AssetsManager.LoadBundleFile (System.IO.FileStream stream, System.Boolean unpackIfPacked) (at <c3e815020f7c4b648ca19c7d2006c299>:0)
AssetsTools.NET.Extra.AssetsManager.LoadBundleFile (System.String path, System.Boolean unpackIfPacked) (at <c3e815020f7c4b648ca19c7d2006c299>:0)
VRCHotswap.CompressFile (System.String sourceFile, System.String destinationFile) (at Assets/VRC Hotswap/Editor/VRCHotswap.cs:413)
VRCHotswap.HS3 () (at Assets/VRC Hotswap/Editor/VRCHotswap.cs:404)
VRCHotswap+<>c.<HS2>b__24_0 (UnityEngine.AsyncOperation ao) (at Assets/VRC Hotswap/Editor/VRCHotswap.cs:281)
UnityEngine.AsyncOperation.InvokeCompletionEvent () (at <7d87237cea3743d093e22c5b98f74fba>:0)

WhyNot-hub avatar May 14 '23 21:05 WhyNot-hub

As the exception suggests, the exception happens in the read code and not the write/compress code. This could be for a number of reasons:

  1. The bundle is too big to fit in a memory stream (int max size limit). The exception you posted on the other repo seems to be this issue and is fixed by writing to disk instead of memory. The readme (for version 2 of AT) or the wiki (for version 3 of AT) has instructions for how to disable decompressing automatically and manually decompress to file.
  2. The bundle is too new for the version of assets tools you are using. It seems this is AT3 but you may want to try the very latest to be sure.
  3. The bundle is invalid. You can try throwing the bundle into a different tool like UABEA, AssetStudio, etc. to see if it even loads there.

nesrak1 avatar May 14 '23 21:05 nesrak1