TeamShinkansen / Hakchi2-CE

Tool that allows you to add more games to your NES/SNES Classic Mini
https://discord.gg/UUvqsAR
GNU General Public License v3.0
1.2k stars 107 forks source link

Adding .gif to Genesis Spine artwork causing crash #312

Open yiazmaty opened 4 years ago

yiazmaty commented 4 years ago

I added a non-animated .gif from a local source, which caused unhandled exception. Now, when I go to change that spine art to something else (eg .png file) it gives the same error so it cannot be changed.

To Reproduce
Steps to reproduce the behavior:

  1. Add .gif artwork from local source (e.g. using browse)
  2. Unhandled exception occurs.
  3. Click "Spine" to try to replace with another file.
  4. Unhandled exception occurs again.

Expected behavior
The .gif file should either be rejected outright, or properly handled by Hakchi. When attempting to change spine art, we should be able to change it regardless of the existing spine art type.

Error Details
See the end of this message for details on invoking just-in-time (JIT) debugging instead of this dialog box.

** Exception Text ** System.ArgumentException: Parameter is not valid. at System.Drawing.Bitmap..ctor(Stream stream) at com.clusterrr.hakchi_gui.MainForm.buttonSpine_Click(Object sender, EventArgs e) at System.Windows.Forms.Control.OnClick(EventArgs e) at System.Windows.Forms.Button.OnClick(EventArgs e) at System.Windows.Forms.Button.OnMouseUp(MouseEventArgs mevent) at System.Windows.Forms.Control.WmMouseUp(Message& m, MouseButtons button, Int32 clicks) at System.Windows.Forms.Control.WndProc(Message& m) at System.Windows.Forms.ButtonBase.WndProc(Message& m) at System.Windows.Forms.Button.WndProc(Message& m) at System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)

** Loaded Assemblies ** mscorlib Assembly Version: 4.0.0.0 Win32 Version: 4.8.4121.0 built by: NET48REL1LAST_C CodeBase: file:///C:/Windows/Microsoft.NET/Framework64/v4.0.30319/mscorlib.dll

hakchi Assembly Version: 3.7.0.0 Win32 Version: 3.7.0.0 CodeBase: file:///R:/Emulation/Classics/hakchi2-ce-3.7.0-release/hakchi.exe

System Assembly Version: 4.0.0.0 Win32 Version: 4.8.4001.0 built by: NET48REL1LAST_C CodeBase: file:///C:/WINDOWS/Microsoft.Net/assembly/GAC_MSIL/System/v4.0_4.0.0.0__b77a5c561934e089/System.dll

System.Windows.Forms Assembly Version: 4.0.0.0 Win32 Version: 4.8.4121.0 built by: NET48REL1LAST_C CodeBase: file:///C:/WINDOWS/Microsoft.Net/assembly/GAC_MSIL/System.Windows.Forms/v4.0_4.0.0.0__b77a5c561934e089/System.Windows.Forms.dll

System.Drawing Assembly Version: 4.0.0.0 Win32 Version: 4.8.3752.0 built by: NET48REL1 CodeBase: file:///C:/WINDOWS/Microsoft.Net/assembly/GAC_MSIL/System.Drawing/v4.0_4.0.0.0__b03f5f7f11d50a3a/System.Drawing.dll

System.Core Assembly Version: 4.0.0.0 Win32 Version: 4.8.4121.0 built by: NET48REL1LAST_C CodeBase: file:///C:/WINDOWS/Microsoft.Net/assembly/GAC_MSIL/System.Core/v4.0_4.0.0.0__b77a5c561934e089/System.Core.dll

SpineGen.JSON Assembly Version: 1.0.0.0 Win32 Version: 3.7.0.0 CodeBase: file:///R:/Emulation/Classics/hakchi2-ce-3.7.0-release/hakchi.exe

SpineGen Assembly Version: 1.0.0.0 Win32 Version: 3.7.0.0 CodeBase: file:///R:/Emulation/Classics/hakchi2-ce-3.7.0-release/hakchi.exe

SpineGen.Drawing.System.Drawing Assembly Version: 1.0.0.0 Win32 Version: 3.7.0.0 CodeBase: file:///R:/Emulation/Classics/hakchi2-ce-3.7.0-release/hakchi.exe

