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 when navigating to Manage Connections page in Team Explorer #23

Closed
xperiandri opened this issue Jul 31, 2015 · 25 comments
Milestone

Comments

@xperiandri
Copy link

@xperiandri xperiandri commented Jul 31, 2015

When I click on "plug" icon in Team Explorer then Visual Studio immediately crashes.

Stack trace:

Unhandled exception:
System.NullReferenceException
Object reference not set to an instance of an object.
   at GitHub.VisualStudio.Base.TeamExplorerServiceHolder.<UIContextChanged>b__0() in Y:\jenkins\workspace\GitHub for Visual Studio speakeasy jenkinskeep\src\GitHub.VisualStudio\Base\TeamExplorerServiceHolder.cs:line 128
   at System.Threading.Tasks.Task`1.InnerInvoke()
   at System.Threading.Tasks.Task.Execute()
--- 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 GitHub.VisualStudio.Base.TeamExplorerServiceHolder.<UIContextChanged>d__2.MoveNext() in Y:\jenkins\workspace\GitHub for Visual Studio speakeasy jenkinskeep\src\GitHub.VisualStudio\Base\TeamExplorerServiceHolder.cs:line 128
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.CompilerServices.AsyncMethodBuilderCore.<>c__DisplayClass2.<ThrowAsync>b__3(Object state)
   at System.Windows.Threading.ExceptionWrapper.InternalRealCall(Delegate callback, Object args, Int32 numArgs)
   at System.Windows.Threading.ExceptionWrapper.TryCatchWhen(Object source, Delegate callback, Object args, Int32 numArgs, Delegate catchHandler)
   at System.Windows.Threading.DispatcherOperation.InvokeImpl()
   at System.Windows.Threading.DispatcherOperation.InvokeInSecurityContext(Object state)
   at System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx)
   at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx)
   at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state)
   at System.Windows.Threading.DispatcherOperation.Invoke()
   at System.Windows.Threading.Dispatcher.ProcessQueue()
   at System.Windows.Threading.Dispatcher.WndProcHook(IntPtr hwnd, Int32 msg, IntPtr wParam, IntPtr lParam, Boolean& handled)
   at MS.Win32.HwndWrapper.WndProc(IntPtr hwnd, Int32 msg, IntPtr wParam, IntPtr lParam, Boolean& handled)
   at MS.Win32.HwndSubclass.DispatcherCallbackOperation(Object o)
   at System.Windows.Threading.ExceptionWrapper.InternalRealCall(Delegate callback, Object args, Int32 numArgs)
   at System.Windows.Threading.ExceptionWrapper.TryCatchWhen(Object source, Delegate callback, Object args, Int32 numArgs, Delegate catchHandler)
   at System.Windows.Threading.Dispatcher.LegacyInvokeImpl(DispatcherPriority priority, TimeSpan timeout, Delegate method, Object args, Int32 numArgs)
   at MS.Win32.HwndSubclass.SubclassWndProc(IntPtr hwnd, Int32 msg, IntPtr wParam, IntPtr lParam)

Dump and reproduction steps can be downloaded from here:
http://rusfolder.com/44020874
http://rusfolder.com/44020875

@haacked haacked changed the title Visual Studio crushes when navigating to Manage Connections page in Team Explorer Visual Studio crashes when navigating to Manage Connections page in Team Explorer Jul 31, 2015
@haacked
Copy link
Contributor

@haacked haacked commented Jul 31, 2015

Thanks for the detailed report!

@shana
Copy link
Collaborator

@shana shana commented Jul 31, 2015

@xperiandri What version of the extension do you have installed?

@xperiandri
Copy link
Author

@xperiandri xperiandri commented Jul 31, 2015

The current one from Visual Studio Gallery

@shana
Copy link
Collaborator

@shana shana commented Jul 31, 2015

@xperiandri Do you have git support enabled in Visual Studio? If yes, have you opened any projects that are in git repositories in VS?

@xperiandri
Copy link
Author

@xperiandri xperiandri commented Jul 31, 2015

Yes, enabled
Yes, opened

So I launch VS. There was already opened some repository from GitHub.
I want to switch to another.
And when I click on green plug icon in Solution Explorer it crashes.

@shana
Copy link
Collaborator

@shana shana commented Jul 31, 2015

@xperiandri Thanks for the info. Can you tell me the version of Visual Studio that's reported in Help - About window, and whether it's Community or Enterprise?

@shana
Copy link
Collaborator

@shana shana commented Jul 31, 2015

@xperiandri Also, does your Team Explorer Home page tab look like the one below?

screen shot 2015-07-31 at 5 24 29 pm

@xperiandri
Copy link
Author

@xperiandri xperiandri commented Jul 31, 2015

Microsoft Visual Studio Enterprise 2015
Version 14.0.23107.0 D14REL
Microsoft .NET Framework
Version 4.6.00081

Installed Version: Enterprise

Architecture and Modeling Tools   00322-80000-00000-AA983
Microsoft Architecture and Modeling Tools

UML® and Unified Modeling Language™ are trademarks or registered trademarks of the Object Management Group, Inc. in the United States and other countries.

Visual Basic 2015   00322-80000-00000-AA983
Microsoft Visual Basic 2015

Visual C# 2015   00322-80000-00000-AA983
Microsoft Visual C# 2015

Visual C++ 2015   00322-80000-00000-AA983
Microsoft Visual C++ 2015

Visual F# 2015 RC   00322-80000-00000-AA983
Microsoft Visual F# 2015 RC

Windows Phone SDK 8.0 - ENU   00322-80000-00000-AA983
Windows Phone SDK 8.0 - ENU

ArrayPlotter   0.4
Array visualisation from within the debugger for C#/C++

ASP.NET and Web Tools   14.0.20711.0
ASP.NET and Web Tools

ASP.NET Web Frameworks and Tools 2013   5.2.30624.0
For additional information, visit http://www.asp.net/

BuildVision   1.3.1.27
Building process visualization.

CodeLineage   1.0
Information about my package

CodeMaid   v0.8.0
CodeMaid is an open source Visual Studio extension to cleanup, dig through and simplify our C#, C++, F#, VB, PHP, JSON, XAML, XML, ASP, HTML, CSS, LESS, SCSS, JavaScript and TypeScript coding.

Written by Steve Cadwallader, for more information visit http://www.codemaid.net/

CodeRush for Roslyn (Preview)   1.0.4.0
DevExpress CodeRush for Roslyn (Preview) package.

Common Azure Tools   1.5
Provides common services for use by Azure Mobile Services and Microsoft Azure Tools.

DisableNoSourceAvailableTab 3   1.0
Information about my package

EditProj   1.0
This packages allows you to edit project files without the need to unload them first.

Extensibility Tools   1.1.75
An extension for making it easier to write Visual Studio extensions

F# Snippet   1.0
F# code snippet

FindUnusedFiles   1.0
Information about my package

Gardiner.VsShowMissing   1.0
Find files references in project files that don't exist on disk

GenerateUnitTest   1.0
Generates unit test code for methods in classes under test.

Microsoft Azure HDInsight HQL Service   2.0.2200.0
Language service for Hive query

Microsoft Azure HDInsight Tools for Visual Studio   2.0.2200.0
An integrated development environment for HDInsight application development.

Microsoft Azure Mobile Services Tools   1.4
Microsoft Azure Mobile Services Tools

Microsoft Azure Tools   2.7
Microsoft Azure Tools for Microsoft Visual Studio 2015 - v2.7.30713.1601

Microsoft Code Digger   0.9
Microsoft Code Digger

Microsoft.Pex.VisualStudio   1.0
Pex

Multilingual App Toolkit   3.1.1250.0
Multilingual App Toolkit helps you localize your Windows Store app by providing file management, pseudo and machine translation, translation editor, and build integration. http://go.microsoft.com/fwlink?linkid=245767

NuGet Package Manager   3.0.0
NuGet Package Manager in Visual Studio. For more information about NuGet, visit http://docs.nuget.org/.

NuGet References   1.0
Save time by managing your NuGet references right from the Solution Explorer packages.config

PreEmptive Analytics Visualizer   1.2
Microsoft Visual Studio extension to visualize aggregated summaries from the PreEmptive Analytics product.

QuickLaunch Commands   1.5
Commands search provider integrating with Visual Studio's Quick Launch

RegexTester   1.0
This is regular extension tester.

SQL Server Data Tools   14.0.50717.0
Microsoft SQL Server Data Tools

StopOnFirstBuildError   1.0
StopOnFirstBuildError

Stops a solution build immediately after a project has failed to build.

http://tech.einaregilsson.com/2011/01/06/stop-build-on-first-error-in-visual-studio-2010/

Switch Startup Project   1.0
Provides a toolbar dropdown box  to switch between startup projects.

Syntax Visualizer   1.0
An extension for visualizing Roslyn SyntaxTrees.

T4 Toolbox   14.0.0.0
Extends code generation capabilities of Text Templates.

Trailing Whitespace Visualizer   1.0
Makes it easier than ever to identify and remove trailing whitespace in any code file

Visual F# Power Tools   2.0.0
Visual F# Power Tools

Xamlr   1.0
A better XAML formatter for Visual Studio
@xperiandri
Copy link
Author

@xperiandri xperiandri commented Jul 31, 2015

teamexplorer

@xperiandri
Copy link
Author

@xperiandri xperiandri commented Jul 31, 2015

It crashes periodically.
I uninstalled GitHub extension today.
And installed just now. And it work
But after some time it starts crashing.
And after I delete extension Visual Studio works fine.

@shana
Copy link
Collaborator

@shana shana commented Jul 31, 2015

@xperiandri Thanks! I know how it's crashing but not exactly why, you've been very helpful! We'll get out an update to fix this asap.

@xperiandri
Copy link
Author

@xperiandri xperiandri commented Jul 31, 2015

Cool! Thanks!

@joeseggie
Copy link

@joeseggie joeseggie commented Aug 4, 2015

Am also having the same problem, but am using Visual Studio Community 2015 edition.

@MichaelPetrinolis
Copy link

@MichaelPetrinolis MichaelPetrinolis commented Aug 4, 2015

The same happens to me, especially when I have vs2015 open and connected to TFS2010, if I open a vs2015 instance without solution loaded and press manage connections it crashes immediately

@shana
Copy link
Collaborator

@shana shana commented Aug 4, 2015

@joeseggie @MichaelPetrinolis Could you post stacktraces of the crashes?

@joeseggie
Copy link

@joeseggie joeseggie commented Aug 5, 2015

@shana Yesterday I uninstalled Community Edition and installed Enterprise edition and looks like the problem was resolved. I might not be able to reproduce the failure, but if it comes up again I will post the stack trace.

@MichaelPetrinolis
Copy link

@MichaelPetrinolis MichaelPetrinolis commented Aug 5, 2015

Hi, it is pretty easy to reproduce the issue.

  1. Launch vs2015 by opening an existing GitHub solution
  2. Launch vs2015. In the team viewer window press the manage connections button.
    Studio crashes.

below is the stack trace. I have also the .dmp file if you want it.
mscorlib.dll!System.Runtime.CompilerServices.AsyncMethodBuilderCore.ThrowAsync.AnonymousMethod__3(object state) Line 1018
WindowsBase.dll!System.Windows.Threading.ExceptionWrapper.InternalRealCall(System.Delegate callback, object args, int numArgs) Line 111
WindowsBase.dll!System.Windows.Threading.ExceptionWrapper.TryCatchWhen(object source = {System.Windows.Threading.Dispatcher}, System.Delegate callback, object args, int numArgs, System.Delegate catchHandler = null) Line 37
WindowsBase.dll!System.Windows.Threading.DispatcherOperation.InvokeImpl() Line 583
WindowsBase.dll!System.Windows.Threading.DispatcherOperation.InvokeInSecurityContext(object state) Line 528
mscorlib.dll!System.Threading.ExecutionContext.RunInternal(System.Threading.ExecutionContext executionContext, System.Threading.ContextCallback callback, object state, bool preserveSyncCtx) Line 954
mscorlib.dll!System.Threading.ExecutionContext.Run(System.Threading.ExecutionContext executionContext, System.Threading.ContextCallback callback, object state, bool preserveSyncCtx) Line 902
mscorlib.dll!System.Threading.ExecutionContext.Run(System.Threading.ExecutionContext executionContext, System.Threading.ContextCallback callback, object state) Line 891
WindowsBase.dll!System.Windows.Threading.DispatcherOperation.Invoke() Line 441
WindowsBase.dll!System.Windows.Threading.Dispatcher.ProcessQueue() Line 2232
WindowsBase.dll!System.Windows.Threading.Dispatcher.WndProcHook(System.IntPtr hwnd, int msg, System.IntPtr wParam, System.IntPtr lParam, ref bool handled) Line 2485
WindowsBase.dll!MS.Win32.HwndWrapper.WndProc(System.IntPtr hwnd = 0x000903b2, int msg = 0x0000c1ed, System.IntPtr wParam = 0x00000000, System.IntPtr lParam = 0x00000000, ref bool handled = false) Line 341
WindowsBase.dll!MS.Win32.HwndSubclass.DispatcherCallbackOperation(object o) Line 494
WindowsBase.dll!System.Windows.Threading.ExceptionWrapper.InternalRealCall(System.Delegate callback, object args, int numArgs) Line 104
WindowsBase.dll!System.Windows.Threading.ExceptionWrapper.TryCatchWhen(object source = {System.Windows.Threading.Dispatcher}, System.Delegate callback, object args, int numArgs, System.Delegate catchHandler = null) Line 37
WindowsBase.dll!System.Windows.Threading.Dispatcher.LegacyInvokeImpl(System.Windows.Threading.DispatcherPriority priority, System.TimeSpan timeout, System.Delegate method, object args, int numArgs) Line 1445
WindowsBase.dll!MS.Win32.HwndSubclass.SubclassWndProc(System.IntPtr hwnd = 0x000903b2, int msg = 0x0000c1ed, System.IntPtr wParam = 0x00000000, System.IntPtr lParam = 0x00000000) Line 392

@shana
Copy link
Collaborator

@shana shana commented Aug 5, 2015

@xperiandri @joeseggie @MichaelPetrinolis I've pushed a beta (https://github.com/github/VisualStudio/releases/tag/v1.0.12-beta0) with a fix for this issue, could you try it out and see if it fixes it for you? Feel free to update this issue with any feedback you have.

Thanks!

@xperiandri
Copy link
Author

@xperiandri xperiandri commented Aug 5, 2015

Cool!
For now it does not crash. Will test more.

@MichaelPetrinolis
Copy link

@MichaelPetrinolis MichaelPetrinolis commented Aug 6, 2015

It seems ok.

Thanx!

@shana
Copy link
Collaborator

@shana shana commented Aug 13, 2015

Fix released in v1.0.12.1 (website and VS gallery)

@tim-dunn
Copy link

@tim-dunn tim-dunn commented Oct 13, 2015

Sorry to exhume the deceased equine. I'm running GitHub 1.0.15.2, and it's crashing. (And it's crashing without it installed.) Help requested.

Microsoft Visual Studio Enterprise 2015
Version 14.0.23107.0 D14REL
Microsoft .NET Framework
Version 4.6.00081

Installed Version: Enterprise

Architecture and Modeling Tools   00322-80000-00000-AA489
Microsoft Architecture and Modeling Tools

UML® and Unified Modeling Language™ are trademarks or registered trademarks of the Object Management Group, Inc. in the United States and other countries.

Visual Basic 2015   00322-80000-00000-AA489
Microsoft Visual Basic 2015

Visual C# 2015   00322-80000-00000-AA489
Microsoft Visual C# 2015

Visual C++ 2015   00322-80000-00000-AA489
Microsoft Visual C++ 2015

Application Insights Tools for Visual Studio Package   1.0
Application Insights Tools for Visual Studio

ASP.NET and Web Tools   14.0.20626.0
ASP.NET and Web Tools

ASP.NET Web Frameworks and Tools 2013   5.2.30624.0
For additional information, visit http://www.asp.net/

Common Azure Tools   1.5
Provides common services for use by Azure Mobile Services and Microsoft Azure Tools.

GenerateUnitTest   1.0
Generates unit test code for methods in classes under test.

GitHub.VisualStudio   1.0
A Visual Studio Extension that brings the GitHub Flow into Visual Studio.

Microsoft Azure Mobile Services Tools   1.4
Microsoft Azure Mobile Services Tools

Microsoft Code Digger   0.9
Microsoft Code Digger

Microsoft Team Foundation Server 2015 Power Tools   14.0
Power Tools that extend the Team Foundation Server integration with Visual Studio.

Microsoft Visual Studio Process Editor   1.0
Process Editor for Microsoft Visual Studio Team Foundation Server

Microsoft.Pex.VisualStudio   1.0
Pex

NuGet Package Manager   3.0.0
NuGet Package Manager in Visual Studio. For more information about NuGet, visit http://docs.nuget.org/.

PreEmptive Analytics Visualizer   1.2
Microsoft Visual Studio extension to visualize aggregated summaries from the PreEmptive Analytics product.

SQL Server Data Tools   14.0.50616.0
Microsoft SQL Server Data Tools

StyleCop   4.7
Provides source code style and consistency tools. See http://www.stylecop.codeplex.com/ for more details.

Error | Offline

System.InvalidOperationException: Operation is not valid due to the current state of the object.
   at System.Runtime.InteropServices.Marshal.ThrowExceptionForHRInternal(Int32 errorCode, IntPtr errorInfo)
   at Microsoft.TeamFoundation.Git.Provider.ServiceProviderExtensionMethods.EnsurePackageLoaded(IServiceProvider serviceProvider, Guid packageGuid)
   at Microsoft.TeamFoundation.Git.Provider.ServiceProviderExtensionMethods.EnsureSccAndTfPackagesLoaded(IServiceProvider serviceProvider)
   at Microsoft.TeamFoundation.Git.Provider.Repositories.GitTeamProjectExtendedInfoProvider.set_ServiceProvider(IServiceProvider value)
   at Microsoft.VisualStudio.TeamFoundation.TeamExplorer.ConnectPage.ConnectPageVS.Initialize(Object sender, PageInitializeEventArgs e)
   at Microsoft.TeamFoundation.Controls.WPF.TeamExplorer.Framework.TeamExplorerPageHost.Initialize(TeamExplorerPageContext context)

Error

System.InvalidOperationException: Operation is not valid due to the current state of the object.
   at System.Runtime.InteropServices.Marshal.ThrowExceptionForHRInternal(Int32 errorCode, IntPtr errorInfo)
   at Microsoft.TeamFoundation.Git.Provider.ServiceProviderExtensionMethods.EnsurePackageLoaded(IServiceProvider serviceProvider, Guid packageGuid)
   at Microsoft.TeamFoundation.Git.Provider.ServiceProviderExtensionMethods.EnsureSccAndTfPackagesLoaded(IServiceProvider serviceProvider)
   at Microsoft.TeamFoundation.Git.Provider.Repositories.RepositoryListSectionVS.Initialize(Object sender, SectionInitializeEventArgs e)
   at Microsoft.TeamFoundation.Controls.WPF.TeamExplorer.Framework.TeamExplorerSectionHost.Initialize(Object context)
@shana
Copy link
Collaborator

@shana shana commented Oct 13, 2015

@tim-dunn The stacktrace looks like it's crashing when trying to list the known repositories in the connect section during loading. If it's crashing without the github extension installed, then it's definitely not a github extension issue (and it's not in the stacktrace so it's likely not us).

@clboles @mtbandolier any ideas?

@tim-dunn
Copy link

@tim-dunn tim-dunn commented Oct 13, 2015

TL;DR: It's still crashing after I tried to fix it.

Long form:
Uninstalled GitHub Desktop stand-alone executable via Revo Uninstaller Pro
Uninstalled VS2015.
Renamed my %USERPROFILE% files that contained my workspaces
Installed VS2015 under Revo Uninstaller Pro, so it logs all changes. (No dice.)
Uninstalled VS2015 with Revo using the log file
Reinstalled VS2015

Searched registry (didn't make any changes). Searching for 'git' returns hits on 'diGIT', so that doesn't work. Found some keys for 'TeamFound' and 'GitHub', but they don't look all that suspicious.

@shana
Copy link
Collaborator

@shana shana commented Oct 13, 2015

GitHub Desktop has nothing to do with VS, so removing it won't change things.

Try closing VS, opening a VS 2015 command prompt, and running devenv /updateConfiguration, and then running VS again.

If that doesn't help, try devenv /setup (takes longer).

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

Successfully merging a pull request may close this issue.

None yet
6 participants
You can’t perform that action at this time.