Runtime exception issue


I am getting an exception thrown on both my windows 7 (native) machine and my Mac Mini running a windows 7 VM.  Here is what I am encountering:

{Type:"System.InvalidOperationException",Message:"Collection was modified after the enumerator was instantiated.",InnerException:null,StackTrace:"   at System.ThrowHelper.ThrowInvalidOperationException(ExceptionResource resource)   at System.Collections.Generic.Queue`1.Enumerator.MoveNext()   at System.Linq.Enumerable.LastOrDefault[TSource](IEnumerable`1 source)   at Sanderling.Exe.App.get_FromMotionExecutionMemoryMeasurementTimeMin()   at Sanderling.Exe.App.get_MeasurementRecentEnoughTime()   at Sanderling.Exe.App.get_RequestedMeasurementTime()   at Sanderling.Exe.App.InterfaceExchange()   at Sanderling.Exe.App.Timer_Tick(Object sender, Object e)   at System.Windows.Threading.DispatcherTimer.FireTick(Object unused)   at System.Windows.Threading.ExceptionWrapper.InternalRealCall(Delegate callback, Object args, Int32 numArgs)   at System.Windows.Threading.ExceptionWrapper.TryCatchWhen(Object source, Delegate callback, Object args, Int32 numArgs, Delegate catchHandler)",TargetSite:"ThrowInvalidOperationException"}

I see it much more often on the Mac than the PC so my guess is it is somehow load related.  In fact, on the Mac Mini I have had to modify the script in certain locations to loop until a non-null value is returned from the memory model.  This issue seems to be getting worse, as it is occuring on the Mac Mini more often than a few weeks ago.

I am currently running Sanderling v16.02.04, but I have also seen it in v16.00.19.  I will try the new version to see if I can reproduce it there as well.

Thank you!

I recently became aware of and fixed a bug which as far as I see caused exactly this exception. And yes from reviewing the code I assume it occured more often with higher load.

I don’t expect you will see this error in v16.03.09