Skip to content

exception on "Find all references" #35786

@heejaechang

Description

@heejaechang

@AArnott reported this issue.

05/17/2019 05:55:08 : Error : Microsoft.CodeAnalysis.Remote.CodeAnalysisService (37) : Exception: System.InvalidOperationException: Unexpected Null
   at Roslyn.Utilities.Contract.ThrowIfNull[T](T value, String message)
   at Microsoft.CodeAnalysis.FindSymbols.SymbolFinder.VerifyForwardedTypes(Dictionary`2 equivalentTypesWithDifferingAssemblies, Compilation compilation, HashSet`1 verifiedKeys, Boolean isSearchSymbolCompilation)
   at Microsoft.CodeAnalysis.FindSymbols.SymbolFinder.VerifyForwardedTypes(Dictionary`2 equivalentTypesWithDifferingAssemblies, ISymbol searchSymbol, ISymbol symbolToMatch, Solution solution, Compilation searchSymbolCompilation, Compilation symbolToMatchCompilation, CancellationToken cancellationToken)
   at Microsoft.CodeAnalysis.FindSymbols.SymbolFinder.OriginalSymbolsMatchCore(ISymbol searchSymbol, ISymbol symbolToMatch, Solution solution, Compilation searchSymbolCompilation, Compilation symbolToMatchCompilation, CancellationToken cancellationToken)
   at Microsoft.CodeAnalysis.FindSymbols.SymbolFinder.OriginalSymbolsMatch(ISymbol searchSymbol, ISymbol symbolToMatch, Solution solution, Compilation searchSymbolCompilation, Compilation symbolToMatchCompilation, CancellationToken cancellationToken)
   at Microsoft.CodeAnalysis.Shared.Extensions.ITypeSymbolExtensions.<>c__DisplayClass16_0.<FindImplementationsForInterfaceMemberAsync>b__1(ISymbol m)
   at System.Linq.ImmutableArrayExtensions.FirstOrDefault[T](ImmutableArray`1 immutableArray, Func`2 predicate)
   at Microsoft.CodeAnalysis.Shared.Extensions.ITypeSymbolExtensions.<FindImplementationsForInterfaceMemberAsync>d__16.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at Microsoft.CodeAnalysis.FindSymbols.SymbolFinder.<FindImplementationsAsync>d__50.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at Microsoft.CodeAnalysis.FindSymbols.Finders.AbstractMethodOrPropertyOrEventSymbolReferenceFinder`1.<DetermineCascadedSymbolsAsync>d__1.MoveNext()
--- End of stack trace from previous location where exception was thrown ---

here is repro step from andrew

git clone https://github.com/aarnott/vs-streamjsonrpc.git
cd vs-streamjsonrpc\src 
git checkout RoslynBugRepro
streamjsonrpc.sln

Open the JsonMessageFormatter.cs file. I personally have all methods "collapsed" except WriteJToken, and I have the caret on the bufferTextWriter field reference on the first line of that method. Then I scroll down paste it a bit when the failure occurs.

Metadata

Metadata

Assignees

Labels

Area-IDEBugDeveloper CommunityThe issue was originally reported on https://developercommunity.visualstudio.com

Type

No type
No fields configured for issues without a type.

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions