Open davkean opened 7 years ago
@jviau What build is this?
From @jviau on May 8, 2017 19:41
Ah right, suppose that is helpful haha.
Int-Preview channel, build 26502.1-Preview
@heejaechang Is your fix for this in the build above?
this was my fix - http://source.roslyn.io/#Microsoft.VisualStudio.LanguageServices/Implementation/TaskList/ProjectExternalErrorReporter.cs,50
but it says NRE, so not sure whether it is same thing or a bit before my fix. dump would help us here to determine.
_workspace.GetHostProject(_projectId)
to return null, but the conditions in which this could occur are not clear to me.hostProject.ContainsFile(bstrFileName)
could return true followed by hostProject.GetCurrentDocumentFromPath(bstrFileName)
returning null.Based on the stack above I can't tell which of these two cases resulted in the error. @jviau do you remember if you were removing (or renaming) a file at the time, or perhaps removing/closing/renaming a project within a solution?
:memo: This analysis only considers "direct throws". It does not consider NREs assigned to this method as a result of JIT inlining.
@heejaechang unfortunately I can't get a dump file as I can't reproduce it. Probably a very rare race condition as @sharwell mentions.
@sharwell I was rebuilding the solution, no direct interaction with files besides that. It is possible an automatic nuget restore was running in the background though. I believe I had the directory open in vscode also, which can trigger nuget restores itself.
@sharwell I believe all these are happening on UI thread. but without repro or dump, hard to say.
I ran into this again following these steps, (but it only happened once).
This is on vsuwpt 25612.0
I suspect this is probably a race condition on our side. I suspect that we tear down the abstract project just before we've reported an error, resulting in your lookup for a project and resulting dereference to null'ref.
From @jviau on May 5, 2017 19:16
I was rebuilding a my solution and I received an NFE report. This was a one-off error and I am unable to reproduce it since. Opening on this repo since
LanguageServiceErrorListProvider
is owned by you. If you find this is a CPS issue please send back to me.Solution:
Copied from original issue: dotnet/project-system#2130