We're sorry Aspose doesn't work properply without JavaScript enabled.

Free Support Forum - aspose.com

Unexpected subdocument type exception with document using Aspose.Words 10.1

The attached file is a stripped-down copy of a file one of our clients is attempting to update. The file fails to save. The stack trace is at the end of my message. Interestingly, in this document is an obviously screwed up image. I don't think it is in the header, but if you move the text box, you'll notice that the line moves along with it. If you move the line out of the header, then you can delete the text box and then Aspose will deal with the file as expected. Microsoft Word saves the file without issue, of course (the geniouses allow a document to be saved in just about any condition; I do not envy your job of trying to handle it all).

I just downloaded Aspose.Words v. 10.1. I will look for the next hotfix and try it in the next couple of days, but is this issue a known issue, and what can be done to gracefully handle the problem and continue saving successfully, except for waiting on a code fix from you? yes, we COULD manually update the file, but there are hundreds. Any other suggestions?

Thanks for your assistance; you guys are great!

The stack trace:

Inner Exception Type: System.InvalidOperationException
Inner Exception: Unexpected subdocument type.
Inner Source: Aspose.Words
Inner Stack Trace: at xa604c4d210ae0581.x93b05c1ad709a695.x7625b7f02c65c1cd(x9e131021ba70185c x77b06614416ee4d3)
at x9e260ffa1ac41ffa.x8b8ab0cf32b35f3c.x4d04bff8a4c56cac(ShapeBase x5770cdefd8931aa9)
at x9e260ffa1ac41ffa.x8b8ab0cf32b35f3c.x7ab5ac84420414e0(ShapeBase x5770cdefd8931aa9)
at x9e260ffa1ac41ffa.x8b8ab0cf32b35f3c.x84e71ff4edf2ec72(ShapeBase x5770cdefd8931aa9)
at x9e260ffa1ac41ffa.x8b8ab0cf32b35f3c.x1a2622a1866b8f97(ShapeBase x5770cdefd8931aa9)
at x9e260ffa1ac41ffa.x8b8ab0cf32b35f3c.x1f70c910ab814928(Shape x5770cdefd8931aa9)
at x9e260ffa1ac41ffa.x163859bfa28558c4.VisitShapeStart(Shape shape)
at Aspose.Words.Drawing.Shape.x2449520719b1e37e(DocumentVisitor x672ff13faf031f3d)
at Aspose.Words.CompositeNode.xf7ae36cd24e0b11c(DocumentVisitor x672ff13faf031f3d)
at Aspose.Words.Drawing.Shape.Accept(DocumentVisitor visitor)
at Aspose.Words.CompositeNode.x464d2134480a7bf2(DocumentVisitor x672ff13faf031f3d)
at Aspose.Words.CompositeNode.xf7ae36cd24e0b11c(DocumentVisitor x672ff13faf031f3d)
at Aspose.Words.Paragraph.Accept(DocumentVisitor visitor)
at Aspose.Words.CompositeNode.x464d2134480a7bf2(DocumentVisitor x672ff13faf031f3d)
at Aspose.Words.CompositeNode.xf7ae36cd24e0b11c(DocumentVisitor x672ff13faf031f3d)
at Aspose.Words.Drawing.Shape.Accept(DocumentVisitor visitor)
at Aspose.Words.CompositeNode.x464d2134480a7bf2(DocumentVisitor x672ff13faf031f3d)
at Aspose.Words.CompositeNode.xf7ae36cd24e0b11c(DocumentVisitor x672ff13faf031f3d)
at Aspose.Words.Paragraph.Accept(DocumentVisitor visitor)
at Aspose.Words.CompositeNode.x464d2134480a7bf2(DocumentVisitor x672ff13faf031f3d)
at Aspose.Words.CompositeNode.xf7ae36cd24e0b11c(DocumentVisitor x672ff13faf031f3d)
at Aspose.Words.Body.Accept(DocumentVisitor visitor)
at x9e260ffa1ac41ffa.x163859bfa28558c4.x51ee56decc29a9da(Section xb32f8dd719a105db)
at x9e260ffa1ac41ffa.x163859bfa28558c4.x160a0bf4de8f6bd0()
at x9e260ffa1ac41ffa.x163859bfa28558c4.x8cac5adfe79bc025(x8556eed81191af11 x5ac1382edb7bf2c2)
at Aspose.Words.Document.xf381a641001e6830(Stream xcf18e5243f8d5fd3, String xafe2f3653ee64ebc, SaveOptions xc27f01f21f67608c)
at Aspose.Words.Document.Save(Stream stream, SaveOptions saveOptions)
at Aspose.Words.Document.Save(Stream stream, SaveFormat saveFormat)

Hi

Thanks for your request. However, unfortunately, I cannot reproduce the problem on my side. I can successfully open/save the attached document using Aspose.Words.

Could you please provide us a simple code that will allow reproducing this issue? We will check it and provide you more information.

Best regards,

Hello,

I am still using 10.1 and have the following minimum set of steps which duplicates the problem:

Open the document with Aspose with an object name of asposeObj.

Call asposeObj.UpdateFields();

Call asposeObj.Save(newName);

This is what will cause the error for me.

Good luck!

Hi

Thank you for additional information. I managed to reproduce the problem on my side. Your request has been linked to the appropriate issue. You will be notified as soon as it is resolved.

Best regards,

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


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