nesrak1 / UABEA

c# uabe for newer versions of unity
MIT License
1.1k stars 143 forks source link

UABEA Crash when open sharedasset #210

Closed Aeeeeeyes closed 1 year ago

Aeeeeeyes commented 1 year ago

info

Application: UABEAvalonia.exe CoreCLR Version: 6.0.1222.56807 .NET Version: 6.0.12 Description: The process was terminated due to an unhandled exception. Exception Info: System.ArgumentException: The output char buffer is too small to contain the decoded characters, encoding 'Unicode (UTF-8)' fallback 'System.Text.DecoderReplacementFallback'. (Parameter 'chars') at System.Text.Encoding.ThrowCharsOverflow(DecoderNLS decoder, Boolean nothingDecoded) at System.Text.Encoding.GetCharsWithFallback(ReadOnlySpan1 bytes, Int32 originalBytesLength, Span1 chars, Int32 originalCharsLength, DecoderNLS decoder) at System.Text.UTF8Encoding.GetCharsWithFallback(ReadOnlySpan1 bytes, Int32 originalBytesLength, Span1 chars, Int32 originalCharsLength, DecoderNLS decoder) at System.Text.Encoding.GetCharsWithFallback(Byte pOriginalBytes, Int32 originalByteCount, Char pOriginalChars, Int32 originalCharCount, Int32 bytesConsumedSoFar, Int32 charsWrittenSoFar, DecoderNLS decoder) at System.Text.DecoderNLS.GetChars(Byte bytes, Int32 byteCount, Char chars, Int32 charCount, Boolean flush) at System.Text.Decoder.GetChars(ReadOnlySpan1 bytes, Span1 chars, Boolean flush) at System.IO.BinaryReader.Read() at System.IO.BinaryReader.ReadChar() at AssetsTools.NET.AssetsFileReader.ReadNullTerminated() in C:\Users\nesquack\Documents\GitReposLocal\AssetsTools.NET\AssetTools.NET\Standard\AssetsFileFormat\AssetsFileReader.cs:line 117 at AssetsTools.NET.AssetsFileExternal.Read(AssetsFileReader reader) in C:\Users\nesquack\Documents\GitReposLocal\AssetsTools.NET\AssetTools.NET\Standard\AssetsFileFormat\AssetsFileExternal.cs:line 18 at AssetsTools.NET.AssetsFileMetadata.Read(AssetsFileReader reader, UInt32 version, Int64 dataOffset) in C:\Users\nesquack\Documents\GitReposLocal\AssetsTools.NET\AssetTools.NET\Standard\AssetsFileFormat\AssetsFileMetadata.cs:line 107 at AssetsTools.NET.AssetsFileMetadata.Read(AssetsFileReader reader, AssetsFileHeader header) in C:\Users\nesquack\Documents\GitReposLocal\AssetsTools.NET\AssetTools.NET\Standard\AssetsFileFormat\AssetsFileMetadata.cs:line 46 at AssetsTools.NET.AssetsFile..ctor(AssetsFileReader reader) in C:\Users\nesquack\Documents\GitReposLocal\AssetsTools.NET\AssetTools.NET\Standard\AssetsFileFormat\AssetsFile.cs:line 29 at AssetsTools.NET.Extra.AssetsFileInstance..ctor(Stream stream, String filePath) in C:\Users\nesquack\Documents\GitReposLocal\AssetsTools.NET\AssetTools.NET\Extra\AssetsManager\AssetsFileInstance.cs:line 21 at AssetsTools.NET.Extra.AssetsManager.LoadAssetsFile(Stream stream, String path, Boolean loadDeps, BundleFileInstance bunInst) in C:\Users\nesquack\Documents\GitReposLocal\AssetsTools.NET\AssetTools.NET\Extra\AssetsManager\AssetsManager.Assets.cs:line 16 at AssetsTools.NET.Extra.AssetsManager.LoadAssetsFile(FileStream stream, Boolean loadDeps) in C:\Users\nesquack\Documents\GitReposLocal\AssetsTools.NET\AssetTools.NET\Extra\AssetsManager\AssetsManager.Assets.cs:line 37 at AssetsTools.NET.Extra.AssetsManager.LoadAssetsFile(String path, Boolean loadDeps) in C:\Users\nesquack\Documents\GitReposLocal\AssetsTools.NET\AssetTools.NET\Extra\AssetsManager\AssetsManager.Assets.cs:line 42 at UABEAvalonia.MainWindow.OpenFiles(String[] files) in C:\Users\nesquack\Documents\GitRepos\uabequickfixes\UABEA\UABEAvalonia\MainWindow.axaml.cs:line 150 at System.Threading.Tasks.Task.<>c.b128_0(Object state) at Avalonia.Threading.AvaloniaSynchronizationContext.<>c__DisplayClass5_0.b0() in //src/Avalonia.Base/Threading/AvaloniaSynchronizationContext.cs:line 33 at Avalonia.Threading.JobRunner.RunJobs(Nullable`1 priority) in //src/Avalonia.Base/Threading/JobRunner.cs:line 37 at Avalonia.Win32.Win32Platform.WndProc(IntPtr hWnd, UInt32 msg, IntPtr wParam, IntPtr lParam) in //src/Windows/Avalonia.Win32/Win32Platform.cs:line 278 at Avalonia.Win32.Interop.UnmanagedMethods.DispatchMessage(MSG& lpmsg) at Avalonia.Win32.Win32Platform.RunLoop(CancellationToken cancellationToken) in //src/Windows/Avalonia.Win32/Win32Platform.cs:line 205 at Avalonia.Threading.Dispatcher.MainLoop(CancellationToken cancellationToken) in //src/Avalonia.Base/Threading/Dispatcher.cs:line 65 at Avalonia.Controls.ApplicationLifetimes.ClassicDesktopStyleApplicationLifetime.Start(String[] args) in //src/Avalonia.Controls/ApplicationLifetimes/ClassicDesktopStyleApplicationLifetime.cs:line 120 at Avalonia.ClassicDesktopStyleApplicationLifetimeExtensions.StartWithClassicDesktopLifetime[T](T builder, String[] args, ShutdownMode shutdownMode) in /_/src/Avalonia.Controls/ApplicationLifetimes/ClassicDesktopStyleApplicationLifetime.cs:line 209 at UABEAvalonia.Program.Main(String[] args) in C:\Users\nesquack\Documents\GitRepos\uabequickfixes\UABEA\UABEAvalonia\Program.cs:line 52

