VS hangs if building changed files with test explorer open

Aperta
#2,185 2 commenti 0 reazioni 1 assegnatario Vedi su GitHub

@armanio123 ci sta già lavorando.

Dal 27/6/2019.

Valutazione

Questa issue non è ancora stata valutata.

Descrizione

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.

Lingua principale
C#
Stelle
1.8k
Fork
355
Metriche di merge delle PR
Nessuna PR unita negli ultimi 30g

Guida per i contributori

Apri la guida per i contributori

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di microsoft/nodejstools

Tutte le issue di microsoft/nodejstools

Issue simili

Altre issue su C#

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.