elw00d/consoleframework

phantom errors when running tests

elw00d opened this issue · 0 comments

Sometimes there are errors like this

Failed   Tests.LayoutTests.TestNormalMeasure3
Error Message:
 System.InvalidOperationException : Collection was modified; enumeration operation may not execute.
Stack Trace:
   at System.ThrowHelper.ThrowInvalidOperationException_InvalidOperation_EnumFailedVersion()
   at System.Collections.Generic.List`1.Enumerator.MoveNextRare()
   at System.Linq.Enumerable.TryGetFirst[TSource](IEnumerable`1 source, Func`2 predicate, Boolean& found)
   at System.Linq.Enumerable.FirstOrDefault[TSource](IEnumerable`1 source, Func`2 predicate)
   at ConsoleFramework.Events.EventManager.AddHandler(Object target, RoutedEvent routedEvent, Delegate handler, Boolean handledEventsToo) in D:\all\ConsoleFramework\consoleframework\ConsoleFramework\Events\EventManager.cs:line 86
   at ConsoleFramework.Events.EventManager.AddHandler(Object target, RoutedEvent routedEvent, Delegate handler) in D:\all\ConsoleFramework\consoleframework\ConsoleFramework\Events\EventManager.cs:line 69
   at ConsoleFramework.Controls.Control.AddHandler(RoutedEvent routedEvent, Delegate delegate) in D:\all\ConsoleFramework\consoleframework\ConsoleFramework\Controls\Control.cs:line 197
   at ConsoleFramework.Controls.Control..ctor() in D:\all\ConsoleFramework\consoleframework\ConsoleFramework\Controls\Control.cs:line 416
   at Tests.LayoutTests.TestFinalControl..ctor()
   at Tests.LayoutTests.TestNormalMeasure3() in D:\all\ConsoleFramework\consoleframework\Tests\LayoutTests.cs:line 152