Open & Convert Word WordML Document with <w:tab w:val="start" /> using C# .NET

We have discovered that latest version of Aspose.Words (20.10.0) fails on attempt to open the following simple WordML file:

<?xml version="1.0" encoding="UTF-8"?>
<w:wordDocument xmlns:w="http://schemas.microsoft.com/office/word/2003/wordml" xmlns:aml="http://schemas.microsoft.com/aml/2001/core" xmlns:dt="uuid:C2F41010-65B3-11d1-A29F-00AA00C14882" xmlns:fo="http://www.w3.org/1999/XSL/Format" xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:sl="http://schemas.microsoft.com/schemaLibrary/2003/core" xmlns:v="urn:schemas-microsoft-com:vml" xmlns:w10="urn:schemas-microsoft-com:office:word" xmlns:wsp="http://schemas.microsoft.com/office/word/2003/wordml/sp2" xmlns:wx="http://schemas.microsoft.com/office/word/2003/auxHint" xmlns:st1="urn:schemas-microsoft-com:office:smarttags" xmlns:tlr="http://www.elite.com/functions" xmlns:kmf="http://www.kleinmundo.com/functions" xmlns:trf="http://www.elite.com/functions" xmlns:fn="http://www.w3.org/2005/xpath-functions" xmlns:functx="http://www.functx.com" xmlns:xs="http://www.w3.org/2001/XMLSchema">		
	<w:body>
    <w:p>
      <w:pPr>
        <w:tabs>
          <w:tab w:val="start" w:pos="720"/>
        </w:tabs>
      </w:pPr>
    </w:p>
	</w:body>
</w:wordDocument>

new Document(inFile) fails with the following error message:

Unhandled Exception: Aspose.Words.FileCorruptedException: The document appears to be corrupted and cannot be loaded. ---> Sy
stem.NullReferenceException: Object reference not set to an instance of an object.
   at ☼???.♥(String ☻, ☻??? ♥)
   at ♥???(☻??? ☻, ♠??? ♥, ☻??? ♣)
   at ♥???.☻(♥??? ☻, ♠??? ♥, ☻??? ♣)
   at ♠???.☻(♥??? ☻, Paragraph ♥)
   at ♠??????????☻(♥??? ☻)
   at ♫???.♫???????♥(♥??? ☻)
   at???.♥(♥??? ☻)
   at???.☻(♥??? ☻)
   at ♫?????????☻()
   at Aspose.Words.Document.♥(Stream ☻, LoadOptions ♥)
   --- End of inner exception stack trace ---
   at Aspose.Words.Document.♥(Stream ☻, LoadOptions ♥)
   at Aspose.Words.Document.☻(Stream ☻, LoadOptions ♥)
   at Aspose.Words.Document..ctor(String fileName, LoadOptions loadOptions)
   at Aspose.Words.Document..ctor(String fileName)
   at Convert2Word.Old.WordUtil.BaseConvert(String inFile, String outFile) in D:\_\!work\Buchanan\Convert2Word\Convert2Word.
Old\WordUtil.cs:line 36
   at C2W.Program.Main(String[] args) in D:\_\!work\Buchanan\Convert2Word\Convert2Word\Program.cs:line 15

It is interesting, but older version of Aspose.Words (e.g. 15.11.0 in our case) works fine. MS Word also can open such WordML file without any errors.

Do you have any suggestions?

Btw, the issue disappears if you change w:val="start" to w:val="left". But I’m not sure whether it is necessary, because as I examined both ISO/IEC 29500-1:2016 and ISO/IEC 29500-4:2016 Standards contain “start” enumeration option for val attribute insite tab element.

@Vitaly_Filatenko,

Please ZIP and upload a simplified Word document (you are getting this problem with) here for testing. We will then investigate the issue on our end and provide you more information.

Is it joke? Is it so problematic to create new file by copy-pasting its content from the post??

But ok, I can do it for you, of course.

InputTruncated.zip (602 Bytes)

@Vitaly_Filatenko,

Thank you for providing detailed information about this bug. You are right; the issue does not appear when using old 15.11 version of Aspose.Words. For the sake of any corrections in the latest versions of API, we have logged this problem in our issue tracking system with ID WORDSNET-21270. We will further look into the details of this problem and will keep you updated on the status of the linked issue. We apologize for your inconvenience.

The issues you have found earlier (filed as WORDSNET-21270) have been fixed in this Aspose.Words for .NET 20.11 update and this Aspose.Words for Java 20.11 update.