We are using the 8.2 controls in a Windows application accessed through Citrix. Occasionally we will get a NullReferenceException when the mouse moves over a random control. It is not consistent on when it occurs, but always seems to occur in the ScreenFromRectangle from what I've seen. The code calling the ScreenFromRectangle method varies, but most often appears to occur in the DropDown control so far. The exception details below is from when the user was hovering over a filter dropdown on a grid.
Is there any known problems with the ScreenFromRectangle method or can anyone provide some help in determining what is going on?
Latest exception:
System.NullReferenceException: Object reference not set to an instance of an object.
at Infragistics.Win.Utilities.ScreenFromRectangle(Rectangle rect, Rectangle mustContainRect)
at Infragistics.Win.Utilities.ScreenFromRectangle(Rectangle rect)
at Infragistics.Win.ToolTip.Show(Rectangle displayRect, Boolean calculateEmbeddableEditorSize, Boolean adjustX, Boolean adjustY, Rectangle exclusionRect, Boolean excludeX, Boolean excludeY, EmbeddableEditorBase editor, EmbeddableEditorOwnerBase owner, Object ownerContext, Boolean rightAlign, Int32 maxWidth)
at Infragistics.Win.ToolTip.Show(Rectangle displayRect, Boolean calculateEmbeddableEditorSize, Boolean adjustX, Boolean adjustY, Rectangle exclusionRect, Boolean excludeX, Boolean excludeY, EmbeddableEditorBase editor, EmbeddableEditorOwnerBase owner, Object ownerContext, Boolean rightAlign)
at Infragistics.Win.ControlUIElementBase.ShowToolTip(IUltraControl ultraControl, UIElement element, ToolTipInfo toolTipInfo)
at Infragistics.Win.ControlUIElementBase.MouseHoverToolTipElement(IUltraControl ultraControl, UIElement element)
at Infragistics.Win.ControlUIElementBase.NotifyMouseHover(UIElement element)
at Infragistics.Win.ControlUIElementBase.OnHoverTimer_Tick(Object sender, EventArgs e)
at System.Windows.Forms.Timer.OnTick(EventArgs e)
at System.Windows.Forms.Timer.TimerNativeWindow.WndProc(Message& m)
at System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)
Hello,
I am following up on this thread since it has been referenced recently to see if the issue has been addressed. This issue was addressed with development issue 36525 and is in the latest service release of NetAdvantage. If you are seeing this issue with NetAdvantage 2009 Volume 2 through NetAdvantage 2010 Volume 3, you should test with the latest service release to see if the issue is resolved.
Let me know if you have any questions with this matter.
Below is the work around on this issue. Work around taken from the following website.
http://connect.microsoft.com/VisualStudio/feedback/details/391340/menustrip-does-not-support-lack-of-primary-screen
"Try having a primary screen defined.With Citrix, this implies setting the primary screen on left, or running in non-seamless mode. "
Similar workaround from one of our customers is "swapping my left and right monitors so that the Primary monitor is on the left does work around this issue."
Hi,
It looks like this is blowing up when trying to show a tooltip. The ScreenFromRectangle method is trying to determine which monitor (on a multi-monitor system) that the tooltip should display on.So it uses some static methods like Screen.PrimaryScreen and Screen.Screens.
I'm not sure how this would work over Citrix. I'm guessing that the DotNet framework knows nothing about the monitor(s) on the client machine and so the code is dealing with the monitor(s) on the server. Does your Citrix server have any monitors at all? If not, then perhaps PrimaryScreen is returning null and that's where the NullReferenceException is coming from. If that's the case, then this is a bug and we need to put in some null checks to fix it.
In the mean time, you can probably work around this by turning off ToolTips on whatever control is blowing up.