java.util.EmptyStackException when using Apose.words for java to convert docx to pdf

test_emptystackexception.docx (50.2 KB)

We are using Aspose.Words for Java version 19.10 in our application. The “java.util.EmptyStackException” occurred when we try to convert some docx document to pdf:

java.util.EmptyStackException
	at java.base/java.util.Stack.peek(Stack.java:102)
	at java.base/java.util.Stack.pop(Stack.java:84)
	at com.aspose.words.zzZLA.zzs(Unknown Source)
	at com.aspose.words.zzZLB.zzZhD(Unknown Source)
	at com.aspose.words.zzZL7.zzZ(Unknown Source)
	at com.aspose.words.zzZKY.zzZ(Unknown Source)
	at com.aspose.words.zzZLB.zzX(Unknown Source)
	at com.aspose.words.zzZLB.zzZ(Unknown Source)
	at com.aspose.words.Document.zzZ(Unknown Source)
	at com.aspose.words.zzZZO.zzY(Unknown Source)
	at com.aspose.words.zzZZO.zzZ(Unknown Source)
	at com.aspose.words.zzZF1.zzZ(Unknown Source)
	at com.aspose.words.Document.zzZ(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)

Attached is the problematic testing document. Cloud anyone can tell me the root cause for this exception?

Many thanks.

@bryantchau I cannot reproduce the problem using the latest 23.4 version of Aspose.Words for Java. So, please try updating your version of Aspose.Words to the latest.

1 Like

@alexey.noskov Thanks for your reply. Before upgrading the Aspose.Words version, is it possible to find out the reason for this document which causes the emptystackexception in version 19.10?

Many thanks.

@bryantchau Unfortunately, it is difficult to tell what causes the problem in old version of Aspose.Words. 42 new versions of Aspose.Words have been released since 19.10 version, each release includes about 60-80 fixes and improvements:
https://docs.aspose.com/words/java/aspose-words-for-java/