TalicZealot / SotnRandoTools

A collection of tools to enhance the SotN randomizer experience.
https://taliczealot.github.io/
MIT License
24 stars 6 forks source link

Unhandled Exception when saving or loading overlay .ini files. #44

Closed eldri7ch2 closed 4 months ago

eldri7ch2 commented 4 months ago

Please use this template for any bugs or problems you encounter using the tools and label the issue appropriately. Fill as many of the fields listed below as possible.

Error:

Unhandled Exception when saving or loading overlay .ini files.

How to reproduce:

Attempt to load or save a tracker overlay from the rando tools

Additional context, screenshot or log file from /ExternalTools/SotnRandoTools/Logs/:

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

************** Exception Text **************
Newtonsoft.Json.JsonReaderException: Unexpected token when reading bytes: StartArray. Path '[0]', line 2, position 3.
   at Newtonsoft.Json.JsonReader.ReadArrayElementIntoByteArrayReportDone(List`1 buffer)
   at Newtonsoft.Json.JsonReader.ReadArrayIntoByteArray()
   at Newtonsoft.Json.JsonReader.ReadForType(JsonContract contract, Boolean hasConverter)
   at Newtonsoft.Json.Serialization.JsonSerializerInternalReader.Deserialize(JsonReader reader, Type objectType, Boolean checkAdditionalContent)
   at Newtonsoft.Json.JsonSerializer.DeserializeInternal(JsonReader reader, Type objectType)
   at Newtonsoft.Json.JsonConvert.DeserializeObject(String value, Type type, JsonSerializerSettings settings)
   at Newtonsoft.Json.JsonConvert.DeserializeObject[T](String value, JsonSerializerSettings settings)
   at SotnRandoTools.Configuration.TrackerConfig.LoadOverlayLayout(String path)
   at System.Windows.Forms.FileDialog.OnFileOk(CancelEventArgs e)
   at System.Windows.Forms.FileDialog.HandleVistaFileOk(IFileDialog dialog)

************** Loaded Assemblies **************
mscorlib
    Assembly Version: 4.0.0.0
    Win32 Version: 4.8.9241.0 built by: NET481REL1LAST_C
    CodeBase: file:///C:/Windows/Microsoft.NET/Framework64/v4.0.30319/mscorlib.dll
----------------------------------------
EmuHawk
    Assembly Version: 2.9.1.0
    Win32 Version: 2.9.1.0
    CodeBase: file:///D:/Bizhawk%20SOTNCore/EmuHawk.exe
----------------------------------------
System.Windows.Forms
    Assembly Version: 4.0.0.0
    Win32 Version: 4.8.9181.0 built by: NET481REL1LAST_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
    Assembly Version: 4.0.0.0
    Win32 Version: 4.8.9236.0 built by: NET481REL1LAST_B
    CodeBase: file:///C:/WINDOWS/Microsoft.Net/assembly/GAC_MSIL/System/v4.0_4.0.0.0__b77a5c561934e089/System.dll
----------------------------------------
System.Drawing
    Assembly Version: 4.0.0.0
    Win32 Version: 4.8.9037.0 built by: NET481REL1
    CodeBase: file:///C:/WINDOWS/Microsoft.Net/assembly/GAC_MSIL/System.Drawing/v4.0_4.0.0.0__b03f5f7f11d50a3a/System.Drawing.dll
----------------------------------------
BizHawk.Client.Common
    Assembly Version: 2.9.1.0
    Win32 Version: 2.9.1.0
    CodeBase: file:///D:/Bizhawk%20SOTNCore/dll/BizHawk.Client.Common.dll
----------------------------------------
netstandard
    Assembly Version: 2.0.0.0
    Win32 Version: 4.8.9037.0
    CodeBase: file:///C:/WINDOWS/Microsoft.Net/assembly/GAC_MSIL/netstandard/v4.0_2.0.0.0__cc7b13ffcd2ddd51/netstandard.dll
----------------------------------------
System.ValueTuple
    Assembly Version: 4.0.0.0
    Win32 Version: 4.8.9037.0
    CodeBase: file:///C:/WINDOWS/Microsoft.Net/assembly/GAC_MSIL/System.ValueTuple/v4.0_4.0.0.0__cc7b13ffcd2ddd51/System.ValueTuple.dll
----------------------------------------
BizHawk.Bizware.BizwareGL
    Assembly Version: 2.9.1.0
    Win32 Version: 2.9.1.0
    CodeBase: file:///D:/Bizhawk%20SOTNCore/dll/BizHawk.Bizware.BizwareGL.dll
----------------------------------------
BizHawk.BizInvoke
    Assembly Version: 2.9.1.0
    Win32 Version: 2.9.1.0
    CodeBase: file:///D:/Bizhawk%20SOTNCore/dll/BizHawk.BizInvoke.dll
----------------------------------------
BizHawk.Bizware.DirectX
    Assembly Version: 2.9.1.0
    Win32 Version: 2.9.1.0
    CodeBase: file:///D:/Bizhawk%20SOTNCore/dll/BizHawk.Bizware.DirectX.dll
----------------------------------------
BizHawk.Bizware.OpenTK3
    Assembly Version: 2.9.1.0
    Win32 Version: 2.9.1.0
    CodeBase: file:///D:/Bizhawk%20SOTNCore/dll/BizHawk.Bizware.OpenTK3.dll
----------------------------------------
BizHawk.Emulation.Common
    Assembly Version: 2.9.1.0
    Win32 Version: 2.9.1.0
    CodeBase: file:///D:/Bizhawk%20SOTNCore/dll/BizHawk.Emulation.Common.dll
----------------------------------------
BizHawk.Emulation.Cores
    Assembly Version: 2.9.1.0
    Win32 Version: 2.9.1.0
    CodeBase: file:///D:/Bizhawk%20SOTNCore/dll/BizHawk.Emulation.Cores.dll
----------------------------------------
BizHawk.Emulation.DiscSystem
    Assembly Version: 2.9.1.0
    Win32 Version: 2.9.1.0
    CodeBase: file:///D:/Bizhawk%20SOTNCore/dll/BizHawk.Emulation.DiscSystem.dll
----------------------------------------
BizHawk.WinForms.Controls
    Assembly Version: 2.9.1.0
    Win32 Version: 2.9.1.0
    CodeBase: file:///D:/Bizhawk%20SOTNCore/dll/BizHawk.WinForms.Controls.dll
----------------------------------------
System.Configuration
    Assembly Version: 4.0.0.0
    Win32 Version: 4.8.9037.0 built by: NET481REL1
    CodeBase: file:///C:/WINDOWS/Microsoft.Net/assembly/GAC_MSIL/System.Configuration/v4.0_4.0.0.0__b03f5f7f11d50a3a/System.Configuration.dll
----------------------------------------
System.Core
    Assembly Version: 4.0.0.0
    Win32 Version: 4.8.9241.0 built by: NET481REL1LAST_C
    CodeBase: file:///C:/WINDOWS/Microsoft.Net/assembly/GAC_MSIL/System.Core/v4.0_4.0.0.0__b77a5c561934e089/System.Core.dll
----------------------------------------
System.Xml
    Assembly Version: 4.0.0.0
    Win32 Version: 4.8.9037.0 built by: NET481REL1
    CodeBase: file:///C:/WINDOWS/Microsoft.Net/assembly/GAC_MSIL/System.Xml/v4.0_4.0.0.0__b77a5c561934e089/System.Xml.dll
----------------------------------------
BizHawk.Common
    Assembly Version: 2.9.1.0
    Win32 Version: 2.9.1.0
    CodeBase: file:///D:/Bizhawk%20SOTNCore/dll/BizHawk.Common.dll
----------------------------------------
Newtonsoft.Json
    Assembly Version: 13.0.0.0
    Win32 Version: 13.0.3.27908
    CodeBase: file:///D:/Bizhawk%20SOTNCore/dll/Newtonsoft.Json.dll
----------------------------------------
System.Numerics
    Assembly Version: 4.0.0.0
    Win32 Version: 4.8.9037.0 built by: NET481REL1
    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.9241.0 built by: NET481REL1LAST_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.9214.0 built by: NET481REL1LAST_B
    CodeBase: file:///C:/WINDOWS/Microsoft.Net/assembly/GAC_64/System.Data/v4.0_4.0.0.0__b77a5c561934e089/System.Data.dll
----------------------------------------
System.ComponentModel.Annotations
    Assembly Version: 4.2.1.0
    Win32 Version: 4.6.26515.06
    CodeBase: file:///D:/Bizhawk%20SOTNCore/dll/System.ComponentModel.Annotations.dll
----------------------------------------
System.ComponentModel.DataAnnotations
    Assembly Version: 4.0.0.0
    Win32 Version: 4.8.9037.0
    CodeBase: file:///C:/WINDOWS/Microsoft.Net/assembly/GAC_MSIL/System.ComponentModel.DataAnnotations/v4.0_4.0.0.0__31bf3856ad364e35/System.ComponentModel.DataAnnotations.dll
----------------------------------------
System.Drawing.Common
    Assembly Version: 6.0.0.0
    Win32 Version: 6.0.21.52210
    CodeBase: file:///D:/Bizhawk%20SOTNCore/dll/System.Drawing.Common.dll
----------------------------------------
SlimDX
    Assembly Version: 4.0.13.43
    Win32 Version: 
    CodeBase: file:///D:/Bizhawk%20SOTNCore/dll/SlimDX.dll
----------------------------------------
OpenTK
    Assembly Version: 3.3.3.0
    Win32 Version: 3.3.3
    CodeBase: file:///D:/Bizhawk%20SOTNCore/dll/OpenTK.dll
----------------------------------------
NLua
    Assembly Version: 1.4.1.0
    Win32 Version: 1.4.1.0
    CodeBase: file:///D:/Bizhawk%20SOTNCore/dll/NLua.dll
----------------------------------------
System.Net.Http
    Assembly Version: 4.0.0.0
    Win32 Version: 4.8.9037.0 built by: NET481REL1
    CodeBase: file:///C:/WINDOWS/Microsoft.Net/assembly/GAC_MSIL/System.Net.Http/v4.0_4.0.0.0__b03f5f7f11d50a3a/System.Net.Http.dll
----------------------------------------
System.Collections.Immutable
    Assembly Version: 7.0.0.0
    Win32 Version: 7.0.22.51805
    CodeBase: file:///D:/Bizhawk%20SOTNCore/dll/System.Collections.Immutable.dll
----------------------------------------
Microsoft.Bcl.HashCode
    Assembly Version: 1.0.0.0
    Win32 Version: 4.700.20.56604
    CodeBase: file:///D:/Bizhawk%20SOTNCore/dll/Microsoft.Bcl.HashCode.dll
----------------------------------------
Cyotek.Drawing.BitmapFont
    Assembly Version: 1.0.0.0
    Win32 Version: 2.0.4.0
    CodeBase: file:///D:/Bizhawk%20SOTNCore/dll/Cyotek.Drawing.BitmapFont.dll
----------------------------------------
GearRush
    Assembly Version: 2.0.0.0
    Win32 Version: 2.9.1.0
    CodeBase: file:///D:/Bizhawk%20SOTNCore/EmuHawk.exe
----------------------------------------
HelloWorld_BizHawkTool
    Assembly Version: 1.0.0.0
    Win32 Version: 2.9.1.0
    CodeBase: file:///D:/Bizhawk%20SOTNCore/EmuHawk.exe
----------------------------------------
SotnRandoTools
    Assembly Version: 1.7.1.0
    Win32 Version: 2.9.1.0
    CodeBase: file:///D:/Bizhawk%20SOTNCore/EmuHawk.exe
----------------------------------------
SotnApi
    Assembly Version: 1.1.8.0
    Win32 Version: 1.1.8.0
    CodeBase: file:///D:/Bizhawk%20SOTNCore/ExternalTools/SotnRandoTools/dll/SotnApi.dll
----------------------------------------
System.Memory
    Assembly Version: 4.0.1.2
    Win32 Version: 4.6.31308.01
    CodeBase: file:///D:/Bizhawk%20SOTNCore/dll/System.Memory.dll
----------------------------------------
ISOParser
    Assembly Version: 1.0.0.0
    Win32 Version: 1.0.0.0
    CodeBase: file:///D:/Bizhawk%20SOTNCore/dll/ISOParser.dll
----------------------------------------
System.Runtime.CompilerServices.Unsafe
    Assembly Version: 6.0.0.0
    Win32 Version: 6.0.21.52210
    CodeBase: file:///D:/Bizhawk%20SOTNCore/dll/System.Runtime.CompilerServices.Unsafe.dll
----------------------------------------
Virtu
    Assembly Version: 1.0.0.0
    Win32 Version: 1.0.0.0
    CodeBase: file:///D:/Bizhawk%20SOTNCore/dll/Virtu.dll
----------------------------------------
Microsoft.CSharp
    Assembly Version: 4.0.0.0
    Win32 Version: 4.8.9037.0
    CodeBase: file:///C:/WINDOWS/Microsoft.Net/assembly/GAC_MSIL/Microsoft.CSharp/v4.0_4.0.0.0__b03f5f7f11d50a3a/Microsoft.CSharp.dll
----------------------------------------
System.Dynamic
    Assembly Version: 4.0.0.0
    Win32 Version: 4.8.9037.0
    CodeBase: file:///C:/WINDOWS/Microsoft.Net/assembly/GAC_MSIL/System.Dynamic/v4.0_4.0.0.0__b03f5f7f11d50a3a/System.Dynamic.dll
----------------------------------------
Anonymously Hosted DynamicMethods Assembly
    Assembly Version: 0.0.0.0
    Win32 Version: 4.8.9241.0 built by: NET481REL1LAST_C
    CodeBase: file:///C:/WINDOWS/Microsoft.Net/assembly/GAC_64/mscorlib/v4.0_4.0.0.0__b77a5c561934e089/mscorlib.dll
----------------------------------------
FlatBuffers.GenOutput
    Assembly Version: 1.0.0.0
    Win32 Version: 1.0.0.0
    CodeBase: file:///D:/Bizhawk%20SOTNCore/dll/FlatBuffers.GenOutput.dll
----------------------------------------
Google.FlatBuffers
    Assembly Version: 1.0.0.0
    Win32 Version: 1.0.0.0
    CodeBase: file:///D:/Bizhawk%20SOTNCore/dll/Google.FlatBuffers.dll
----------------------------------------
BizInvokeProxyAssembly
    Assembly Version: 0.0.0.0
    Win32 Version: 2.9.1.0
    CodeBase: file:///D:/Bizhawk%20SOTNCore/dll/BizHawk.BizInvoke.dll
----------------------------------------
PresentationFramework
    Assembly Version: 4.0.0.0
    Win32 Version: 4.8.9241.0
    CodeBase: file:///C:/WINDOWS/Microsoft.Net/assembly/GAC_MSIL/PresentationFramework/v4.0_4.0.0.0__31bf3856ad364e35/PresentationFramework.dll
----------------------------------------
WindowsBase
    Assembly Version: 4.0.0.0
    Win32 Version: 4.8.9241.0 built by: NET481REL1LAST_C
    CodeBase: file:///C:/WINDOWS/Microsoft.Net/assembly/GAC_MSIL/WindowsBase/v4.0_4.0.0.0__31bf3856ad364e35/WindowsBase.dll
----------------------------------------
PresentationCore
    Assembly Version: 4.0.0.0
    Win32 Version: 4.8.9241.0 built by: NET481REL1LAST_C
    CodeBase: file:///C:/WINDOWS/Microsoft.Net/assembly/GAC_64/PresentationCore/v4.0_4.0.0.0__31bf3856ad364e35/PresentationCore.dll
----------------------------------------
System.Xaml
    Assembly Version: 4.0.0.0
    Win32 Version: 4.8.9241.0 built by: NET481REL1LAST_C
    CodeBase: file:///C:/WINDOWS/Microsoft.Net/assembly/GAC_MSIL/System.Xaml/v4.0_4.0.0.0__b77a5c561934e089/System.Xaml.dll
----------------------------------------
GearRush
    Assembly Version: 2.0.0.0
    Win32 Version: 2.9.1.0
    CodeBase: file:///D:/Bizhawk%20SOTNCore/EmuHawk.exe
----------------------------------------
HelloWorld_BizHawkTool
    Assembly Version: 1.0.0.0
    Win32 Version: 2.9.1.0
    CodeBase: file:///D:/Bizhawk%20SOTNCore/EmuHawk.exe
----------------------------------------
SotnRandoTools
    Assembly Version: 1.7.1.0
    Win32 Version: 2.9.1.0
    CodeBase: file:///D:/Bizhawk%20SOTNCore/EmuHawk.exe
----------------------------------------
Accessibility
    Assembly Version: 4.0.0.0
    Win32 Version: 4.8.9037.0 built by: NET481REL1
    CodeBase: file:///C:/WINDOWS/Microsoft.Net/assembly/GAC_MSIL/Accessibility/v4.0_4.0.0.0__b03f5f7f11d50a3a/Accessibility.dll
----------------------------------------
SotnRandoTools
    Assembly Version: 1.7.1.0
    Win32 Version: 1.7.1.0
    CodeBase: file:///D:/Bizhawk%20SOTNCore/ExternalTools/SotnRandoTools.dll
----------------------------------------

************** 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:

<configuration>
    <system.windows.forms jitDebugging="true" />
</configuration>

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.

SotnRandoTools version:

1.7.1

BizHawk version:

2.9.1

Operating system and version:

Win 10 22h2

TalicZealot commented 4 months ago

Are you attempting to load old overlays?

eldri7ch2 commented 4 months ago

I attempted to load old overlays and the Tournament.ini included in the tracker.

TalicZealot commented 4 months ago

That file is no longer distributed and will not work with the new overlay. Updating only replaces existing files in the new release, so many things can be left over like the old library dlls that I no longer use. On my end I can save and load overlays,

TalicZealot commented 4 months ago

I guess I should catch that exception and show a message that the format is not supported.

TalicZealot commented 4 months ago

It should be trivial to create new layout files for tournaments and such. I could remake it, but wasn't sure what people use and if that one was still in use.

eldri7ch2 commented 4 months ago

OK, I looked at saving and I can save a new overlay so that's what I will do. I appreciate you taking a look

TalicZealot commented 4 months ago

Nice. I'll make it less confusing next version.