Intermittent Exception thrown after pressing 'Q' to stop execution
julealgon opened this issue · comments
I encountered this bug today after running NUnit.Commander and manually stopping it several dozen times during the day. It happened only once:
Analyzing...
Commander encountered an unhandled exception: Collection was modified; enumeration operation may not execute. Stack Trace: at System.Collections.Generic.List1.Enumerator.MoveNextRare() at System.Linq.Enumerable.SelectManySingleSelectorIterator
2.MoveNext()
at System.Linq.Enumerable.SelectManySingleSelectorIterator2.MoveNext() at System.Linq.Enumerable.Any[TSource](IEnumerable
1 source, Func2 predicate) at NUnit.Commander.Analysis.TestHistoryAnalyzer.Analyze(IEnumerable
1 currentRun)
at NUnit.Commander.Program.RunLogFriendly(Options options, ApplicationConfiguration configuration, ColorScheme colorScheme, Int32 runNumber, RunContext runContext)
After this error, the application shut down abruptly and I did not get a summary displayed.
It appears that there might be some sort of thread safety issue while cancelling execution.