DarkMultiPlayer
DarkMultiPlayer copied to clipboard
Disclaimer window won't go away on clicking Accept
I'm reporting this here on behalf of another player who had this problem and looked for help on Discord.
After upgrading from an older version of DMP, the Disclaimer window would appear but clicking Accept did nothing, and the window wouldn't go away until the player clicked Decline.
Environment
OS: Windows 10 (10.0.0) 64bit
Additional Info
[LOG 21:09:18.561] DarkMultiPlayer: [1.60233] Error loading old settings: System.FormatException: Input string was not in the correct format
at System.Int32.Parse (System.String s) [0x00000] in <filename unknown>:0
at DarkMultiPlayer.Settings.LoadOldSettings () [0x00000] in <filename unknown>:0
[LOG 21:09:18.563] DarkMultiPlayer: [1.604336] Error while loading settings:
[LOG 21:09:18.563] DarkMultiPlayer: [1.604837] System.NullReferenceException: Object reference not set to an instance of an object
at DarkMultiPlayer.Settings.SaveSettings () [0x00000] in <filename unknown>:0
at DarkMultiPlayer.Settings.LoadSettings () [0x00000] in <filename unknown>:0
...
[LOG 21:09:40.100] DarkMultiPlayer: [23.14167] User accepted disclaimer, enabling DarkMultiPlayer
[EXC 21:09:40.101] NullReferenceException: Object reference not set to an instance of an object
DarkMultiPlayer.Settings.SaveSettings ()
I couldn't reproduce, but apparently there's a bug in Settings.cs (possibly related to b06660a3) when loading/saving the settings file, possibly due to the file being 'invalid' or an older version than expected.
Wiping both DarkMultiPlayer folders on GameData
and saves
is a workaround.
I'm not sure if this was caused by an old-enough servers.xml file. Maybe it was corrupt or something, but it wouldn't make sense to crash on saving as well (I think it threw a NRE on save because it couldn't parse the old file, thus leaving the setting to null).
It's not critical, as you said, because it's a rare case. I'll take a look at it throughout the day and update the thread with my findings.
If you try to reproduce it, backup your servers.xml file and then run KSP, then link the faulty file here.