.NET Unhandled Exception crashes Visual Studion 2017

Kamps, Brian 1 Reputation point
2021-11-19T14:18:28.487+00:00

Hi there,

I have Visual Studio 2017 installed, used for support of several VB applications we use. With some latest Microsoft patches installed, VS now crashes when opening an existing project. From Event Viewer it shows this:

Application: devenv.exe
Framework Version: v4.0.30319
Description: The process was terminated due to an unhandled exception.
Exception Info: exception code c0000005, exception address 05732440
Stack:
at System.Windows.Forms.UnsafeNativeMethods+IOleObject.DoVerb(Int32, IntPtr, IOleClientSite, Int32, IntPtr, COMRECT)
at System.Windows.Forms.AxHost.DoVerb(Int32)
at System.Windows.Forms.AxHost.InPlaceActivate()
at System.Windows.Forms.AxHost.TransitionUpTo(Int32)
at System.Windows.Forms.AxHost.CreateHandle()
at System.Windows.Forms.Control.CreateControl(Boolean)
at System.Windows.Forms.Control.CreateControl()
at System.Windows.Forms.Control+ControlCollection.Add(System.Windows.Forms.Control)
at System.Windows.Forms.Form+ControlCollection.Add(System.Windows.Forms.Control)
at System.Windows.Forms.Design.ControlDesigner+DesignerControlCollection.Add(System.Windows.Forms.Control)
at System.RuntimeMethodHandle.InvokeMethod(System.Object, System.Object[], System.Signature, Boolean)
at System.Reflection.RuntimeMethodInfo.UnsafeInvokeInternal(System.Object, System.Object[], System.Object[])
at System.Reflection.RuntimeMethodInfo.Invoke(System.Object, System.Reflection.BindingFlags, System.Reflection.Binder, System.Object[], System.Globalization.CultureInfo)
at System.RuntimeType.InvokeMember(System.String, System.Reflection.BindingFlags, System.Reflection.Binder, System.Object, System.Object[], System.Reflection.ParameterModifier[], System.Globalization.CultureInfo, System.String[])
at System.ComponentModel.Design.Serialization.CodeDomSerializerBase.DeserializeExpression(System.ComponentModel.Design.Serialization.IDesignerSerializationManager, System.String, System.CodeDom.CodeExpression)
at System.ComponentModel.Design.Serialization.CodeDomSerializerBase.DeserializeStatement(System.ComponentModel.Design.Serialization.IDesignerSerializationManager, System.CodeDom.CodeStatement)
at System.ComponentModel.Design.Serialization.CodeDomSerializer.DeserializeStatementToInstance(System.ComponentModel.Design.Serialization.IDesignerSerializationManager, System.CodeDom.CodeStatement)
at System.ComponentModel.Design.Serialization.CodeDomSerializer.Deserialize(System.ComponentModel.Design.Serialization.IDesignerSerializationManager, System.Object)
at System.Windows.Forms.Design.ControlCodeDomSerializer.Deserialize(System.ComponentModel.Design.Serialization.IDesignerSerializationManager, System.Object)
at System.ComponentModel.Design.Serialization.TypeCodeDomSerializer.DeserializeName(System.ComponentModel.Design.Serialization.IDesignerSerializationManager, System.String, System.CodeDom.CodeStatementCollection)
at System.ComponentModel.Design.Serialization.TypeCodeDomSerializer.Deserialize(System.ComponentModel.Design.Serialization.IDesignerSerializationManager, System.CodeDom.CodeTypeDeclaration)
at System.ComponentModel.Design.Serialization.CodeDomDesignerLoader.PerformLoad(System.ComponentModel.Design.Serialization.IDesignerSerializationManager)
at Microsoft.VisualStudio.Design.Serialization.CodeDom.VSCodeDomDesignerLoader.PerformLoad(System.ComponentModel.Design.Serialization.IDesignerSerializationManager)
at Microsoft.VisualStudio.Design.Serialization.CodeDom.VSCodeDomDesignerLoader+DeferredLoadHandler.Microsoft.VisualStudio.TextManager.Interop.IVsTextBufferDataEvents.OnLoadCompleted(Int32)
at Microsoft.VisualStudio.Editor.Implementation.TextDocData+LoadCompletedEventHandler.Invoke(Int32)
at Microsoft.VisualStudio.Editor.Implementation.TextDocData.NotifyOfTextBufferLoad(Boolean)
at Microsoft.VisualStudio.Editor.Implementation.TextDocData.Load(System.String, UInt32, Int32)
at Microsoft.VisualStudio.Editor.Implementation.TextDocData.LoadDocData(System.String)
at Microsoft.VisualStudio.Shell.Interop.IVsUIHierarchy.ExecCommand(UInt32, System.Guid ByRef, UInt32, UInt32, IntPtr, IntPtr)
at Microsoft.Internal.VisualStudio.PlatformUI.HierarchyUtilities+<>c__DisplayClass35_0.<ExecHierParentChain>b__1()
at Microsoft.VisualStudio.ErrorHandler.CallWithCOMConvention(System.Func1<Int32>, Boolean, Boolean) at Microsoft.Internal.VisualStudio.PlatformUI.HierarchyUtilities.ExecHierParentChain(Microsoft.VisualStudio.Shell.IVsHierarchyItemManager, Microsoft.VisualStudio.Shell.Interop.IVsUIHierarchy, Microsoft.VisualStudio.Shell.Interop.IVsUIHierarchy, UInt32, System.Guid ByRef, UInt32, UInt32, IntPtr, IntPtr) at Microsoft.VisualStudio.PlatformUI.HierarchyItem+HierarchyInvocationController.Invoke(System.Collections.Generic.IEnumerable1<System.Object>, Microsoft.Internal.VisualStudio.PlatformUI.InputSource, Boolean)
at Microsoft.Internal.VisualStudio.PlatformUI.InvocationController.Invoke(System.Collections.Generic.IEnumerable1<Microsoft.Internal.VisualStudio.PlatformUI.IInvocationPattern>, Microsoft.Internal.VisualStudio.PlatformUI.InputSource, Boolean, System.Func2<Microsoft.Internal.VisualStudio.PlatformUI.IInvocationPattern,Microsoft.Internal.VisualStudio.PlatformUI.IInvocationController>)
at Microsoft.Internal.VisualStudio.PlatformUI.InvocationController.Invoke(System.Collections.Generic.IEnumerable`1<Microsoft.Internal.VisualStudio.PlatformUI.IInvocationPattern>, Microsoft.Internal.VisualStudio.PlatformUI.InputSource, Boolean)
at Microsoft.Internal.VisualStudio.PlatformUI.PivotTreeViewItem.InvokeItem(System.Windows.Input.InputDevice)
at Microsoft.Internal.VisualStudio.PlatformUI.PivotTreeViewItem.OnMouseLeftButtonDown(System.Windows.Input.MouseButtonEventArgs)
at System.Windows.UIElement.OnMouseLeftButtonDownThunk(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.ReRaiseEventAs(System.Windows.DependencyObject, System.Windows.RoutedEventArgs, System.Windows.RoutedEvent)
at System.Windows.UIElement.OnMouseDownThunk(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.ContentElement.RaiseTrustedEvent(System.Windows.RoutedEventArgs)
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)

The target Framework is set to 4.5 for this application. Changing it does not help. 4.6 is installed.

This is on a Windows 10 Dell PC.

Please , any help you can provide would be appreciated.

Thank you,

Brian

.NET
.NET
Microsoft Technologies based on the .NET software framework.
3,342 questions
VB
VB
An object-oriented programming language developed by Microsoft that is implemented on the .NET Framework. Previously known as Visual Basic .NET.
2,564 questions
Windows Network
Windows Network
Windows: A family of Microsoft operating systems that run across personal computers, tablets, laptops, phones, internet of things devices, self-contained mixed reality headsets, large collaboration screens, and other devices.Network: A group of devices that communicate either wirelessly or via a physical connection.
639 questions
{count} votes

3 answers

Sort by: Most helpful
  1. Jiachen Li-MSFT 26,271 Reputation points Microsoft Vendor
    2021-11-25T06:27:24.18+00:00

    Hi @Kamps, Brian ,

    I will try a new project and let you know.

    VB6 is out of date now, and you can find related suggestions about VB6 in the following forums.
    https://www.vbforums.com/forumdisplay.php?1-Visual-Basic-6-and-Earlier
    After updating the project to a latest version of .NET framework in VB. NET, you can post your question here if you still get the problem in the new project.
    Best Regards.
    Jiachen Li

    ----------

    If the answer is helpful, please click "Accept Answer" and upvote it.
    Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.

    0 comments No comments

  2. Kamps, Brian 1 Reputation point
    2021-11-29T21:16:12.247+00:00

    I don't think VB6 is the issue. Never has been. The projects were upgraded a few years ago in VS2017.

    I've narrowed it down to the ActiveX Client Control from the application that provides a component for .NET applications we create. I have a support ticket in with the vendor. If you care who the vendor is, it's Loftware.

    VS2017 crashes when I try to open a form with this component added. New project or not and it doesn't matter what the Target Framework is set at.

    These projects just use the Compatibility reference. Not having a problem with that.

    It is just suspicious when it stops working after current Microsoft patches were applied, along with .NET 4.8, to our PCs.
    I've also tried disabling .NET 4.8 in the Control Panel on the PC. Same result.

    0 comments No comments

  3. Jiachen Li-MSFT 26,271 Reputation points Microsoft Vendor
    2021-11-30T02:50:50.293+00:00

    Hi @Kamps, Brian ,

    I have a support ticket in with the vendor. If you care who the vendor is, it's Loftware.

    We do not provide support for third-party controls.
    Please report your questions to the third-party support forum or customer center.

    Best Regards.
    Jiachen Li

    ----------

    If the answer is helpful, please click "Accept Answer" and upvote it.
    Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.

    0 comments No comments