NullReferenceException in SystemColorTracker.CleanOutBrokenLinks()

Switched focus from one application to one with XPMenus and received the following error: System.NullReferenceException: Object reference not set to an instance of an object. at System.Drawing.Internal.SystemColorTracker.CleanOutBrokenLinks() at System.Drawing.Internal.SystemColorTracker.GarbageCollectList() at System.Drawing.Internal.SystemColorTracker.Add(ISystemColorTracker obj) at System.Drawing.Pen..ctor(Color color, Single width) at Syncfusion.Windows.Forms.Tools.CommandBar.DrawGripper(Graphics gph) at Syncfusion.Windows.Forms.Tools.CommandBar.DrawDockedForeground(Graphics gph) at Syncfusion.Windows.Forms.Tools.CommandBar.OnPaint(PaintEventArgs e) at Syncfusion.Windows.Forms.Tools.XPMenus.CommandBarExt.OnPaint(PaintEventArgs e) at System.Windows.Forms.Control.PaintWithErrorHandling(PaintEventArgs e, Int16 layer, Boolean disposeEventArgs) at System.Windows.Forms.Control.WmPaint(Message& m) at System.Windows.Forms.Control.WndProc(Message& m) at Syncfusion.Windows.Forms.Tools.XPMenus.CommandBarExt.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)

4 Replies

BI Brian Ingenito February 7, 2005 08:41 PM UTC

Using 2.1, with default menu style on Windows XP. >Switched focus from one application to one with XPMenus and received the following error: > >System.NullReferenceException: Object reference not set to an instance of an object. > at System.Drawing.Internal.SystemColorTracker.CleanOutBrokenLinks() > at System.Drawing.Internal.SystemColorTracker.GarbageCollectList() > at System.Drawing.Internal.SystemColorTracker.Add(ISystemColorTracker obj) > at System.Drawing.Pen..ctor(Color color, Single width) > at Syncfusion.Windows.Forms.Tools.CommandBar.DrawGripper(Graphics gph) > at Syncfusion.Windows.Forms.Tools.CommandBar.DrawDockedForeground(Graphics gph) > at Syncfusion.Windows.Forms.Tools.CommandBar.OnPaint(PaintEventArgs e) > at Syncfusion.Windows.Forms.Tools.XPMenus.CommandBarExt.OnPaint(PaintEventArgs e) > at System.Windows.Forms.Control.PaintWithErrorHandling(PaintEventArgs e, Int16 layer, Boolean disposeEventArgs) > at System.Windows.Forms.Control.WmPaint(Message& m) > at System.Windows.Forms.Control.WndProc(Message& m) > at Syncfusion.Windows.Forms.Tools.XPMenus.CommandBarExt.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)


AD Administrator Syncfusion Team February 8, 2005 03:38 PM UTC

Hi Brian, Is this a one time problem or have you been able to reproduce it? Some more information or a sample could help me track this down. Thank you for your cooperation in this matter. Regards, Gregory Austin Syncfusion, Inc.


BI Brian Ingenito February 9, 2005 04:23 PM UTC

I''ve seen this twice while testing, but can''t readily reproduce. Both times resulted in the main menu having a red x over it. I''ve seen object in use elsewhere errors frequently in paint events. We upgraded from 1.6 to 2.1 to try and eliminate, but with no success. I think they happen more frequently now. I''ve double and triple checked threading and I''m positive all access to the barmanager is done on the appropriate thread. >Hi Brian, > > Is this a one time problem or have you been able to reproduce it? Some more information or a sample could help me track this down. Thank you for your cooperation in this matter. > >Regards, >Gregory Austin >Syncfusion, Inc.


AD Administrator Syncfusion Team February 9, 2005 05:00 PM UTC

Hi Brian, Please review the following MS Forum post to verify that you''re accessing your Controls correctly from your Threads: Controls / Thread Safe ? If that doesn''t help, could you please provide us with a sample that demonstrates this problem or a stripped down version of your application so that we can attempt to reproduce this problem? Regards, Gregory Austin Syncfusion, Inc.

Loader.
Up arrow icon