Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Faulty config.xml halts processing on the remaining mods #21

Open
Lisias opened this issue Apr 29, 2018 · 1 comment
Open

Faulty config.xml halts processing on the remaining mods #21

Lisias opened this issue Apr 29, 2018 · 1 comment

Comments

@Lisias
Copy link

Lisias commented Apr 29, 2018

There's bug on the MiniAVC code that, if a faulty "config.xml" is found on a mod, MiniAVC stops checking for the remaining mods!

This is confirmed to happens on KSP 1.4.1 and 1.4.3.

Once the faulty config.xml is fixed, all the mods are correctly checked from now on.

Sample

[LOG 14:59:17.966] MiniAVC -> System.FormatException: True is not a valid boolean value
  at System.Xml.XmlConvert.ToBoolean (System.String s) [0x00000] in <filename unknown>:0 
  at System.Xml.Serialization.XmlCustomFormatter.FromXmlString (System.Xml.Serialization.TypeData type, System.String value) [0x00000] in <filename unknown>:0 
  at System.Xml.Serialization.XmlSerializationReaderInterpreter.GetValueFromXmlString (System.String value, System.Xml.Serialization.TypeData typeData, System.Xml.Serialization.XmlTypeMapping typeMap) [0x00000] in <filename unknown>:0 
  at System.Xml.Serialization.XmlSerializationReaderInterpreter.ReadPrimitiveValue (System.Xml.Serialization.XmlTypeMapElementInfo elem) [0x00000] in <filename unknown>:0 
  at System.Xml.Serialization.XmlSerializationReaderInterpreter.ReadObjectElement (System.Xml.Serialization.XmlTypeMapElementInfo elem) [0x00000] in <filename unknown>:0 
  at System.Xml.Serialization.XmlSerializationReaderInterpreter.ReadMembers (System.Xml.Serialization.ClassMap map, System.Object ob, Boolean isValueList, Boolean readByOrder) [0x00000] in <filename unknown>:0 
  at System.Xml.Serialization.XmlSerializationReaderInterpreter.ReadClassInstanceMembers (System.Xml.Serialization.XmlTypeMapping typeMap, System.Object ob) [0x00000] in <filename unknown>:0 
  at System.Xml.Serialization.XmlSerializationReaderInterpreter.ReadClassInstance (System.Xml.Serialization.XmlTypeMapping typeMap, Boolean isNullable, Boolean checkType) [0x00000] in <filename unknown>:0 
  at System.Xml.Serialization.XmlSerializationReaderInterpreter.ReadObject (System.Xml.Serialization.XmlTypeMapping typeMap, Boolean isNullable, Boolean checkType) [0x00000] in <filename unknown>:0 
  at System.Xml.Serialization.XmlSerializationReaderInterpreter.ReadRoot (System.Xml.Serialization.XmlTypeMapping rootMap) [0x00000] in <filename unknown>:0 
  at System.Xml.Serialization.XmlSerializationReaderInterpreter.ReadRoot () [0x00000] in <filename unknown>:0 
  at System.Xml.Serialization.XmlSerializer.Deserialize (System.Xml.Serialization.XmlSerializationReader reader) [0x00000] in <filename unknown>:0 
[LOG 14:59:17.967] MiniAVC -> Executing: MiniAVC - 1.0.3.3
[LOG 14:59:17.967] MiniAVC -> Assembly: /Users/lisias/Applications/Steam/steamapps/common/Kerbal Space Program/GameData/Endurance/MiniAVC.dll
[LOG 14:59:17.967] MiniAVC -> Starter was created.
[LOG 14:59:17.967] MiniAVC -> System.FormatException: True is not a valid boolean value
  at System.Xml.XmlConvert.ToBoolean (System.String s) [0x00000] in <filename unknown>:0 
  at System.Xml.Serialization.XmlCustomFormatter.FromXmlString (System.Xml.Serialization.TypeData type, System.String value) [0x00000] in <filename unknown>:0 
  at System.Xml.Serialization.XmlSerializationReaderInterpreter.GetValueFromXmlString (System.String value, System.Xml.Serialization.TypeData typeData, System.Xml.Serialization.XmlTypeMapping typeMap) [0x00000] in <filename unknown>:0 
  at System.Xml.Serialization.XmlSerializationReaderInterpreter.ReadPrimitiveValue (System.Xml.Serialization.XmlTypeMapElementInfo elem) [0x00000] in <filename unknown>:0 
  at System.Xml.Serialization.XmlSerializationReaderInterpreter.ReadObjectElement (System.Xml.Serialization.XmlTypeMapElementInfo elem) [0x00000] in <filename unknown>:0 
  at System.Xml.Serialization.XmlSerializationReaderInterpreter.ReadMembers (System.Xml.Serialization.ClassMap map, System.Object ob, Boolean isValueList, Boolean readByOrder) [0x00000] in <filename unknown>:0 
  at System.Xml.Serialization.XmlSerializationReaderInterpreter.ReadClassInstanceMembers (System.Xml.Serialization.XmlTypeMapping typeMap, System.Object ob) [0x00000] in <filename unknown>:0 
  at System.Xml.Serialization.XmlSerializationReaderInterpreter.ReadClassInstance (System.Xml.Serialization.XmlTypeMapping typeMap, Boolean isNullable, Boolean checkType) [0x00000] in <filename unknown>:0 
  at System.Xml.Serialization.XmlSerializationReaderInterpreter.ReadObject (System.Xml.Serialization.XmlTypeMapping typeMap, Boolean isNullable, Boolean checkType) [0x00000] in <filename unknown>:0 
  at System.Xml.Serialization.XmlSerializationReaderInterpreter.ReadRoot (System.Xml.Serialization.XmlTypeMapping rootMap) [0x00000] in <filename unknown>:0 
  at System.Xml.Serialization.XmlSerializationReaderInterpreter.ReadRoot () [0x00000] in <filename unknown>:0 
  at System.Xml.Serialization.XmlSerializer.Deserialize (System.Xml.Serialization.XmlSerializationReader reader) [0x00000] in <filename unknown>:0 

How to reproduce

Create a config.xml file as follows:

<?xml version="1.0" encoding="us-ascii"?>
<AddonSettings xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
  <AllowCheck>true</AllowCheck>
  <FirstRun>True</FirstRun>
</AddonSettings>

Note the capitalized True on <FirstRun>

Expected Behaviour

MiniAVC should log the problem, but should keep working on the remaining Add Ons.

@linuxgurugamer
Copy link

It doesn't seem to be an issue with my version, I repeated your test and got the expected results.
However, if you are using an old MiniAVC.dll on KSP 1.4, the results are not going to be as expected

Lisias pushed a commit to net-lisias-kspu/KSPAddonVersionChecker that referenced this issue Aug 29, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants