I have a diagram that I’m binding to a GraphModel<MyType, string>. I am setting NokeKeyPath, ToNodesPath, NodeCategoryPath, GroupNodePath, NodeIsGroupPath and NodesSource in order to give myself an expandable layout with links between top level nodes. These top level nodes are listed in a selector so that users can choose which ones are displayed in the diagram. 99% of the time everything works as expected, but sometimes, when I am adding / removing a lot of nodes to the model (maybe of the order of hundreds of changes at once) I receive the following exception which I can’t handle as it seems to be on a background thread:
System.IndexOutOfRangeException: Index was outside the bounds of the array.
at System.Windows.Threading.ExceptionWrapper.InternalRealCall(Delegate callback, Object args, Int32 numArgs)
Reproducing this error is tricky, but when it does occur it’s fatal as the diagram simply fails to work afterwards.
I was initially getting this error with version 22.214.171.124 of the library, but I’ve upgraded to the 126.96.36.199 beta and it’s still happening (although possibly less frequently?).
Can anyone help?