Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Visual Studio Crashes on changing git branches (Works fine when Specflow Integration extension is removed) #183

Open
coolvj2k opened this issue Apr 12, 2021 · 4 comments

Comments

@coolvj2k
Copy link

SpecFlow Version

3.5.14

Which test runner are you using?

MSTest

Test Runner Version Number

3.5.14

.NET Implementation

equal or greater .NET Framework 4.6.1

Project Format of the SpecFlow project

Classic project format using packages.config

.feature.cs files are generated using

SpecFlow.Tools.MsBuild.Generation NuGet package

Test Execution Method

Visual Studio Test Explorer

SpecFlow Section in app.config or content of specflow.json

Issue Description

Visual Studio 2017 Enterprise edition crashes every time git branches are changed.

This works absolutely fine when "Specflow for Visual Studio 2017" extension is removed from Visual studio

Steps to Reproduce

Create a Specflow/Easy repro project
Open the solution on Visual Studio 2017 Enterprise edition
Install the "Specflow for Visual Studio 2017" extension
Check out a git branch
Try switching to a new git branch
Visual studio crashes and needs to be restarted

Link to Repository Project

No response

@nemesv nemesv transferred this issue from SpecFlowOSS/SpecFlow Apr 13, 2021
@SabotageAndi
Copy link
Contributor

Did you switch the branch in Visual Studio or with another program?

@tzongithub
Copy link
Contributor

Could you please also check if there is any error logged in the Visual Studio log file (%APPDATA%\Microsoft\VisualStudio<Version>\ActivityLog.xml)? Or are there any details about the crash in the windows event log?

@coolvj2k
Copy link
Author

Did you switch the branch in Visual Studio or with another program?

Inside Visual Studio, it happened again just now. Trying to look for the Activity log now

@coolvj2k
Copy link
Author

%APPDATA%\Microsoft\VisualStudio\ActivityLog.xml)

Found the error in Windows event log:

Application: devenv.exe
Framework Version: v4.0.30319
Description: The application requested process termination through System.Environment.FailFast(string message).
Message: System.Runtime.InteropServices.COMException (0x80004005): Project unavailable.
at EnvDTE.Project.get_ProjectItems()
at TechTalk.SpecFlow.VsIntegration.Implementation.Utils.VsxHelper.GetAllPhysicalFileProjectItem(Project project)
at TechTalk.SpecFlow.VsIntegration.Implementation.Utils.VsxHelper.FindProjectItemByFilePath(Project project, String filePath)
at TechTalk.SpecFlow.VsIntegration.Implementation.Utils.VsProjectFileTrackerBase.FileChangedOnDisk(String filePath)
at System.Action1.Invoke(T obj) at TechTalk.SpecFlow.VsIntegration.Implementation.Utils.FileChangeEventsListener.Microsoft.VisualStudio.Shell.Interop.IVsFileChangeEvents.FilesChanged(UInt32 numberOfFilesChanged, String[] filesChanged, UInt32[] rggrfChange) at Microsoft.VisualStudio.Services.FileChange.ChangeNotificationBuffer.BufferingSink.<>c__DisplayClass14_0.<SendFileNotifications>b__0() at Microsoft.VisualStudio.Services.FileChange.ThreadingUtilities.<>c__DisplayClass5_01.<b__0>d.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.VisualStudio.Threading.JoinableTask.CompleteOnCurrentThread()
at Microsoft.VisualStudio.Threading.JoinableTask1.CompleteOnCurrentThread() at Microsoft.VisualStudio.Threading.JoinableTaskFactory.Run[T](Func1 asyncMethod, JoinableTaskCreationOptions creationOptions)
at Microsoft.VisualStudio.Services.FileChange.ThreadingUtilities.RunOnMainThread[T](Func1 action, CancellationToken cancellationToken) at Microsoft.VisualStudio.Services.FileChange.ChangeNotificationBuffer.BufferingSink.SendFileNotifications(String[] files, UInt32[] changes, CancellationToken cancellationToken) at Microsoft.VisualStudio.Services.FileChange.ChangeNotificationBuffer.BufferingSink.FlushFileNotifications(CancellationToken cancellationToken) at Microsoft.VisualStudio.Services.FileChange.ChangeNotificationBuffer.Flush(CancellationToken cancellationToken) at Microsoft.VisualStudio.Services.FileChangeService.<Resume>b__92_1(ChangeNotificationBuffer notificationBuffer, CancellationToken cancellationToken) at Microsoft.VisualStudio.Services.FileChange.TaskScheduler.RunScheduledAsyncTask[TArg](Task priorTask, Object argsAsObject) Stack: at System.Environment.FailFast(System.String, System.Exception) at Microsoft.VisualStudio.Services.FileChange.TaskScheduler.FailFast(System.Exception) at Microsoft.VisualStudio.Services.FileChange.TaskScheduler.RunScheduledAsyncTask[[System.__Canon, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089]](System.Threading.Tasks.Task, System.Object) at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(System.Threading.Tasks.Task) at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(System.Threading.Tasks.Task) at Microsoft.VisualStudio.Threading.JoinableTask.CompleteOnCurrentThread() at Microsoft.VisualStudio.Threading.JoinableTask1[[System.Int32, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089]].CompleteOnCurrentThread()
at Microsoft.VisualStudio.Threading.JoinableTaskFactory.Run[[System.Int32, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089]](System.Func1<System.Threading.Tasks.Task1>, Microsoft.VisualStudio.Threading.JoinableTaskCreationOptions)
at Microsoft.VisualStudio.Services.FileChange.ThreadingUtilities.RunOnMainThread[[System.Int32, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089]](System.Func1<Int32>, System.Threading.CancellationToken) at Microsoft.VisualStudio.Services.FileChange.ChangeNotificationBuffer+BufferingSink.SendFileNotifications(System.String[], UInt32[], System.Threading.CancellationToken) at Microsoft.VisualStudio.Services.FileChange.ChangeNotificationBuffer+BufferingSink.FlushFileNotifications(System.Threading.CancellationToken) at Microsoft.VisualStudio.Services.FileChange.ChangeNotificationBuffer.Flush(System.Threading.CancellationToken) at Microsoft.VisualStudio.Services.FileChangeService.<Resume>b__92_1(Microsoft.VisualStudio.Services.FileChange.ChangeNotificationBuffer, System.Threading.CancellationToken) at Microsoft.VisualStudio.Services.FileChange.TaskScheduler.RunScheduledAsyncTask[[System.__Canon, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089]](System.Threading.Tasks.Task, System.Object) at System.Threading.Tasks.ContinuationResultTaskFromTask1[[System.__Canon, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089]].InnerInvoke()
at System.Threading.Tasks.Task.Execute()
at System.Threading.Tasks.Task.ExecutionContextCallback(System.Object)
at System.Threading.ExecutionContext.RunInternal(System.Threading.ExecutionContext, System.Threading.ContextCallback, System.Object, Boolean)
at System.Threading.ExecutionContext.Run(System.Threading.ExecutionContext, System.Threading.ContextCallback, System.Object, Boolean)
at System.Threading.Tasks.Task.ExecuteWithThreadLocal(System.Threading.Tasks.Task ByRef)
at System.Threading.Tasks.Task.ExecuteEntry(Boolean)
at System.Threading.Tasks.Task.System.Threading.IThreadPoolWorkItem.ExecuteWorkItem()
at System.Threading.ThreadPoolWorkQueue.Dispatch()
at System.Threading._ThreadPoolWaitCallback.PerformWaitCallback()

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants