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 in most cases when opening Team Explorer #21

Open
doormalena opened this issue Aug 28, 2019 · 13 comments · May be fixed by #22
Open

Visual Studio crashes in most cases when opening Team Explorer #21

doormalena opened this issue Aug 28, 2019 · 13 comments · May be fixed by #22

Comments

@doormalena
Copy link

doormalena commented Aug 28, 2019

Describe the bug
Visual Studio crashes sometimes when opening Team Explorer after just starting up Visual Studio.
My fellow team mates have the same behavior on their machines from time to time. Could it be performance related? When repeating the steps from the reproduction it will not crash after a few retries.

Eventlog shows .NET Runtime error:

Application: devenv.exe
Framework Version: v4.0.30319
Description: The process was terminated due to an unhandled exception.
Exception Info: System.NullReferenceException
at Microsoft.VisualStudio.Shell.ThreadHelper.get_JoinableTaskContext()
at vs_commitizen.vs2015.VsCommitizenNavigationItem+d__4.MoveNext()
at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(System.Threading.Tasks.Task)
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(System.Threading.Tasks.Task)
at vs_commitizen.vs2015.VsCommitizenNavigationItem+<GitService_PropertyChanged>d__3.MoveNext()
at System.Runtime.CompilerServices.AsyncMethodBuilderCore+<>c.b__6_1(System.Object)
at System.Threading.QueueUserWorkItemCallback.WaitCallback_Context(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.QueueUserWorkItemCallback.System.Threading.IThreadPoolWorkItem.ExecuteWorkItem()
at System.Threading.ThreadPoolWorkQueue.Dispatch()
at System.Threading._ThreadPoolWaitCallback.PerformWaitCallback()

To Reproduce
Steps to reproduce the behavior:

  1. Start Visual Studio
  2. Open Recent project (in this case hosted on Azure DevOps / Git-repo)
  3. Click Connect in the (authentication) dialog that is opening up.

Expected behavior
No crash.

Screenshots
If applicable, add screenshots to help explain your problem.
image

Visual Studio (please complete the following information):

  • Professional or Enterprise (same behavior)
  • 2019 / 16.2.3
@MrLuje
Copy link
Owner

MrLuje commented Aug 29, 2019

Ah, never ran into that one...

Could it be performance related?

Yep, could be... since most VS Package logic should be async, I guess I'm trying to access non-ready UI stuff at this point (even I am properly awaiting the UI thread with ThreadHelper.JoinableTaskFactory.SwitchToMainThreadAsync() 😩)

I'll have a look

@MrLuje MrLuje linked a pull request Sep 4, 2019 that will close this issue
@MrLuje
Copy link
Owner

MrLuje commented Sep 4, 2019

You can give a try to this version

@doormalena
Copy link
Author

Thanks for your effort!
Just tested it. VS keeps crashing unfortunately.

image

@MrLuje
Copy link
Owner

MrLuje commented Sep 4, 2019

one more

Do you have other extensions, beside this one, in common with your teammate that impacts "Team Explorer" view ?

@doormalena
Copy link
Author

doormalena commented Sep 4, 2019

This version seems promising. It did not make VS crash after first startup. I will continue to do some startup tests today.

In regards to your question: yes we have multiple other extensions installed which we have in common:

  • R#
  • PowerShell Tools for Visual Studio
  • ReAttach
  • Visual Studio Spell Checker (VS2017 and Later)
  • HSR Parallel Checker for C#
  • Productivity Power Tools 2017/2019

Whether they are impacting the Team Explorer view I don't know at this time.

@doormalena
Copy link
Author

Strange. First 2 tests where OK. Now it constantly crashes again.

@MrLuje
Copy link
Owner

MrLuje commented Sep 4, 2019

Ok, new one : it should prevent any crashing and will instead log the error in output panes

image

@doormalena
Copy link
Author

I does not make much of a difference, it keeps crashing with the same error. I cannot see the output pane as well, am I missing something?

image

@MrLuje
Copy link
Owner

MrLuje commented Sep 5, 2019

If this one doesn't prevent the crash, I'll probably need a crash dump to have more insights about it

@doormalena
Copy link
Author

I have a crash dump for you unfortunately.

@bvirkler
Copy link

bvirkler commented Nov 25, 2019

I'm getting the same crashes. (Love this extension otherwise!)

@aguacongas
Copy link

Same crash after commited the code using VS 2019 16.5.4. The stack trace is a little bit different :

Application: devenv.exe
Framework Version: v4.0.30319
Description: The process was terminated due to an unhandled exception.
Exception Info: System.IO.FileNotFoundException
   at vs_commitizen.vs2015.VsCommitizenNavigationItem.UpdateIsVisibleAsync()
   at vs_commitizen.vs2015.VsCommitizenNavigationItem+<GitService_PropertyChanged>d__3.MoveNext()
   at System.Runtime.CompilerServices.AsyncMethodBuilderCore+<>c.<ThrowAsync>b__6_1(System.Object)
   at System.Threading.QueueUserWorkItemCallback.WaitCallback_Context(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.QueueUserWorkItemCallback.System.Threading.IThreadPoolWorkItem.ExecuteWorkItem()
   at System.Threading.ThreadPoolWorkQueue.Dispatch()
   at System.Threading._ThreadPoolWaitCallback.PerformWaitCallback()

@MrLuje
Copy link
Owner

MrLuje commented Apr 23, 2020

The "System.IO.FileNotFoundException" bug is fixed in the new release (but I don't think it will address the original issue)

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

Successfully merging a pull request may close this issue.

4 participants