We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. (Last updated on: November 16, 2018).
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

Null reference when closing form

Thread ID:

Created:

Updated:

Platform:

Replies:

30522 Jun 20,2005 09:53 AM UTC Jun 21,2005 01:35 PM UTC WinForms 4
loading
Tags: Tools
Administrator [Syncfusion]
Asked On June 20, 2005 09:53 AM UTC

When I close my main MDI form with several XP bars on I occasionally get the following exception. Any Idea what the problem may be here? System.NullReferenceException: Object reference not set to an instance of an object. at Syncfusion.Windows.Forms.Tools.XPMenus.MdiClientNativeWnd.WndProc(Message& m) at System.Windows.Forms.NativeWindow.DebuggableCallback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam) at System.Windows.Forms.UnsafeNativeMethods.SendMessage(HandleRef hWnd, Int32 msg, IntPtr wParam, IntPtr lParam) at System.Windows.Forms.Control.SendMessage(Int32 msg, IntPtr wparam, Int32 lparam) at System.Windows.Forms.Form.Select(Boolean directed, Boolean forward) at System.Windows.Forms.Control.SelectNextControl(Control ctl, Boolean forward, Boolean tabStopOnly, Boolean nested, Boolean wrap) at System.Windows.Forms.ContainerControl.AfterControlRemoved(Control control) at System.Windows.Forms.Form.AfterControlRemoved(Control control) at System.Windows.Forms.ControlCollection.Remove(Control value) at System.Windows.Forms.ControlCollection.Remove(Control value) at Syncfusion.Windows.Forms.Tools.CommandBarController.Dispose(Boolean disposing) at System.ComponentModel.Component.Dispose() at Syncfusion.Windows.Forms.Tools.XPMenus.CommandBarManager.Dispose(Boolean disposing) at Syncfusion.Windows.Forms.Tools.XPMenus.CommandBarManager.Dispose() at Syncfusion.Windows.Forms.Tools.XPMenus.BarManager.Dispose(Boolean disposing) at Syncfusion.Windows.Forms.Tools.XPMenus.MainFrameBarManager.Dispose(Boolean disposing) at System.ComponentModel.Component.Dispose() at System.ComponentModel.Container.Dispose(Boolean disposing) at System.ComponentModel.Container.Dispose() at Sigma.Matrics.Forms.FormMain.Dispose(Boolean disposing) in c:\kjetil\vs\matrics\forms\formmain.cs:line 95 at System.ComponentModel.Component.Dispose() at System.Windows.Forms.Form.WmClose(Message& m) at System.Windows.Forms.Form.WndProc(Message& m) at System.Windows.Forms.ControlNativeWindow.OnMessage(Message& m) at System.Windows.Forms.ControlNativeWindow.WndProc(Message& m) at System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)

Administrator [Syncfusion]
Replied On June 20, 2005 09:58 AM UTC

P.S. I am using version 3.2.1.0

Administrator [Syncfusion]
Replied On June 20, 2005 09:39 PM UTC

Hi Kjetil, This is a known problem with XPMenus in v3.2.1.0 It has been corrected internally, and the fix is available in a private patch (v3.2.1.1) that can be requested through DirectTrac. I apologize for any inconvenience this may cause. Regards, Gregory Austin Syncfusion Inc.

Administrator [Syncfusion]
Replied On June 21, 2005 09:44 AM UTC

The exception is thrown when my main form is disposed. After this the application is always closed down anyway. I have tried to put a try-catch handler around the dispose statement, and this avoids the exception being shown to the user. If I can trust Windows to clean up afterwards, when the application has closed this basically solves the problem. Do you think this is OK? I am not very eager to upgrade with an internal patch since I use a lot of the products in the Syncfusion studio and I am afraid that this may break something else.

Administrator [Syncfusion]
Replied On June 21, 2005 01:35 PM UTC

Hi Kjetil, That workaround should work fine. Regards, Gregory Austin Syncfusion Inc.

CONFIRMATION

This post will be permanently deleted. Are you sure you want to continue?

Sorry, An error occured while processing your request. Please try again later.

Please sign in to access our forum

or the page will be automatically redirected to sign-in page in 10 seconds.

Warning Icon You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.Close Icon

;