[XML] Parse failed when XML contains comments.
Creta5164 opened this issue · 1 comments
Creta5164 commented
Unity version : 2021.1.10f1
Importer version : 3.2.0
XML Content (abstract)
<?xml version="1.0"?>
<font>
<info face="Waffleche" size="11" bold="0" italic="0" charset="" unicode="1" stretchH="100" smooth="0" aa="1" padding="2,2,2,2" spacing="3,3" outline="0"/>
<common lineHeight="11" base="9" scaleW="1024" scaleH="1024" pages="1" packed="0" alphaChnl="0" redChnl="4" greenChnl="4" blueChnl="4"/>
<pages>
<page id="0" file="Waffleche_0.png" />
<page id="1" file="Waffleche_1.png" />
</pages>
<chars count="2522">
<!--Input icons-->
<char id="9435" x="1" y="1" width="11" height="11" xoffset="2" yoffset="1" xadvance="13" page="1" chnl="15"/>
<char id="9441" x="14" y="1" width="11" height="11" xoffset="2" yoffset="1" xadvance="13" page="1" chnl="15"/>
<char id="9424" x="27" y="1" width="11" height="11" xoffset="2" yoffset="1" xadvance="13" page="1" chnl="15"/>
<char id="9425" x="40" y="1" width="11" height="11" xoffset="2" yoffset="1" xadvance="13" page="1" chnl="15"/>
<char id="9447" x="53" y="1" width="11" height="11" xoffset="2" yoffset="1" xadvance="13" page="1" chnl="15"/>
<char id="9448" x="66" y="1" width="11" height="11" xoffset="2" yoffset="1" xadvance="13" page="1" chnl="15"/>
<char id="9383" x="79" y="1" width="11" height="11" xoffset="2" yoffset="1" xadvance="13" page="1" chnl="15"/>
<char id="9389" x="92" y="1" width="11" height="11" xoffset="2" yoffset="1" xadvance="13" page="1" chnl="15"/>
<char id="65324" x="105" y="1" width="11" height="11" xoffset="2" yoffset="1" xadvance="13" page="1" chnl="15"/>
<char id="65330" x="118" y="1" width="11" height="11" xoffset="2" yoffset="1" xadvance="13" page="1" chnl="15"/>
<char id="65291" x="131" y="1" width="11" height="11" xoffset="2" yoffset="1" xadvance="13" page="1" chnl="15"/>
<char id="9442" x="144" y="1" width="11" height="11" xoffset="2" yoffset="1" xadvance="13" page="1" chnl="15"/>
<char id="9436" x="157" y="1" width="11" height="11" xoffset="2" yoffset="1" xadvance="13" page="1" chnl="15"/>
<char id="8679" x="169" y="1" width="22" height="11" xoffset="2" yoffset="1" xadvance="24" page="1" chnl="15"/>
<!--Fonts-->
<char id="10" x="6" y="6" width="9" height="12" xoffset="-2" yoffset="-1" xadvance="6" page="0" chnl="15" />
<char id="32" x="23" y="6" width="22" height="5" xoffset="-8" yoffset="8" xadvance="6" page="0" chnl="15" />
<char id="33" x="6" y="26" width="5" height="12" xoffset="1" yoffset="-1" xadvance="6" page="0" chnl="15" />
<char id="34" x="6" y="46" width="7" height="6" xoffset="0" yoffset="-1" xadvance="6" page="0" chnl="15" />
...
Stack trace
NullReferenceException: Object reference not set to an instance of an object
litefeel.BFImporter.Editor.FntParse.ToInt (System.Xml.XmlNode node, System.String name) (at Library/PackageCache/com.litefeel.bitmapfontimporter@f6dbf0be50/Editor/FntParse.cs:111)
litefeel.BFImporter.Editor.FntParse.DoXMLPase (System.String& content) (at Library/PackageCache/com.litefeel.bitmapfontimporter@f6dbf0be50/Editor/FntParse.cs:79)
litefeel.BFImporter.Editor.FntParse.GetFntParse (System.String& text) (at Library/PackageCache/com.litefeel.bitmapfontimporter@f6dbf0be50/Editor/FntParse.cs:41)
litefeel.BFImporter.Editor.BFImporter.DoImportBitmapFont (System.String fntPatn) (at Library/PackageCache/com.litefeel.bitmapfontimporter@f6dbf0be50/Editor/BFImporter.cs:42)
litefeel.BFImporter.Editor.BFImporter.OnPostprocessAllAssets (System.String[] importedAssets, System.String[] deletedAssets, System.String[] movedAssets, System.String[] movedFromAssetPaths) (at Library/PackageCache/com.litefeel.bitmapfontimporter@f6dbf0be50/Editor/BFImporter.cs:16)
System.Reflection.MonoMethod.Invoke (System.Object obj, System.Reflection.BindingFlags invokeAttr, System.Reflection.Binder binder, System.Object[] parameters, System.Globalization.CultureInfo culture) (at <695d1cc93cca45069c528c15c9fdd749>:0)
Rethrow as TargetInvocationException: Exception has been thrown by the target of an invocation.
System.Reflection.MonoMethod.Invoke (System.Object obj, System.Reflection.BindingFlags invokeAttr, System.Reflection.Binder binder, System.Object[] parameters, System.Globalization.CultureInfo culture) (at <695d1cc93cca45069c528c15c9fdd749>:0)
System.Reflection.MethodBase.Invoke (System.Object obj, System.Object[] parameters) (at <695d1cc93cca45069c528c15c9fdd749>:0)
UnityEditor.AssetPostprocessingInternal.InvokeMethod (System.Reflection.MethodInfo method, System.Object[] args) (at <5e558c48ff1a4d2c8e2f0193394d0750>:0)
UnityEditor.AssetPostprocessingInternal.PostprocessAllAssets (System.String[] importedAssets, System.String[] addedAssets, System.String[] deletedAssets, System.String[] movedAssets, System.String[] movedFromPathAssets) (at <5e558c48ff1a4d2c8e2f0193394d0750>:0)