VS hangs if building changed files with test explorer open

オープン
#2,185 コメント 2 件 リアクション 0 件 担当者 1 名 GitHub で見る

@armanio123 がすでに取り組んでいます。

2019年6月27日 から。

評価

この issue はまだ評価されていません。

説明

Expected Behavior

New tests get discoverer

Actual Behavior

VS freezes

Here are the two stacks which contain both the file watcher service and the nodejs TestAdapter when the freeze occurs:

Not Flagged		16544	0	Main Thread	Main Thread	Microsoft.VisualStudio.Threading.dll!Microsoft.VisualStudio.Threading.NoMessagePumpSyncContext.Wait
mscorlib.dll!System.Threading.Tasks.Task.Wait(System.TimeSpan timeout)
Microsoft.VisualStudio.Threading.dll!Microsoft.VisualStudio.Threading.JoinableTaskFactory.WaitSynchronouslyCore(System.Threading.Tasks.Task task)
Microsoft.VisualStudio.Threading.dll!Microsoft.VisualStudio.Threading.JoinableTaskFactory.Run<string>(System.Func<System.Threading.Tasks.Task<string>> asyncMethod)
Microsoft.VisualStudio.Shell.UI.Internal.dll!Microsoft.VisualStudio.Services.FileChangeService.RunWithTracing<string>(Microsoft.VisualStudio.Services.FileChangeService.CompletionTracer tracer, System.Func<System.Threading.CancellationToken, System.Threading.Tasks.Task<string>> func)
Microsoft.VisualStudio.Shell.UI.Internal.dll!Microsoft.VisualStudio.Services.FileChangeService.UnadviseFileChange(uint cookie)
Microsoft.VisualStudio.Shell.UI.Internal.dll!Microsoft.VisualStudio.Services.FileChangeService.Microsoft.VisualStudio.Shell.Interop.IVsFileChangeEx.UnadviseFileChange(uint cookie)
Microsoft.NodejsTools.TestAdapterImpl.dll!Microsoft.NodejsTools.TestAdapter.TestFilesUpdateWatcher.RemoveFileWatch(string path)
Microsoft.NodejsTools.TestAdapterImpl.dll!Microsoft.NodejsTools.TestAdapter.TestContainerDiscoverer.OnProjectItemChanged(object sender, Microsoft.NodejsTools.TestAdapter.TestFileChangedEventArgs e)
Microsoft.NodejsTools.TestAdapterImpl.dll!Microsoft.NodejsTools.TestAdapter.TestFilesUpdateWatcher.FilesChanged.AnonymousMethod__0()
mscorlib.dll!System.Runtime.CompilerServices.AsyncMethodBuilderCore.MoveNextRunner.InvokeMoveNext(object stateMachine)
mscorlib.dll!System.Threading.ExecutionContext.RunInternal(System.Threading.ExecutionContext executionContext, System.Threading.ContextCallback callback, object state, bool preserveSyncCtx)
mscorlib.dll!System.Threading.ExecutionContext.Run(System.Threading.ExecutionContext executionContext, System.Threading.ContextCallback callback, object state, bool preserveSyncCtx)
mscorlib.dll!System.Runtime.CompilerServices.AsyncMethodBuilderCore.MoveNextRunner.Run()
mscorlib.dll!System.Runtime.CompilerServices.AsyncMethodBuilderCore.OutputAsyncCausalityEvents.AnonymousMethod__0()
mscorlib.dll!System.Runtime.CompilerServices.AsyncMethodBuilderCore.ContinuationWrapper.Invoke()
Microsoft.VisualStudio.Threading.dll!Microsoft.VisualStudio.Threading.JoinableTaskFactory.SingleExecuteProtector.TryExecute()
Microsoft.VisualStudio.Threading.dll!Microsoft.VisualStudio.Threading.JoinableTaskFactory.Run<bool>(System.Func<System.Threading.Tasks.Task<bool>> asyncMethod, Microsoft.VisualStudio.Threading.JoinableTaskCreationOptions creationOptions)
Microsoft.VisualStudio.Shell.UI.Internal.dll!Microsoft.VisualStudio.Services.FileChangeService.RunWithTracing<bool>(Microsoft.VisualStudio.Services.FileChangeService.CompletionTracer tracer, System.Func<System.Threading.CancellationToken, System.Threading.Tasks.Task<bool>> func)
Microsoft.VisualStudio.Shell.UI.Internal.dll!Microsoft.VisualStudio.Services.FileChangeService.RunWithTracing(Microsoft.VisualStudio.Services.FileChangeService.CompletionTracer tracer, System.Func<System.Threading.CancellationToken, System.Threading.Tasks.Task> func)
Microsoft.VisualStudio.Shell.UI.Internal.dll!Microsoft.VisualStudio.Services.FileChangeService.SyncFile(string filename)
Microsoft.VisualStudio.Shell.UI.Internal.dll!Microsoft.VisualStudio.Services.FileChangeService.Microsoft.VisualStudio.Shell.Interop.IVsFileChangeEx.SyncFile(string filename)
Microsoft.VisualStudio.Editor.Implementation.dll!Microsoft.VisualStudio.Editor.Implementation.TextDocData.SuspendFileChangeNotification(string pszFilename, int fSuspend)
Microsoft.VisualStudio.Editor.Implementation.dll!Microsoft.VisualStudio.Editor.Implementation.TextDocData.BaseSave(string pszFilename, int fRemember)
Microsoft.VisualStudio.Editor.Implementation.dll!Microsoft.VisualStudio.Editor.Implementation.TextDocData.Save(string pszFilename, int fRemember, uint nFormatIndex)
Microsoft.VisualStudio.Editor.Implementation.dll!Microsoft.VisualStudio.Editor.Implementation.TextDocData.Save(string pszFileName, int fRemember)

