Bug report: A value with the specified key has already been added on Aspose.Words Document.Clone

Hi Aspose,

we get sometime the exception on a Aspose.Word.Document.Clone():
A value with the specified key has already been added.: at ? . (Int32 , , Boolean ) at Aspose.Words.TableStyle.(TableStyle , TableStyle ) at Aspose.Words.TableStyle.c74e2ee5mu6ec4cygwrqxpp59zdd8vzh? () at Aspose.Words.StyleCollection.(DocumentBase ) at Aspose.Words.DocumentBase.yqnu5w7h4u738xd5mgd378cvp6bv5ld4? (Boolean , ?? ) at Aspose.Words.Document.yqnu5w7h4u738xd5mgd378cvp6bv5ld4? (Boolean , ?? )

We use version 19.9 (“packages\Aspose.Words.19.9.0\lib\net40\Aspose.Words.dll”).

We get this not get every time but 3 times last week.

It like me not possible that a Document.Clone() must create a duplicate value or someting?

Thanks for your help,

@GazpromEnergy

Could you please attach your input Word document here for testing? We will investigate the issue on our side and provide you more information.

Hi @tahir.manzoor

We have reproduced this issue on version 19.9 with parallel for each on our Word file with Document.Clone().

We have test the same issue on version 20.1 and the issue is gone:smiley:.

We do a upgrade to this version and temporary do a lock on the Document.Clone() for bugfix release.

This ticket can be closed.

Thanks,

Matthijs

@GazpromEnergy

It is nice to hear from you that your problem has been solved. Please feel free to ask if you have any question about Aspose.Words, we will be happy to help you.