Gyoo / LiveSplit.SplitsBet

GitHub for the LiveSplit plugin SplitsBet, the bot that makes the viewers play with the runner
8 stars 10 forks source link

Livesplit crash on Edit Layout Cancel #26

Closed Gyoo closed 9 years ago

Gyoo commented 9 years ago

Issue encountered on commit a95081e

Title is self explaining, Livesplit is "crashing due to an unknown reason" when I press cancel on the Edit Layout screen. The settings for SplitsBet seem to work correctly but don't seem to be saved or loaded correctly. These 2 things should be related.

0x0ade commented 9 years ago

What does the Windows event log say? (I'm just about to test it via Wine by myself... T.T=;)

Gyoo commented 9 years ago

LiveSplit.exe Error: 0 : String hasn't been recognized as a valid Boolean value

at System.Boolean.Parse(String value) at LiveSplit.SplitsBet.Settings.SetSettings(XmlNode settings) dans c:\Users\gyoze_000\Documents\Visual Studio 2013\Projects\LiveSplit.SplitsBet\LiveSplit.SplitsBet\Settings.cs:line 57 at LiveSplit.SplitsBet.SplitsBetComponent.SetSettings(XmlNode settings) in c:\Users\gyoze_000\Documents\Visual Studio 2013\Projects\LiveSplit.SplitsBet\LiveSplit.SplitsBet\SplitsBetComponent.cs:line 469

It doesn't say exactly where Livesplit crashes but my opinion is that it comes from there

0x0ade commented 9 years ago

It crashes upon setting UseGlobalTime from the XmlNode, which means - just as I said in my comment on commit a95081e7a7d7f44bd096ae6a21e94da70a7b7cb2 - SplitsBet crashes due to a backwards compatibility issue.

Do you prefer System.Xml's serializer (most stable / tested; can cause incompatibilities with previous settings and problems with specific classes / types), FEZMod's XmlHelper (uses some workarounds and manual deserialization of specific objects, but it works unexpectedly well) or simply fix it manually?

Gyoo commented 9 years ago

Maybe @CryZe can fix it tomorrow. I tried to manage SetSettings and GetSettings from what he showed me so I assume it should work but I might be doing something wrong here.

tl;dr manual fix should do the work.

Gyoo commented 9 years ago

I fixed it. The problem was that some data weren't bind correctly here and there + variables needed default values.