Hello,
We have an exception occuring randomly on the method "DocumentModel.Clone(bool descendants)’
In our code, we previously load an docx as a template.
It worked great for weeks, and now this error randomly occurs.
System.InvalidOperationException: Collection was modified; enumeration operation may not execute.
at System.Collections.Generic.List1.Enumerator.MoveNextRare() at . (DocumentModel , DocumentModel ) at . [T](T , Action
2 )
at .(Element , Boolean , ImportMapping )
at GemBox.Document.DocumentModel.Clone(Boolean cloneDescendants)
at xxxxx.BAL.yyyyyyyy.GeneratePdf.GenerateSpecificDocument(SpecificDocument specificDocument) in .…\pipelines\Compilation_MicroServices.….…\GeneratePdf.cs:line 767
[…]
at System.Threading.Tasks.Parallel.<>c__DisplayClass33_02.<ForEachWorker>b__0(Int32 i) at System.Threading.Tasks.Parallel.<>c__DisplayClass19_0
1.b__1(RangeWorker& currentWorker, Int32 timeout, Boolean& replicationDelegateYieldedBeforeCompletion)
— End of stack trace from previous location where exception was thrown —
at System.Threading.Tasks.Parallel.<>c__DisplayClass19_01.<ForWorker>b__1(RangeWorker& currentWorker, Int32 timeout, Boolean& replicationDelegateYieldedBeforeCompletion) at System.Threading.Tasks.TaskReplicator.Replica
1.ExecuteAction(Boolean& yieldedBeforeCompletion)
at System.Threading.Tasks.TaskReplicator.Replica.Execute()
Using Gembox.Document Version=“33.0.1086”
Thanks for your help