Issue while converting word document in html

I am converting word document in java, getting null pointer exception.
aspose word version: 23.10 and jdk17.

exception trace: Exception in thread "main" java.lang.NullPointerException: Cannot invoke "com.aspose.words.zzYtQ.zzWNb()" because the return value of "com.aspose.words.zzWWp.zzZ4A()" is null
	at com.aspose.words.zzZ3r.zzXZC(Unknown Source)
	at com.aspose.words.zzWWp.zzXMY(Unknown Source)
	at com.aspose.words.zzWWp.zzXQy(Unknown Source)
	at com.aspose.words.zzWWp.zzWlV(Unknown Source)
	at com.aspose.words.zzZ3r.zzXXU(Unknown Source)
	at com.aspose.words.zzWWp.zzW8p(Unknown Source)
	at com.aspose.words.zzWWp.zzWcY(Unknown Source)
	at com.aspose.words.zzXpS.zzYK0(Unknown Source)
	at com.aspose.words.zzYRO.zzYkb(Unknown Source)
	at com.aspose.words.zzYRO.zzYkb(Unknown Source)
	at com.aspose.words.zzY5T.zzW9n(Unknown Source)
	at com.aspose.words.zzY5T.zzu8(Unknown Source)
	at com.aspose.words.zzY5T.zzWqy(Unknown Source)
	at com.aspose.words.zzY5T.zzYFL(Unknown Source)
	at com.aspose.words.zzZNv.zzYkb(Unknown Source)
	at com.aspose.words.zzWLK.zzYkb(Unknown Source)
	at com.aspose.words.Document.zzxE(Unknown Source)
	at com.aspose.words.Document.zzYkb(Unknown Source)
	at com.aspose.words.Document.zzYkb(Unknown Source)
	at com.aspose.words.Document.save(Unknown Source)
	at com.sirionlabs.api.Main6.main(Main6.java:33)

java code is here:

com.aspose.words.License license = new com.aspose.words.License();
license.setLicense(new FileInputStream("/home/mohitkumar/IdeaProjects/contract-authoring/auto-tagging/target/test-classes/aspose-licence"));

Document document;
InputStream stream = null;
try
{
    document = new Document("/home/mohitkumar/Desktop/document1.docx");
}
catch (Exception ex)
{
    throw new Exception("");
}
finally
{
    if (stream != null)
    {
        stream.close();
    }
}


HtmlSaveOptions opts = new HtmlSaveOptions(SaveFormat.HTML);
opts.setHtmlVersion(HtmlVersion.HTML_5);

ByteArrayOutputStream byteArrayOutputStream = new ByteArrayOutputStream();
document.save(byteArrayOutputStream, opts);

@mohitkumar1991 Could you please attach your problematic input document here fore testing? We will check the issue and provide you more information.

It is a client document, which we can not share,
If i change even one letter and save the document, the issue is not reproducible.

@mohitkumar1991 Unfortunately, we cannot analyze the problem without the problematic document.