hope this can fix... ty

nesrak1 commented 1 year ago

Sounds like you opened a file that was detected as an assets file but wasn't one. What file did you try to open? What version of Unity is it and what platform is it running on?

Aeeeeeyes commented 1 year ago

this file is from some old game resource like 2012-2016 (idk how to check the version...) and it work fine on AssetStudio but i try to mod mesh file and got this crash

nesrak1 commented 1 year ago

You can right click -> properties -> details tab -> look at file version/product version. Or you can open a level file in a hex editor or notepad or something and look for the numbers at the top.

2012-2016 seems pretty old though. Games from 2016 may be fine, but anything older than that I expect to be on Unity 4 which is not a version I support.

Aeeeeeyes commented 1 year ago

3.5.7f6 i think it this one? i use hex editor to find it but im not sure welp i think its just not support for now then lol thank you for your help! hope you add more old version of unity(if possible cuz idk about coding stuff ;-;)

nesrak1 commented 1 year ago

Yeah that is extremely old. You're better off using the original UABE over here: https://github.com/SeriousCache/UABE. This version of UABEA was initially created to support newer versions of Unity, so I didn't bother with handling the old ones.

Aeeeeeyes commented 1 year ago

Yeah that is extremely old. You're better off using the original UABE over here: https://github.com/SeriousCache/UABE. This version of UABEA was initially created to support newer versions of Unity, so I didn't bother with handling the old ones.

ty so much but it might too old actually lol i try UABE with dump/raw import but the mesh just didnt load at all... even assetstudio cant find the one i try to mod with and it just disappear... guess i just have to use Unity Hub then... also ty so much you reply surpisingly quick and thats help me a lot