Newtonsoft.Json Assembly Version: 11.0.0.0 Win32 Version: 3.7.0.0 CodeBase: file:///R:/Emulation/Classics/hakchi2-ce-3.7.0-release/hakchi.exe

System.Configuration Assembly Version: 4.0.0.0 Win32 Version: 4.8.3752.0 built by: NET48REL1 CodeBase: file:///C:/WINDOWS/Microsoft.Net/assembly/GAC_MSIL/System.Configuration/v4.0_4.0.0.0__b03f5f7f11d50a3a/System.Configuration.dll

System.Xml Assembly Version: 4.0.0.0 Win32 Version: 4.8.3752.0 built by: NET48REL1 CodeBase: file:///C:/WINDOWS/Microsoft.Net/assembly/GAC_MSIL/System.Xml/v4.0_4.0.0.0__b77a5c561934e089/System.Xml.dll

System.Numerics Assembly Version: 4.0.0.0 Win32 Version: 4.8.3752.0 built by: NET48REL1 CodeBase: file:///C:/WINDOWS/Microsoft.Net/assembly/GAC_MSIL/System.Numerics/v4.0_4.0.0.0__b77a5c561934e089/System.Numerics.dll

System.Runtime.Serialization Assembly Version: 4.0.0.0 Win32 Version: 4.8.4121.0 built by: NET48REL1LAST_C CodeBase: file:///C:/WINDOWS/Microsoft.Net/assembly/GAC_MSIL/System.Runtime.Serialization/v4.0_4.0.0.0__b77a5c561934e089/System.Runtime.Serialization.dll

System.Data Assembly Version: 4.0.0.0 Win32 Version: 4.8.4121.0 built by: NET48REL1LAST_C CodeBase: file:///C:/WINDOWS/Microsoft.Net/assembly/GAC_64/System.Data/v4.0_4.0.0.0__b77a5c561934e089/System.Data.dll

SharpCompress Assembly Version: 0.22.0.0 Win32 Version: 3.7.0.0 CodeBase: file:///R:/Emulation/Classics/hakchi2-ce-3.7.0-release/hakchi.exe

ProgressODoom Assembly Version: 1.0.7315.1609 Win32 Version: 3.7.0.0 CodeBase: file:///R:/Emulation/Classics/hakchi2-ce-3.7.0-release/hakchi.exe

Microsoft.GeneratedCode Assembly Version: 1.0.0.0 Win32 Version: 4.8.3752.0 built by: NET48REL1 CodeBase: file:///C:/WINDOWS/Microsoft.Net/assembly/GAC_MSIL/System.Xml/v4.0_4.0.0.0__b77a5c561934e089/System.Xml.dll

AutoUpdater.NET Assembly Version: 1.4.11.0 Win32 Version: 3.7.0.0 CodeBase: file:///R:/Emulation/Classics/hakchi2-ce-3.7.0-release/hakchi.exe

LibUsbDotNet.LibUsbDotNet Assembly Version: 2.2.0.0 Win32 Version: 3.7.0.0 CodeBase: file:///R:/Emulation/Classics/hakchi2-ce-3.7.0-release/hakchi.exe

Renci.SshNet Assembly Version: 2017.0.0.0 Win32 Version: 3.7.0.0 CodeBase: file:///R:/Emulation/Classics/hakchi2-ce-3.7.0-release/hakchi.exe

Tmds.MDns Assembly Version: 0.7.0.0 Win32 Version: 3.7.0.0 CodeBase: file:///R:/Emulation/Classics/hakchi2-ce-3.7.0-release/hakchi.exe

** JIT Debugging ** To enable just-in-time (JIT) debugging, the .config file for this application or computer (machine.config) must have the jitDebugging value set in the system.windows.forms section. The application must also be compiled with debugging enabled.

For example:

When JIT debugging is enabled, any unhandled exception will be sent to the JIT debugger registered on the computer rather than be handled by this dialog box.

DanTheMan827 commented 4 years ago

Can you try this with the debug version and paste the more detailed error message?

I can't recreate this exactly as you've described, what happens when I try to recreate is that the spine generator loads the image, but upon saving, it gives an error and the application crashes.

But when I reopen it, the spine generator is still functional.