You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When the WPF application I was attached to reloaded its data (and the visual tree likely was refreshed as well), Snoop triggered an exception that crashed the whole WPF app. Here is the stack trace:
System.InvalidOperationException: Collection was modified; enumeration operation may not execute.
at System.ThrowHelper.ThrowInvalidOperationException(ExceptionResource resource)
at System.Collections.Generic.List`1.Enumerator.MoveNextRare()
at System.Collections.Generic.List`1.Enumerator.MoveNext()
at System.Linq.Enumerable.WhereEnumerableIterator`1.MoveNext()
at System.Collections.Generic.List`1..ctor(IEnumerable`1 collection)
at System.Linq.Enumerable.ToList[TSource](IEnumerable`1 source)
at Snoop.Shell.VisualTreeProviderExtensions.NodeName(VisualTreeItem item)
at Snoop.Shell.VisualTreeProvider.GetTreeItem(String path)
at Snoop.Shell.VisualTreeProvider.OnSyncSelectedItem(Object _)
at System.Threading.TimerQueueTimer.CallCallbackInContext(Object state)
at System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx)
at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx)
at System.Threading.TimerQueueTimer.CallCallback()
at System.Threading.TimerQueueTimer.Fire()
at System.Threading.TimerQueue.FireNextTimers()
at System.Threading.TimerQueue.AppDomainTimerCallback()
The text was updated successfully, but these errors were encountered:
To be honest, i think this is a bug in snoop itself.
We are using linq here which evaluates lazy and we are using a timer to refresh things.
If the evaluation/refresh take longer than the timer interval, which currently is 250ms, we modify the list we are currently working on.
The problem is that there is no guard against re-entrancy etc..
While debugging i noticed that the powershell integration adds quite some overhead, like this timer and everything it does on tick, even if you don't use the powershell tab at all.
When the WPF application I was attached to reloaded its data (and the visual tree likely was refreshed as well), Snoop triggered an exception that crashed the whole WPF app. Here is the stack trace:
The text was updated successfully, but these errors were encountered: