Error while reading bundle file - System.IO.IOException: Lz4 decompression error, write -1 bytes but expected 131072 bytes
MGSimard opened this issue · 2 comments
Game: Rise of Kingdoms
Build: Unity 2021.3.21f1
File: ui_texture_commander.lb _(Applies to all .lb UnityFS Bundle files for Rise of Kingdoms)
Error:
Error while reading bundle file C:\Users\MGS\Desktop\RoK\ui_texture_commander.lb
System.IO.IOException: Lz4 decompression error, write -1 bytes but expected 131072 bytes
at AssetStudio.BundleFile.ReadBlocks(EndianBinaryReader reader, Stream blocksStream) in D:\a\AssetStudio\AssetStudio\AssetStudio\BundleFile.cs:line 351
at AssetStudio.BundleFile..ctor(FileReader reader) in D:\a\AssetStudio\AssetStudio\AssetStudio\BundleFile.cs:line 98
at AssetStudio.AssetsManager.LoadBundleFile(FileReader reader, String originalPath) in D:\a\AssetStudio\AssetStudio\AssetStudio\AssetsManager.cs:line 182
Issue reference from original 2022 build: Perfare/AssetStudio#971 (comment)
Solution: Delete all bit entries from the first "UnityFS" specification to the next "UnityFS" specification.
Originally posted by @p0pZeroSn in Perfare/AssetStudio#971 (comment)
Other user who had trouble with solution:
Hey bro, after I follow what you said, it prompts that the dimension of the array is exceeded. Do you know why?
Originally posted by @PackageInstaller in Perfare/AssetStudio#971 (comment)
If this specific niche use-case doesn't warrant a special fix, could there be any more specific explanation on how to execute @p0pZeroSn's alleged fix? Even if I delete everything from and to the first and second UnityFS declarations/headers/whatever, it still doesn't function.
Partial fix, full fix for most files:
Okay, found an actual partial fix, specifically for the files which contain "UnityFS" twice. Some of the files will still have very few assets which will fail, but the fix is as simple as CTRL+F to the second "UnityFS" entry and deleting everything before that.
This way, your edited file should now begin with the second UnityFS entry.
try using fake header as game