X-Hax / sa_tools

Sonic Adventure Toolset
http://info.sonicretro.org/SA_Tools
103 stars 24 forks source link

Texture Editor: Can't open .prs files #103

Closed EoxxTH closed 3 years ago

EoxxTH commented 4 years ago

Anytime I try to open a prs file for textures I get this error message

Desktop Screenshot 2020 06 08 - 15 40 03 19

I have the details text here

** Exception Text ** System.BadImageFormatException: is not a valid Win32 application. (Exception from HRESULT: 0x800700C1) at TextureEditor.MainForm.GetTextures(String filename) at TextureEditor.MainForm.openToolStripMenuItem_Click(Object sender, EventArgs e) in E:\Programs\sa_tools\TextureEditor\MainForm.cs:line 246 at System.Windows.Forms.ToolStripItem.RaiseEvent(Object key, EventArgs e) at System.Windows.Forms.ToolStripMenuItem.OnClick(EventArgs e) at System.Windows.Forms.ToolStripItem.HandleClick(EventArgs e) at System.Windows.Forms.ToolStripItem.HandleMouseUp(MouseEventArgs e) at System.Windows.Forms.ToolStripItem.FireEventInteractive(EventArgs e, ToolStripItemEventType met) at System.Windows.Forms.ToolStripItem.FireEvent(EventArgs e, ToolStripItemEventType met) at System.Windows.Forms.ToolStrip.OnMouseUp(MouseEventArgs mea) at System.Windows.Forms.ToolStripDropDown.OnMouseUp(MouseEventArgs mea) at System.Windows.Forms.Control.WmMouseUp(Message& m, MouseButtons button, Int32 clicks) at System.Windows.Forms.Control.WndProc(Message& m) at System.Windows.Forms.ScrollableControl.WndProc(Message& m) at System.Windows.Forms.ToolStrip.WndProc(Message& m) at System.Windows.Forms.ToolStripDropDown.WndProc(Message& m) at System.Windows.Forms.Control.ControlNativeWindow.OnMessage(Message& m) at System.Windows.Forms.Control.ControlNativeWindow.WndProc(Message& m) at System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)

GerbilSoft commented 4 years ago

Are you using a 32-bit OS? The PRS handler uses a separate library, and I'm guessing that library is compiled for 64-bit instead of AnyCPU (assuming it's a .NET IL library).

MainMemory commented 4 years ago

TextureEditor is 32-bit only because it relies on Managed DirectX for DDS support.

EoxxTH commented 4 years ago

I have Windows 10 64-bit. Is there a way to change the compatibility?

MainMemory commented 4 years ago

It's not a compatibility problem, I also have Windows 10 64-bit. I'm just not sure what the problem actually is.

PiKeyAr commented 3 years ago

I've checked the source code for the PRS decompressor and it doesn't seem to have any additional dependencies, so my only guess is your FraGag.Compression.Prs.dll got corrupted somehow. Please reopen if the issue is still reproducible with the latest version.