none
Both VS 2015 sp3 and VS 2017 crashing when selecting item from navigation bar

    Question

  • Visual Studio 2015 AND 2017 are both crashing on one particular solution (others are OK) when selecting an item in the navigation bar in a code behind page.

    For example, I can select a button control, but then when I select the click event in the right hand drop down, VS crashes.

    I have tried cleaning the solution but I can't really think of much else to try. 

    Again, this is only a problem with one solution, in any of the codebehind pages. 

    Event viewer shows the following:

    Application: devenv.exe
    Framework Version: v4.0.30319
    Description: The process was terminated due to an unhandled exception.
    Exception Info: System.ArgumentNullException
       at Microsoft.CodeAnalysis.Simplification.Simplifier+<ReduceAsync>d__11.MoveNext()
    
    Exception Info: System.AggregateException
       at System.Threading.Tasks.Task.ThrowIfExceptional(Boolean)
       at System.Threading.Tasks.Task.Wait(Int32, System.Threading.CancellationToken)
       at Microsoft.CodeAnalysis.Editor.VisualBasic.NavigationBar.AbstractGenerateCodeItem+VB$StateMachine_6_GetGeneratedDocumentAsync.MoveNext()
    
    Exception Info: System.AggregateException
       at System.Threading.Tasks.Task.ThrowIfExceptional(Boolean)
       at System.Threading.Tasks.Task.Wait(Int32, System.Threading.CancellationToken)
       at Microsoft.CodeAnalysis.Editor.VisualBasic.NavigationBar.VisualBasicNavigationBarItemService.GenerateCodeForItem(Microsoft.CodeAnalysis.Document, Microsoft.CodeAnalysis.Editor.VisualBasic.NavigationBar.AbstractGenerateCodeItem, Microsoft.VisualStudio.Text.Editor.ITextView, System.Threading.CancellationToken)
       at Microsoft.CodeAnalysis.Editor.VisualBasic.NavigationBar.VisualBasicNavigationBarItemService.NavigateToItem(Microsoft.CodeAnalysis.Document, Microsoft.CodeAnalysis.Editor.NavigationBarItem, Microsoft.VisualStudio.Text.Editor.ITextView, System.Threading.CancellationToken)
       at Microsoft.CodeAnalysis.Editor.Implementation.NavigationBar.NavigationBarController.NavigateToItem(Microsoft.CodeAnalysis.Editor.NavigationBarItem, Microsoft.CodeAnalysis.Document, Microsoft.VisualStudio.Text.ITextSnapshot, Microsoft.CodeAnalysis.Editor.INavigationBarItemService, System.Threading.CancellationToken)
       at Microsoft.CodeAnalysis.Editor.Implementation.NavigationBar.NavigationBarController.ProcessItemSelectionSynchronously(Microsoft.CodeAnalysis.Editor.NavigationBarItem, System.Threading.CancellationToken)
       at Microsoft.CodeAnalysis.Editor.Implementation.NavigationBar.NavigationBarController+<>c__DisplayClass22_0.<OnItemSelected>b__0(Microsoft.CodeAnalysis.Editor.Host.IWaitContext)
       at Microsoft.VisualStudio.LanguageServices.Implementation.Utilities.VisualStudioWaitIndicator.Wait(System.String, System.String, Boolean, Boolean, System.Action`1<Microsoft.CodeAnalysis.Editor.Host.IWaitContext>)
       at Microsoft.CodeAnalysis.Editor.Implementation.NavigationBar.NavigationBarController.OnItemSelected(System.Object, Microsoft.CodeAnalysis.Editor.NavigationBarItemSelectedEventArgs)
       at Microsoft.VisualStudio.LanguageServices.Implementation.NavigationBar.NavigationBarClient.Microsoft.VisualStudio.TextManager.Interop.IVsDropdownBarClient.OnItemChosen(Int32, Int32)
       at Microsoft.VisualStudio.Editor.Implementation.VsDropDownBarAdapterMargin.ChooseSelected(System.Windows.Controls.ComboBox)
       at Microsoft.VisualStudio.Editor.Implementation.VsDropDownBarAdapterMargin.comboBox_PreviewMouseUp(System.Object, System.Windows.Input.MouseButtonEventArgs)
       at System.Windows.Input.MouseButtonEventArgs.InvokeEventHandler(System.Delegate, System.Object)
       at System.Windows.RoutedEventArgs.InvokeHandler(System.Delegate, System.Object)
       at System.Windows.RoutedEventHandlerInfo.InvokeHandler(System.Object, System.Windows.RoutedEventArgs)
       at System.Windows.EventRoute.InvokeHandlersImpl(System.Object, System.Windows.RoutedEventArgs, Boolean)
       at System.Windows.UIElement.RaiseEventImpl(System.Windows.DependencyObject, System.Windows.RoutedEventArgs)
       at System.Windows.UIElement.RaiseTrustedEvent(System.Windows.RoutedEventArgs)
       at System.Windows.UIElement.RaiseEvent(System.Windows.RoutedEventArgs, Boolean)
       at System.Windows.Input.InputManager.ProcessStagingArea()
       at System.Windows.Input.InputManager.ProcessInput(System.Windows.Input.InputEventArgs)
       at System.Windows.Input.InputProviderSite.ReportInput(System.Windows.Input.InputReport)
       at System.Windows.Interop.HwndMouseInputProvider.ReportInput(IntPtr, System.Windows.Input.InputMode, Int32, System.Windows.Input.RawMouseActions, Int32, Int32, Int32)
       at System.Windows.Interop.HwndMouseInputProvider.FilterMessage(IntPtr, MS.Internal.Interop.WindowMessage, IntPtr, IntPtr, Boolean ByRef)
       at System.Windows.Interop.HwndSource.InputFilterMessage(IntPtr, Int32, IntPtr, IntPtr, Boolean ByRef)
       at MS.Win32.HwndWrapper.WndProc(IntPtr, Int32, IntPtr, IntPtr, Boolean ByRef)
       at MS.Win32.HwndSubclass.DispatcherCallbackOperation(System.Object)
       at System.Windows.Threading.ExceptionWrapper.InternalRealCall(System.Delegate, System.Object, Int32)
       at System.Windows.Threading.ExceptionWrapper.TryCatchWhen(System.Object, System.Delegate, System.Object, Int32, System.Delegate)
       at System.Windows.Threading.Dispatcher.LegacyInvokeImpl(System.Windows.Threading.DispatcherPriority, System.TimeSpan, System.Delegate, System.Object, Int32)
       at MS.Win32.HwndSubclass.SubclassWndProc(IntPtr, Int32, IntPtr, IntPtr)

    Thanks in advance

    Ben


    • Edited by Benj0 Thursday, March 23, 2017 12:23 AM Downloaded 2017 and it is still happening
    Wednesday, March 22, 2017 8:46 AM

All replies

  • Hi Ben,

    Welcome to the MSDN forum.

    Refer to your description, it looks like this issue more relates to your solution. What's the type of this specific solution?

    >>For example, I can select a button control, but then when I select the click event in the right hand drop down, VS crashes.

    Please try to add a new button or other control from Toolbox to the Form, and go to code page and select the click event to test this issue will persist or not. If it works fine, that means this issue is only about this button control. If not, some factors in this solution blocked it.

    Meanwhile, you can try to run the VS with safe mode using the command: devenv /safemode to check if the default extension caused this issue.

    Best regards,

    Sara


    MSDN Community Support
    Please remember to click "Mark as Answer" the responses that resolved your issue, and to click "Unmark as Answer" if not. This can be beneficial to other community members reading this thread. If you have any compliments or complaints to MSDN Support, feel free to contact MSDNFSF@microsoft.com.

    Thursday, March 23, 2017 6:17 AM
    Moderator
  • Hi Sara, yes I agree that it is a solution specific problem. As a note, if I open up the project file and not the solution it does the same thing, not sure if that matters.

    The button control was just an example, it happens when I select anything in a code behind page, like the load event of the page, itemdatabound of a repeater etc.

    The type of solution is a web forms asp.net 4.6 vb project, if that helps.

    Let me know if you need any more information. 

    Thanks

    Ben

    Thursday, March 23, 2017 7:26 AM
  • Hi Ben,

    Thank you for your update.

    Refer to your description, please redirect to this appropriate forum: Web Forms and they can help you to troubleshot the issue of your development. From there, you will get a more professional support to solve your issue. Since our forum is to discuss Visual Studio WPF/SL Designer, Visual Studio Guidance Automation Toolkit, Developer Documentation and Help System, and Visual Studio Editor. Sorry for this inconvenience and thank you for your understanding.

    Best regards,

    Sara


    MSDN Community Support
    Please remember to click "Mark as Answer" the responses that resolved your issue, and to click "Unmark as Answer" if not. This can be beneficial to other community members reading this thread. If you have any compliments or complaints to MSDN Support, feel free to contact MSDNFSF@microsoft.com.

    Friday, March 24, 2017 9:21 AM
    Moderator