Search code examples
asp.net.netvisual-studio-2013iis-expressdevenv

Visual Studio and IIS Express randomly stops working


I have been using this machine for development since a year and its a brand new one. Now from 2-3 days my visual studio stops working while I am running my asp.net MVC application and restarts. Sometimes IIS Express stops working and even the browser exits.

I have checked activitylog.xml

Source: Editor or Editor Extension

System.ComponentModel.Win32Exception (0x80004005): Not enough storage is available to process this command at MS.Win32.UnsafeNativeMethods.RegisterClassEx(WNDCLASSEX_D wc_d) at MS.Win32.HwndWrapper..ctor(Int32 classStyle, Int32 style, Int32 exStyle, Int32 x, Int32 y, Int32 width, Int32 height, String name, IntPtr parent, HwndWrapperHook[] hooks) at System.Windows.Interop.HwndSource.Initialize(HwndSourceParameters parameters) at System.Windows.Interop.HwndSource..ctor(HwndSourceParameters parameters) at System.Windows.Controls.Primitives.Popup.PopupSecurityHelper.BuildWindow(Int32 x, Int32 y, Visual placementTarget, Boolean transparent, HwndSourceHook hook, AutoResizedEventHandler handler) at System.Windows.Controls.Primitives.Popup.BuildWindow(Visual targetVisual) at System.Windows.Controls.Primitives.Popup.CreateWindow(Boolean asyncCall) at System.Windows.Controls.Primitives.Popup.OnIsOpenChanged(DependencyObject d, DependencyPropertyChangedEventArgs e) at System.Windows.DependencyObject.OnPropertyChanged(DependencyPropertyChangedEventArgs e) at System.Windows.FrameworkElement.OnPropertyChanged(DependencyPropertyChangedEventArgs e) at System.Windows.DependencyObject.NotifyPropertyChange(DependencyPropertyChangedEventArgs args) at System.Windows.DependencyObject.UpdateEffectiveValue(EntryIndex entryIndex, DependencyProperty dp, PropertyMetadata metadata, EffectiveValueEntry oldEntry, EffectiveValueEntry& newEntry, Boolean coerceWithDeferredReference, Boolean coerceWithCurrentValue, OperationType operationType) at System.Windows.DependencyObject.SetValueCommon(DependencyProperty dp, Object value, PropertyMetadata metadata, Boolean coerceWithDeferredReference, Boolean coerceWithCurrentValue, OperationType operationType, Boolean isInternal) at System.Windows.DependencyObject.SetValue(DependencyProperty dp, Object value) at Microsoft.VisualStudio.Language.Intellisense.Implementation.MouseTrackingQuickInfoPresenter.Render() at Microsoft.VisualStudio.Language.Intellisense.Implementation.IntellisenseSessionStack.OnSessionPresenterChanged(Object sender, EventArgs e) at Microsoft.VisualStudio.Language.Intellisense.Implementation.IntellisenseSession.RaisePresenterChanged() at Microsoft.VisualStudio.Language.Intellisense.Implementation.QuickInfoSession.Recalculate() at Microsoft.VisualStudio.Language.Intellisense.Implementation.QuickInfoSession.Start() at Microsoft.VisualStudio.Language.Intellisense.Implementation.DefaultQuickInfoController.OnTextView_MouseHover(Object sender, MouseHoverEventArgs e) at Microsoft.VisualStudio.Text.Editor.Implementation.WpfTextView.RaiseHoverEvents()

Some logs Before this error are as follows

  • Begin package load [Microsoft.VisualStudio.Debugger.Parallel]
  • End package load [Microsoft.VisualStudio.Debugger.Parallel]
  • Entering function VBDispatch::GetTypeLib
  • Leaving function VBDispatch::GetTypeLib
  • Entering function VBDispatch::GetTypeLib
  • Leaving function VBDispatch::GetTypeLib
  • Entering function VBDispatch::GetTypeLib
  • Leaving function VBDispatch::GetTypeLib
  • Entering function VBDispatch::GetTypeLib
  • Leaving function VBDispatch::GetTypeLib
  • Entering function VBDispatch::GetTypeLib
  • Leaving function VBDispatch::GetTypeLib
  • Entering function VBDispatch::GetTypeLib
  • Leaving function VBDispatch::GetTypeLib
  • Entering function VBDispatch::GetTypeLib
  • Leaving function VBDispatch::GetTypeLib

Then error (pasted in the start) occurs. Also where else should i look to trace the real cause as this is yesterday's log only.

UPDATE

My event log actually gives devenv error

Application: devenv.exe

Framework Version: v4.0.30319

Description: The process was terminated due to an unhandled exception. Exception Info: System.ComponentModel.Win32Exception at MS.Win32.UnsafeNativeMethods.RegisterClassEx(WNDCLASSEX_D) at MS.Win32.HwndWrapper..ctor(Int32, Int32, Int32, Int32, Int32, Int32, Int32, System.String, IntPtr, MS.Win32.HwndWrapperHook[])


Solution

  • The issue was (totally code related) due to RichTextBox control. Microsoft has given a work around for this bug here