Not Flagged		25740	0	Worker Thread	Worker Thread	Microsoft.VisualStudio.Threading.dll!Microsoft.VisualStudio.Threading.JoinableTaskFactory.WaitSynchronouslyCore
[Managed to Native Transition]
mscorlib.dll!System.Threading.Monitor.Wait(object obj, int millisecondsTimeout, bool exitContext)
mscorlib.dll!System.Threading.Tasks.Task.Wait(System.TimeSpan timeout)
Microsoft.VisualStudio.Threading.dll!Microsoft.VisualStudio.Threading.JoinableTaskFactory.WaitSynchronouslyCore(System.Threading.Tasks.Task task)
Microsoft.VisualStudio.Threading.dll!Microsoft.VisualStudio.Threading.JoinableTaskFactory.Run<int>(System.Func<System.Threading.Tasks.Task<int>> asyncMethod, Microsoft.VisualStudio.Threading.JoinableTaskCreationOptions creationOptions)
Microsoft.NodejsTools.TestAdapterImpl.dll!Microsoft.NodejsTools.TestAdapter.TestFilesUpdateWatcher.FilesChanged(uint cChanges, string[] rgpszFile, uint[] rggrfChange)
Microsoft.VisualStudio.Shell.UI.Internal.dll!Microsoft.VisualStudio.Services.FileChange.EventSinkBundle.FilesChanged(string[] files, uint[] changes, string traceInfo)
Microsoft.VisualStudio.Shell.UI.Internal.dll!Microsoft.VisualStudio.Services.FileChange.NotificationPool.FileChangeJob.ProcessCore(System.Threading.CancellationToken cancellationToken)
Microsoft.VisualStudio.Shell.UI.Internal.dll!Microsoft.VisualStudio.Services.FileChange.NotificationPool.Job.Process(System.Threading.CancellationToken cancellationToken)
Microsoft.VisualStudio.Shell.UI.Internal.dll!Microsoft.VisualStudio.Services.FileChange.NotificationPool.ProcessNotificationsAsync(Microsoft.VisualStudio.Services.FileChange.NotificationPool.AsyncJobQueue queue, bool callInBackground, System.Threading.CancellationToken token)
[Resuming Async Method]
mscorlib.dll!System.Runtime.CompilerServices.AsyncMethodBuilderCore.MoveNextRunner.InvokeMoveNext(object stateMachine)
mscorlib.dll!System.Runtime.CompilerServices.YieldAwaitable.YieldAwaiter.RunAction(object state)
mscorlib.dll!System.Threading.QueueUserWorkItemCallback.System.Threading.IThreadPoolWorkItem.ExecuteWorkItem()
mscorlib.dll!System.Threading.ThreadPoolWorkQueue.Dispatch()
mscorlib.dll!System.Threading._ThreadPoolWaitCallback.PerformWaitCallback()
[Native to Managed Transition]

  • NTVS Version: 1.5.10610.1 Commit Hash:529a87de2769e143655e31ea81795c42e5775ef8
  • Visual Studio Version: 16.2 preview 4
  • Node.js Version: 8.1.4
Steps to Reproduce
  1. Open a csproj and add a javascript test file
  2. Update the file and run build
  3. Sometimes the tests get rediscovered and sometimes VS freezes

Note that as part of these I was often closing/reopening projects and deleting/creating the javascript files.

主要言語
C#
スター
1.8k
フォーク
355
PR マージ指標
30日以内にマージされた PR はありません

コントリビューションガイド

コントリビューションガイドを開く

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

microsoft/nodejstools のほかの issue

microsoft/nodejstools の issue をすべて見る

似ている issue

C# の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。