We have RichEditControl with Menumanager (BarManager) in a simple XtraUserControl form placed inside a window (XtraForm)
This is to allow the user to format styles, fonts etc.
When the user selects the down arrow (see attachment) and then selects any font size from the font size dropdownlist the following exception is thrown:
Cannot access a disposed object.Object name: 'QuickCustomizationBarControl'.
at System.Windows.Forms.Control.CreateHandle() at System.Windows.Forms.Control.get_Handle() at System.Windows.Forms.Control.PointToClientInternal(Point p) at DevExpress.XtraBars.Controls.CustomLinksControl.CheckUpdateHyperlink(BarItemLink link, Point pt) at DevExpress.XtraBars.Controls.CustomLinksControl.OnMouseMoveCore(MouseEventArgs e) at DevExpress.XtraBars.Controls.CustomPopupBarControl.OnMouseMoveCore(MouseEventArgs e) at DevExpress.XtraBars.Controls.CustomLinksControl.OnMouseMove(MouseEventArgs e) at System.Windows.Forms.Control.WmMouseMove(Message& m) at System.Windows.Forms.Control.WndProc(Message& m) at DevExpress.XtraBars.Controls.CustomControl.WndProc(Message& msg) at System.Windows.Forms.Control.ControlNativeWindow.OnMessage(Message& m) at System.Windows.Forms.Control.ControlNativeWindow.WndProc(Message& m) at System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)
What can be done to prevent this exception from happening, as this seems not to originate from any code block by our developers.
Thanks
Here is a simple project where I was able to reproduce the exception. If you repetitively select from "font style" and "font size" dropdownlists after a few times the following exception will be thrown:
System.ObjectDisposedException was unhandled HResult=-2146232798 Message=Cannot access a disposed object.Object name: 'QuickCustomizationBarControl'. ObjectName=QuickCustomizationBarControl Source=System.Windows.Forms StackTrace: at System.Windows.Forms.Control.CreateHandle() at System.Windows.Forms.Control.get_Handle() at System.Windows.Forms.Control.PointToClientInternal(Point p) at DevExpress.XtraBars.Controls.CustomLinksControl.GetLinkByPoint(Point screenPoint, Boolean includeSeparator) at DevExpress.XtraBars.Controls.CustomLinksControl.GetLinkByPoint(Point screenPoint) at DevExpress.XtraBars.Controls.CustomLinksControl.OnMouseMoveCore(MouseEventArgs e) at DevExpress.XtraBars.Controls.CustomPopupBarControl.OnMouseMoveCore(MouseEventArgs e) at DevExpress.XtraBars.Controls.CustomLinksControl.OnMouseMove(MouseEventArgs e) at System.Windows.Forms.Control.WmMouseMove(Message& m) at System.Windows.Forms.Control.WndProc(Message& m) at DevExpress.XtraBars.Controls.CustomControl.WndProc(Message& msg) at System.Windows.Forms.Control.ControlNativeWindow.OnMessage(Message& m) at System.Windows.Forms.Control.ControlNativeWindow.WndProc(Message& m) at System.Windows.Forms.NativeWindow.DebuggableCallback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam) at System.Windows.Forms.UnsafeNativeMethods.DispatchMessageW(MSG& msg) at System.Windows.Forms.Application.ComponentManager.System.Windows.Forms.UnsafeNativeMethods.IMsoComponentManager.FPushMessageLoop(IntPtr dwComponentID, Int32 reason, Int32 pvLoopData) at System.Windows.Forms.Application.ThreadContext.RunMessageLoopInner(Int32 reason, ApplicationContext context) at System.Windows.Forms.Application.ThreadContext.RunMessageLoop(Int32 reason, ApplicationContext context) at System.Windows.Forms.Application.Run(Form mainForm) at TestXtraBars.Program.Main() in c:\users\omart\documents\visual studio 2015\Projects\TestXtraBars\TestXtraBars\Program.cs:line 19 at System.AppDomain._nExecuteAssembly(RuntimeAssembly assembly, String[] args) at System.AppDomain.ExecuteAssembly(String assemblyFile, Evidence assemblySecurity, String[] args) at Microsoft.VisualStudio.HostingProcess.HostProc.RunUsersAssembly() at System.Threading.ThreadHelper.ThreadStart_Context(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.Threading.ThreadHelper.ThreadStart() InnerException:
To better explain what I mean be selecting between "font style" and "font size" here is an image showing the selection
Hello,
Thank you for the detailed description. We greatly appreciate it.
I've passed this ticket to our R&D team for further research. We will update it once we make progress.