Getting an Exception on Model Change

Hello,

I am getting the below Exception on Model Change.
Exception Details:
- Error Type: System.InvalidOperationException
- Error Description: Collection was modified; enumeration operation may not execute.
- Source: mscorlib
- Stack Trace:
- at System.ThrowHelper.ThrowInvalidOperationException(ExceptionResource resource)
- at System.Collections.Generic.List`1.Enumerator.MoveNextRare()
- at System.Collections.Generic.List`1.Enumerator.MoveNext()
- at Northwoods.GoXam.Model.UndoManager.#nt(String #i9)
- at Northwoods.GoXam.LayoutManager.#Yf()
- at Northwoods.GoXam.LayoutManager.#Xf()
- at System.Windows.Threading.ExceptionWrapper.InternalRealCall(Delegate callback, Object args, Int32 numArgs)
- at MS.Internal.Threading.ExceptionFilterHelper.TryCatchWhen(Object source, Delegate method, Object args, Int32 numArgs, Delegate catchHandler)
- Target Site: Void ThrowInvalidOperationException(System.ExceptionResource)
- in System.ThrowHelper, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
Exception Hierarchy:
- System.InvalidOperationException
-- System.SystemException
--- System.Exception
---- System.Object
Class Hierarchy:
- System.ThrowHelper
-- System.Object
It seems to be some issue in UndoManager.But unable to figure it out. Any help would be great.
Thanks,
Abdeali

Could you describe what’s happening when the exception occurs? How reliable is this exception?

If you disable layout animation, does the problem still occur? You can turn it off by setting Diagram.LayoutManager.Animated = false.