VS hangs if building changed files with test explorer open

Đang mở
#2,185 2 bình luận 0 reaction 1 người được giao Xem trên GitHub

@armanio123 đang làm issue này rồi.

Từ ngày 27/6/2019.

Đánh giá

Issue này chưa được đánh giá.

Mô tả

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.

Ngôn ngữ chính
C#
Star
1.8k
Fork
355
Chỉ số merge pull request
Không có pull request nào được merge trong 30 ngày

Hướng dẫn đóng góp

Mở hướng dẫn đóng góp

Bắt đầu từ đâu

  1. Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
  2. Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
  3. Fork repository và làm thay đổi trên một nhánh.
  4. Mở pull request có tham chiếu số hiệu của issue.

Issue khác của microsoft/nodejstools

Tất cả issue của microsoft/nodejstools

Issue tương tự

Thêm issue về C#

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.