Skip to content
This repository was archived by the owner on Apr 14, 2022. It is now read-only.

InvalidOperationException in PythonClassType.GetMemberNames in datetime caching test #1678

Closed
jakebailey opened this issue Oct 11, 2019 · 1 comment

Comments

@jakebailey
Copy link
Member

Just saw this while running the full suite:

 Datetime
   Source: LibraryModulesTests.cs line 94
   Duration: 13 sec

  Message: 
    Assert.Fail failed. One not awaited tasks has failed:
    
    System.InvalidOperationException: Collection was modified; enumeration operation may not execute.
       at bool System.Collections.Generic.Dictionary<TKey, TValue>+KeyCollection+Enumerator.MoveNext()
       at void System.Collections.Generic.HashSet<T>.UnionWith(IEnumerable<T> other)
       at new System.Collections.Generic.HashSet<T>(IEnumerable<T> collection, IEqualityComparer<T> comparer)
       at IEnumerable<string> Microsoft.Python.Analysis.Types.PythonClassType.GetMemberNames() in C:/Users/jabaile/python-language-server/src/Analysis/Ast/Impl/Types/PythonClassType.cs:line 73
       at IEnumerable<string> Microsoft.Python.Analysis.Types.PythonClassType.GetMemberNames() in C:/Users/jabaile/python-language-server/src/Analysis/Ast/Impl/Types/PythonClassType.cs:line 75
       at IEnumerable<string> Microsoft.Python.Analysis.Types.PythonClassType.GetMemberNames() in C:/Users/jabaile/python-language-server/src/Analysis/Ast/Impl/Types/PythonClassType.cs:line 75
       at void Microsoft.Python.Analysis.Analyzer.StubMerger.MergeClass(IVariable v, IPythonClassType sourceClass, IPythonType stubType, CancellationToken cancellationToken) in C:/Users/jabaile/python-language-server/src/Analysis/Ast/Impl/Analyzer/StubMerger.cs:line 187
       at void Microsoft.Python.Analysis.Analyzer.StubMerger.TryReplaceMember(IVariable v, IPythonType sourceType, IPythonType stubType, CancellationToken cancellationToken) in C:/Users/jabaile/python-language-server/src/Analysis/Ast/Impl/Analyzer/StubMerger.cs:line 114
       at void Microsoft.Python.Analysis.Analyzer.StubMerger.TransferTypesFromStub(IDocumentAnalysis stubAnalysis, CancellationToken cancellationToken) in C:/Users/jabaile/python-language-server/src/Analysis/Ast/Impl/Analyzer/StubMerger.cs:line 97
       at void Microsoft.Python.Analysis.Analyzer.StubMerger.MergeStub(IDocumentAnalysis stubAnalysis, CancellationToken cancellationToken) in C:/Users/jabaile/python-language-server/src/Analysis/Ast/Impl/Analyzer/StubMerger.cs:line 57
       at void Microsoft.Python.Analysis.Analyzer.ModuleWalker.Complete() in C:/Users/jabaile/python-language-server/src/Analysis/Ast/Impl/Analyzer/ModuleWalker.cs:line 206
       at IDocumentAnalysis Microsoft.Python.Analysis.Analyzer.PythonAnalyzerSession.DoAnalyzeEntry(IDependencyChainNode<PythonAnalyzerEntry> node, IPythonModule module, PythonAst ast, int version) in C:/Users/jabaile/python-language-server/src/Analysis/Ast/Impl/Analyzer/PythonAnalyzerSession.cs:line 358
       at void Microsoft.Python.Analysis.Analyzer.PythonAnalyzerSession.AnalyzeEntry(IDependencyChainNode<PythonAnalyzerEntry> node, PythonAnalyzerEntry entry, IPythonModule module, PythonAst ast, int version) in C:/Users/jabaile/python-language-server/src/Analysis/Ast/Impl/Analyzer/PythonAnalyzerSession.cs:line 336
       at void Microsoft.Python.Analysis.Analyzer.PythonAnalyzerSession.Analyze(IDependencyChainNode<PythonAnalyzerEntry> node, AsyncCountdownEvent ace, Stopwatch stopWatch) in C:/Users/jabaile/python-language-server/src/Analysis/Ast/Impl/Analyzer/PythonAnalyzerSession.cs:line 256
       at void Microsoft.Python.Analysis.Analyzer.PythonAnalyzerSession.LogException(IPythonModule module, Exception exception) in C:/Users/jabaile/python-language-server/src/Analysis/Ast/Impl/Analyzer/PythonAnalyzerSession.cs:line 455
       at void Microsoft.Python.Analysis.Analyzer.PythonAnalyzerSession.Analyze(IDependencyChainNode<PythonAnalyzerEntry> node, AsyncCountdownEvent ace, Stopwatch stopWatch) in C:/Users/jabaile/python-language-server/src/Analysis/Ast/Impl/Analyzer/PythonAnalyzerSession.cs:line 265
       at Task Microsoft.Python.Analysis.Analyzer.PythonAnalyzerSession.StartAnalysis(IDependencyChainNode<PythonAnalyzerEntry> node, AsyncCountdownEvent ace, Stopwatch stopWatch)+() => { } in C:/Users/jabaile/python-language-server/src/Analysis/Ast/Impl/Analyzer/PythonAnalyzerSession.cs:line 242
       at void System.Threading.ExecutionContext.RunFromThreadPoolDispatchLoop(Thread threadPoolThread, ExecutionContext executionContext, ContextCallback callback, object state)
       at void System.Threading.Tasks.Task.ExecuteWithThreadLocal(ref Task currentTaskSlot, Thread threadPoolThread)
    
    
  Stack Trace: 
    TaskObserver.Summarize() line 150
    TaskObserver.WaitForObservedTask() line 65
    TestEnvironmentImpl.AfterTestRun() line 117
    TestEnvironmentImpl.TestCleanup() line 54
    LibraryModulesTests.Cleanup() line 39

   Open additional output for this result

@MikhailArkhipov
Copy link

#1757 changed this.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants