Kerbal Engineer Redux

Kerbal Engineer Redux

2M Downloads

GeneralSettings.xml suddenly is a zero byte file

Gordon-Dry opened this issue ยท 0 comments

commented

On game launch I find this in the log:

[AddonLoader]: Instantiating addon 'GeneralSettings' from assembly 'KerbalEngineer' 
(Filename: C:\buildslave\unity\build\Runtime/Export/Debug/Debug.bindings.h Line: 35)

Uploading Crash Report
XmlException: Root element is missing.
  at System.Xml.XmlTextReaderImpl.Throw (System.Exception e) [0x00027] in <1d98d70bb7d8453b80c25aa561fdecd1>:0 
  at System.Xml.XmlTextReaderImpl.ThrowWithoutLineInfo (System.String res) [0x00017] in <1d98d70bb7d8453b80c25aa561fdecd1>:0 
  at System.Xml.XmlTextReaderImpl.ParseDocumentContent () [0x0035d] in <1d98d70bb7d8453b80c25aa561fdecd1>:0 
  at System.Xml.XmlTextReaderImpl.Read () [0x0008c] in <1d98d70bb7d8453b80c25aa561fdecd1>:0 
  at System.Xml.XmlTextReader.Read () [0x00000] in <1d98d70bb7d8453b80c25aa561fdecd1>:0 
  at System.Xml.XmlReader.MoveToContent () [0x0003a] in <1d98d70bb7d8453b80c25aa561fdecd1>:0 
  at Microsoft.Xml.Serialization.GeneratedAssembly.XmlSerializationReaderList1.Read3_ArrayOfSettingItem () [0x00008] in <57db99429a51443cb7731c34b620ae40>:0 
  at (wrapper managed-to-native) System.Reflection.MonoMethod.InternalInvoke(System.Reflection.MonoMethod,object,object[],System.Exception&)
  at System.Reflection.MonoMethod.Invoke (System.Object obj, System.Reflection.BindingFlags invokeAttr, System.Reflection.Binder binder, System.Object[] parameters, System.Globalization.CultureInfo culture) [0x00032] in <9577ac7a62ef43179789031239ba8798>:0 
Rethrow as InvalidOperationException: There is an error in XML document (0, 0).
  at System.Xml.Serialization.XmlSerializer.Deserialize (System.Xml.XmlReader xmlReader, System.String encodingStyle, System.Xml.Serialization.XmlDeserializationEvents events) [0x0011b] in <1d98d70bb7d8453b80c25aa561fdecd1>:0 
  at System.Xml.Serialization.XmlSerializer.Deserialize (System.Xml.XmlReader xmlReader, System.String encodingStyle) [0x00000] in <1d98d70bb7d8453b80c25aa561fdecd1>:0 
  at System.Xml.Serialization.XmlSerializer.Deserialize (System.IO.Stream stream) [0x0001c] in <1d98d70bb7d8453b80c25aa561fdecd1>:0 
  at KerbalEngineer.Settings.SettingHandler.Deserialise (System.String fileName, System.Type[] extraTypes) [0x0002d] in <134deb60e87843589b7ea1a020650b28>:0 
  at KerbalEngineer.Settings.SettingHandler.Load (System.String fileName, System.Type[] extraTypes) [0x0000d] in <134deb60e87843589b7ea1a020650b28>:0 
  at KerbalEngineer.Settings.GeneralSettings.OnEnable () [0x00000] in <134deb60e87843589b7ea1a020650b28>:0 
UnityEngine.DebugLogHandler:Internal_LogException(Exception, Object)
UnityEngine.DebugLogHandler:LogException(Exception, Object)
ModuleManager.UnityLogHandle.InterceptLogHandler:LogException(Exception, Object)
UnityEngine.Logger:LogException(Exception, Object)
UnityEngine.Debug:CallOverridenDebugHandler(Exception, Object)
UnityEngine.GameObject:Internal_AddComponentWithType(Type)
UnityEngine.GameObject:AddComponent(Type)
AddonLoader:StartAddon(LoadedAssembly, Type, KSPAddon, Startup)
AddonLoader:StartAddons(Startup)
<LoadObjects>d__90:MoveNext()
UnityEngine.SetupCoroutine:InvokeMoveNext(IEnumerator, IntPtr)
UnityEngine.MonoBehaviour:StartCoroutineManaged2(IEnumerator)
UnityEngine.MonoBehaviour:StartCoroutine(IEnumerator)
<CreateDatabase>d__71:MoveNext()
UnityEngine.SetupCoroutine:InvokeMoveNext(IEnumerator, IntPtr)
UnityEngine.MonoBehaviour:StartCoroutineManaged2(IEnumerator)
UnityEngine.MonoBehaviour:StartCoroutine(IEnumerator)
GameDatabase:StartLoad()
<LoadSystems>d__11:MoveNext()
UnityEngine.SetupCoroutine:InvokeMoveNext(IEnumerator, IntPtr)
UnityEngine.MonoBehaviour:StartCoroutineManaged2(IEnumerator)
UnityEngine.MonoBehaviour:StartCoroutine(IEnumerator)
LoadingScreen:Start()
 
(Filename: <1d98d70bb7d8453b80c25aa561fdecd1> Line: 0)

So I check why and found that GameData\KerbalEngineer\Settings\GeneralSettings.xml is a zero byte file.

Luckily I got settings backed up so I was able to restore it - and write protect it as well.