LayoutCollector.GetStartPageIndex throws System.ArgumentNullException using .NET

Hi,
We tried to get the StartPageIndex from the revision of compare result of the attached files. Document_v4 vs Document_v5.
Compare Issue - LayoutCollecotr.GetStartPageIndex.zip (569.9 KB)

Aspose.Words Version: 21.1.0

We are getting the following error from this call stack when getting the StartPageIndex from a revision using the layoutcollector.

Code:
LayoutCollector layoutCollector = new LayoutCollector(document);
int startPageIndex = layoutCollector.GetStartPageIndex(revision.ParentNode);

Error Detail
Message=Value cannot be null.
Parameter name: key

at System.Collections.Generic.Dictionary`2.FindEntry (mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089)
at System.Collections.Generic.Dictionary`2.TryGetValue (mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089)
at Aspose.Words.Layout.LayoutCollector. (Aspose.Words, Version=21.1.0.0, Culture=neutral, PublicKeyToken=716fcc553a201e56)
at Aspose.Words.Layout.LayoutCollector. (Aspose.Words, Version=21.1.0.0, Culture=neutral, PublicKeyToken=716fcc553a201e56)
at Aspose.Words.Layout.LayoutCollector.GetStartPageIndex (Aspose.Words, Version=21.1.0.0, Culture=neutral, PublicKeyToken=716fcc553a201e56)

@ashimbatajoo

Please create a standalone console application (source code without compilation errors) that helps us to reproduce your problem on our end and attach it here for testing. We will investigate the issue and provide you information on it.

@tahir.manzoor,

Here is the sample console application.
I have attached the sample file at the location: “Sample File\SampleFile.docx”.
Please make sure to set the license as the issue is not reproducible in the trial version because all the revisions are not fetched.

AsposeIssue.zip (320.6 KB)
SampleFile.docx (303.9 KB)

@ashimbatajoo

We have tested the scenario and have managed to reproduce the same issue at our side. For the sake of correction, we have logged this problem in our issue tracking system as WORDSNET-22112. You will be notified via this forum thread once this issue is resolved.

We apologize for your inconvenience.

Hi @tahir.manzoor,

Were we able to fix the issue?

We are facing the same issue with some other documents.
Can you please share what actually causes this issue?
We can prevent that in the documents for now as a temporary fix.

This issue is impacting our production services.
So It would be really helpful if you can share the expected time frame for the issue to be fixed.

Thanks

@ashimbatajoo

The shared issue has been resolved and its fix is available in the latest version of Aspose.Words for .NET 21.5. So, please use Aspose.Words for .NET 21.5.

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