ArrayIndexOutOfBoundsException saving document

A docx file I generated (not using Aspose) opens fine in the latest MS Word and Libre Office but fails when I use Aspose (Java version 16.4.0) and just call getPageCount:

val bytes = Files.readAllBytes(new java.io.File(InFile).toPath)
val doc = new Document(new java.io.ByteArrayInputStream(bytes))
println("In Page count: " + doc.getPageCount)

This is almost certainly a problem with my docx file (attached) but all other tools seem able to handle it. The stack trace is shown below.

Thanks for any help.

Regards, Elaine

Exception in thread "main" java.lang.ArrayIndexOutOfBoundsException: 3
at com.aspose.words.zzX.zzZ(Unknown Source)
at com.aspose.words.zzX.zzZ(Unknown Source)
at com.aspose.words.zz3.zzW(Unknown Source)
at com.aspose.words.zzZ1L.zzZoz(Unknown Source)
at com.aspose.words.zzYO.getWidth(Unknown Source)
at com.aspose.words.zzYO.zzPX(Unknown Source)
at com.aspose.words.zzYO.getX(Unknown Source)
at com.aspose.words.zzYO.zzPX(Unknown Source)
at com.aspose.words.zzX.zzZ(Unknown Source)
at com.aspose.words.zzX.zzQ(Unknown Source)
at com.aspose.words.zzW8.zzZ(Unknown Source)
at com.aspose.words.zzZ52.zzZ(Unknown Source)
at com.aspose.words.zzXJ.zzwh(Unknown Source)
at com.aspose.words.zzXJ.zzY(Unknown Source)
at com.aspose.words.zzZDK.zzZDD(Unknown Source)
at com.aspose.words.zzZDK.zzU(Unknown Source)
at com.aspose.words.zzZD1.zzx(Unknown Source)
at com.aspose.words.zzZ36.zzS9(Unknown Source)
at com.aspose.words.zzBI.zzXH(Unknown Source)
at com.aspose.words.zzBJ.zzax(Unknown Source)
at com.aspose.words.zzZR8.zzZ(Unknown Source)
at com.aspose.words.Document.updatePageLayout(Unknown Source)
at com.aspose.words.Document.zzXJ(Unknown Source)
at com.aspose.words.Document.getPageCount(Unknown Source)


Hi Elaine,


Thanks for your inquiry.

While using the latest version of Aspose.Words i.e. 16.4.0, we managed to reproduce this issue on our end. We have logged this issue in our bug tracking system. The ID of this issue is WORDSNET-13573. Your request has also been linked to the appropriate issue and you will be notified as soon as it is resolved. Sorry for the inconvenience.

Best regards,

The issues you have found earlier (filed as WORDSNET-13573) have been fixed in this .NET update and this Java update.


This message was posted using Notification2Forum from Downloads module by aspose.notifier.