Exception within Aspose.Words.Document.UpdateFields()

Hello,

We are seeing the following exception. The document within which this is occurring is essentially empty except for the content of another document being appended. The document that is being appended is not indicating as being corrupt in any way by validation with the Microsoft Office Binary File Format Validator, and it is possible to open that document and perform a Cltl-Shift-U (to update all fields) without error.

Unfortunately, the document that is being appended is of an extremely confidential nature, so I cannot forward it here.

What can you say about how this cast exception could occur within this method?

Error: Exception occured creating document
CSU_GEN_337480754_9807_2011 - 12 - 20_11 - 50 - 19 - 723. docxMessage: Unable to cast
object of typeæ x4adf554d20d941a6.x577d2faf9a871f11Æ to type
‘x4adf554d20d941a6.xf543de5d109f4fda’… Stacktrace: at
x4adf554d20d941a6.xf543de5d109f4fda.xd5da23b762ce52a2()
at x4adf554d20d941a6.x6d3ade29d016f4ea.x8082435722ac4759(x56410a8dd70087c5 x5906905c888d3d98)
at x4adf554d20d941a6.x6d3ade29d016f4ea.x58c64f348653f92a()
at x4adf554d20d941a6.x6d3ade29d016f4ea.x5f6867bc5a977cb1()
at x4adf554d20d941a6.x6d3ade29d016f4ea.xc3819e13f60dd8e6(xf6937c72cebe4ad1 x311e7a92306d7199, Int32 xbfb9ad5ef64f6dc5)
at x4adf554d20d941a6.x09e62a55cab70965.x5de571cf1cd1652c(xf6937c72cebe4ad1 x311e7a92306d7199)
at x4adf554d20d941a6.x09e62a55cab70965.xc3819e13f60dd8e6(xf6937c72cebe4ad1 x311e7a92306d7199, Int32 xcd3a9f82634fe5f9)
at x4adf554d20d941a6.x71da84fff8849445.xc3819e13f60dd8e6(x53cb1139c5c64ee6 xd7e5673853e47af4, Int32 xcd3a9f82634fe5f9, Boolean x3175070523842c98)
at x4adf554d20d941a6.x4ddd0723770f9758.xb47a6df2eae4ba51()
at x4adf554d20d941a6.x4ddd0723770f9758.xc3819e13f60dd8e6(x3d1ad8ce75f0db3a xd3311d815ca25f02, Int32 xd284dd7d525c5491, Boolean x3175070523842c98, Boolean x4097fa47409be495)
at x4adf554d20d941a6.xad082dd52abba9b2.x05220cdc6b4425eb(Int32 x4d5aabc7a55b12ba, Boolean x3175070523842c98, Boolean x4097fa47409be495)
at x4adf554d20d941a6.xad082dd52abba9b2.xc3819e13f60dd8e6(x78752dd11b777af5 xa374c2b6b8c56b41, Int32 xd284dd7d525c5491, Boolean x3175070523842c98, Boolean x4097fa47409be495)
at x4adf554d20d941a6.x3f7228e953be72ed.xf7d3bc7f0919c58b()
at x4adf554d20d941a6.x3f7228e953be72ed.x74307e02c5218152()
at x4adf554d20d941a6.x3f7228e953be72ed.xc3819e13f60dd8e6(x852fe8bb5ac31098 xe3e287548b3d01f5, Int32 xd284dd7d525c5491)
at x4adf554d20d941a6.x4af2add38e634ad4.xcbc2273143eac9ec(x852fe8bb5ac31098 xb6842aa1e60562e1)
at x4adf554d20d941a6.x4af2add38e634ad4.xc3819e13f60dd8e6(xc7f90d9c7c51cede xbbe2f7d7c86e0379)
at x4adf554d20d941a6.xea876d525d28ff96.xc3819e13f60dd8e6(x398b3bd0acd94b61 xd7e5673853e47af4)
at x4adf554d20d941a6.xac6c82c74ce247fb.xc3819e13f60dd8e6(Boolean xfad304b5f8f3bb5b)
at x4adf554d20d941a6.xa268fdb9ca040dde.xc3819e13f60dd8e6(Boolean xfad304b5f8f3bb5b)
at x59d6a4fc5007b7a4.xcde671c53995c411.xd9db07500873ae98(Document x3664041d21d73fdc, xdeb77ea37ad74c56 xdfde339da46db651)
at xfbd1009a0cbb9842.x2de8d443b21560d5.xa20689e5bf116840()
at xfbd1009a0cbb9842.xbf9ddf72e1283af9.x18dfca7c5fd2402f()
at xfbd1009a0cbb9842.xfedf115fd9c03862.xdd6cf0348a23f220(xcf417e2db4fe9ed3 xe00c282e1a49fcfb)
at xfbd1009a0cbb9842.xfedf115fd9c03862.x384c03e4298b53bf()
at Aspose.Words.Document.UpdateFields()
at DocBuilder.DocumentWriter.SaveDocument(String fileName) in c:\dev\DocBuilderEvolution\DocBuilderEvolution\DocBuilderLib\DocumentWriter.cs:line 236
at DocBuilder.DocumentGenerator.generateDocument(DocumentData documentData) in c:\dev\DocBuilderEvolution\DocBuilderEvolution\DocBuilderLib\DocumentGenerator.cs:line 100
at DocBuilderWebService.Service.generateDocument(DocumentData documentData) in c:\dev\DocBuilderEvolution\DocBuilderEvolution\DocBuilderWebService\Service.asmx.cs:line 43

Hello
Thanks for your inquiry. Unfortunately, it is difficult to say what the problem is without the document and code. I need this document and code to reproduce the problem on my side.
It is safe to attach files in the forum. If you attach your document here, only you and Aspose staff members can download it. Also you can send the file to my e-mail as described here:
https://forum.aspose.com/t/aspose-words-faq/2711
You can also remove any sensitive information by replacing it with dummy data instead.
Best regards,