Com.aspose.words generates java.util.EmptyStackException

Hello,

We use aspose-words-15.2.0-jdk16 library.

Recently we have faced with an exception which was generated after attempt to perform save opearation with com.aspose.words.Document object.

Please check.

java.util.EmptyStackException
at java.util.Stack.peek(Stack.java:85)
at java.util.Stack.pop(Stack.java:67)
at com.aspose.words.zz9O.zz2I(Unknown Source)
at com.aspose.words.zz9O.zzN2(Unknown Source)
at com.aspose.words.zz9O.zz33(Unknown Source)
at com.aspose.words.zz9O.moveNext(Unknown Source)
at com.aspose.words.zzZ33.zzZ(Unknown Source)
at com.aspose.words.zzZ33.zzZ(Unknown Source)
at com.aspose.words.zzZ33.zzZ(Unknown Source)
at com.aspose.words.zzZ32.zzZ(Unknown Source)
at com.aspose.words.zz2F.zzQ(Unknown Source)
at com.aspose.words.zz2F.zzS(Unknown Source)
at com.aspose.words.zz2F.zzV(Unknown Source)
at com.aspose.words.zz2F.zzZh(Unknown Source)
at com.aspose.words.zz2F.zzZ(Unknown Source)
at com.aspose.words.zz2F.zzk(Unknown Source)
at com.aspose.words.Document.zz4O(Unknown Source)
at com.aspose.words.Document.zzZ(Unknown Source)
at com.aspose.words.Document.zzZ(Unknown Source)
at com.aspose.words.Document.save(Unknown Source)

The steps we use aspose-words lib are:

  1. Create Document object from input stream.

  2. Generate bar code Image object (using BarCodeBuilder).

  3. With a DocumentBuilder add an Image object to the Document object.

  4. Save document object.

Of cause it is much simple to check the code which is not exact code form our application but reflects the main functional parts.

Main.rar

Another diffculty is that I cannot reproduce the problem on a local host (I have Windows as OS).

But the problem 100% reproducible on a Linux server where our target application is running.

Also want to clarify that it reproduces with only one type of the docx files: the files which contain a lot of footnotes in\to the tables.

doc.docx

I would very appreciate for your help and suggestions how to avoid the problem.

Thanks a lot,

Vasily

Hi Vasily,
I was able to reproduce the issue even on a Windows machine using the latest version of Aspose.Words. Can you please also check with 15.3.0 version on Windows and let us know if you get any success in this case?
Best Regards,

Hi Muhammad,
Thanks for a quick response!

Unfortunately I was not able to reproduce it locally on Windows. May be you can give me a piece of advice how to do it?

I will check option with an upgrade in general but not sure it would be a potential option for us in near future.
By the way I can download only 15.2.0 version from Aspose site…

Is there any another way how to avoid an exception?

Vasily.

Hi Muhammad,

Finally I have found a link where I can download 15.3.0.

Thanks,
Vasily.

Hi Muhammad,

Upgrade to 15.3.0 did not help. I still see an exception.

Vasily.

Hi Vasily,
Just to confirm we are on the same page, I get ‘Index was out of range. Must be non-negative and less than the size of the collection.’ exception on my end when I try to save your shared document as PDF even without making any change to it and this will be the logged issue.
Best Regards,

Hi Muhammad,

I have provided an exception in the first post.
I do not see the words like “Index was out of range. Must be non-negative and less than the size of the collection.” in the exception stack and output in general.
So, I cannot say for sure that it is the same issue.

If you think that the fix for Index was out of range. Must be non-negative and less than the size of the collection.
will solve our problem then it is ok with me. (When it is planned to be delivered?)
Otherwise I would like to ask you to try to reproduce an exception in the first post one more time.
Feel free to contact me for any details regarding issue.

Thank you in advance!

Vasily.

Hi Vasily,
The issue has been logged into our issue tracking system as WORDSNET-11803. We will keep you updated on this issue in this thread.
Best Regards,

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

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

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