Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

KeyNotFoundException thrown from FindSymbols.FindReferencesSearchEngine.ProcessDocumentAsync #70850

Closed
tmat opened this issue Nov 16, 2023 · 0 comments · Fixed by #74358
Closed
Assignees
Labels
Area-IDE Navigation-FAR Find all references

Comments

@tmat
Copy link
Member

tmat commented Nov 16, 2023

While working in Roslyn.sln. Not sure what exactly triggered it.

StreamJsonRpc.RemoteInvocationException: The given key 'Public ReadOnly Property Method As Microsoft.CodeAnalysis.Symbols.IMethodSymbolInternal' was not present in the dictionary.
   at StreamJsonRpc.JsonRpc.<InvokeCoreAsync>d__151`1.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at Microsoft.CodeAnalysis.Remote.BrokeredServiceConnection`1.<TryInvokeAsync>d__21.MoveNext()
RPC server exception:

System.Collections.Generic.KeyNotFoundException: The given key 'Public ReadOnly Property Method As Microsoft.CodeAnalysis.Symbols.IMethodSymbolInternal' was not present in the dictionary.
      at System.Collections.Concurrent.ConcurrentDictionary`2.ThrowKeyNotFoundException(TKey key)
      at System.Collections.Concurrent.ConcurrentDictionary`2.get_Item(TKey key)
      at Microsoft.CodeAnalysis.FindSymbols.FindReferencesSearchEngine.<>c__DisplayClass20_0.<<ProcessDocumentAsync>g__ProcessDocumentAsync|0>d.MoveNext()
   --- End of stack trace from previous location ---
      at Microsoft.CodeAnalysis.FindSymbols.FindReferencesSearchEngine.ProcessDocumentAsync(Document document, MetadataUnifyingSymbolHashSet symbols, Dictionary`2 symbolToGlobalAliases, CancellationToken cancellationToken)
      at Microsoft.CodeAnalysis.FindSymbols.FindReferencesSearchEngine.ProcessDocumentAsync(Document document, MetadataUnifyingSymbolHashSet symbols, Dictionary`2 symbolToGlobalAliases, CancellationToken cancellationToken)
      at Microsoft.CodeAnalysis.FindSymbols.FindReferencesSearchEngine.ProcessProjectAsync(Project project, ImmutableArray`1 allSymbols, CancellationToken cancellationToken)
      at Microsoft.CodeAnalysis.FindSymbols.FindReferencesSearchEngine.ProcessProjectAsync(Project project, ImmutableArray`1 allSymbols, CancellationToken cancellationToken)
      at Microsoft.CodeAnalysis.FindSymbols.FindReferencesSearchEngine.FindReferencesAsync(ImmutableArray`1 symbols, CancellationToken cancellationToken)
      at Microsoft.CodeAnalysis.FindSymbols.FindReferencesSearchEngine.FindReferencesAsync(ImmutableArray`1 symbols, CancellationToken cancellationToken)
      at Microsoft.CodeAnalysis.FindSymbols.FindReferencesSearchEngine.FindReferencesAsync(ImmutableArray`1 symbols, CancellationToken cancellationToken)
      at Microsoft.CodeAnalysis.FindSymbols.SymbolFinder.FindReferencesAsync(ISymbol symbol, Solution solution, IStreamingFindReferencesProgress progress, IImmutableSet`1 documents, FindReferencesSearchOptions options, CancellationToken cancellationToken)
      at Microsoft.CodeAnalysis.FindUsages.AbstractFindUsagesService.FindReferencesAsync(IFindUsagesContext context, ISymbol symbol, Project project, FindReferencesSearchOptions options, CancellationToken cancellationToken)
      at Microsoft.CodeAnalysis.Remote.RemoteFindUsagesService.<>c__DisplayClass3_0.<<FindReferencesAsync>b__0>d.MoveNext()
   --- End of stack trace from previous location ---
      at Microsoft.CodeAnalysis.Remote.BrokeredServiceBase.<>c__DisplayClass16_0.<<RunServiceAsync>b__1>d.MoveNext()
   --- End of stack trace from previous location ---
      at Microsoft.CodeAnalysis.Remote.RemoteWorkspace.<>c__DisplayClass9_0`1.<<RunWithSolutionAsync>g__ProcessSolutionAsync|1>d.MoveNext()
   --- End of stack trace from previous location ---
      at Microsoft.CodeAnalysis.Remote.RemoteWorkspace.RunWithSolutionAsync[T](AssetProvider assetProvider, Checksum solutionChecksum, Int32 workspaceVersion, Boolean updatePrimaryBranch, Func`2 implementation, CancellationToken cancellationToken)
      at Microsoft.CodeAnalysis.Remote.RemoteWorkspace.RunWithSolutionAsync[T](AssetProvider assetProvider, Checksum solutionChecksum, Int32 workspaceVersion, Boolean updatePrimaryBranch, Func`2 implementation, CancellationToken cancellationToken)
      at Microsoft.CodeAnalysis.Remote.BrokeredServiceBase.RunWithSolutionAsync[T](Checksum solutionChecksum, Func`2 implementation, CancellationToken cancellationToken)
      at Microsoft.CodeAnalysis.Remote.BrokeredServiceBase.<>c__DisplayClass16_0.<<RunServiceAsync>b__0>d.MoveNext()
   --- End of stack trace from previous location ---
      at Microsoft.CodeAnalysis.Remote.BrokeredServiceBase.RunServiceImplAsync(Func`2 implementation, CancellationToken cancellationToken)

@dotnet-issue-labeler dotnet-issue-labeler bot added Area-IDE untriaged Issues and PRs which have not yet been triaged by a lead labels Nov 16, 2023
@Cosifne Cosifne added Navigation-FAR Find all references and removed untriaged Issues and PRs which have not yet been triaged by a lead labels Jul 3, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Area-IDE Navigation-FAR Find all references
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants