64-Bit winform application targeting Framework version 4.5.2 crashing while clicking on menu bar.
Event Details appended below :-
Application: APPName.exe
Framework Version: v4.0.30319
Description: The process was terminated due to an unhandled exception.
Exception Info: System.OutOfMemoryException
Stack:
at System.Windows.Forms.Control.CreateGraphicsInternal()
at System.Windows.Forms.Control.GetHRgn(System.Drawing.Region)
at System.Windows.Forms.Control.Invalidate(System.Drawing.Region, Boolean)
at System.Windows.Forms.ToolStrip.ClearAllSelectionsExcept(System.Windows.Forms.ToolStripItem)
at System.Windows.Forms.ToolStrip.SetVisibleCore(Boolean)
at System.Windows.Forms.ToolStripDropDown.SetVisibleCore(Boolean)
at System.Windows.Forms.ToolStripManager+ModalMenuFilter.CloseActiveDropDown(System.Windows.Forms.ToolStripDropDown, System.Windows.Forms.ToolStripDropDownCloseReason)
at System.Windows.Forms.ToolStripManager+ModalMenuFilter.ProcessMouseButtonPressed(IntPtr, Int32, Int32)
at System.Windows.Forms.ToolStripManager+ModalMenuFilter.PreFilterMessage(System.Windows.Forms.Message ByRef)
at System.Windows.Forms.Application+ThreadContext.ProcessFilters(MSG ByRef, Boolean ByRef)
at System.Windows.Forms.Application+ThreadContext.PreTranslateMessage(MSG ByRef)
at System.Windows.Forms.Application+ComponentManager.System.Windows.Forms.UnsafeNativeMethods.IMsoComponentManager.FPushMessageLoop(IntPtr, Int32, Int32)
at System.Windows.Forms.Application+ThreadContext.RunMessageLoopInner(Int32, System.Windows.Forms.ApplicationContext)
at System.Windows.Forms.Application+ThreadContext.RunMessageLoop(Int32, System.Windows.Forms.ApplicationContext)
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.ExecutionContext.Run(System.Threading.ExecutionContext, System.Threading.ContextCallback, System.Object)
at System.Threading.ThreadHelper.ThreadStart(System.Object)