Measurement Studio for .NET Languages

cancel
Showing results for 
Search instead for 
Did you mean: 

Drawing Error when moving cursor

Hi,

We have managed to reproduce a drawing error within the NI Measurement studio 7.1 scatter graph. The exception trace was:

Overflow error.

    at System.Drawing.Graphics.CheckErrorStatus(Int32 status)  
    at System.Drawing.Graphics.DrawImage(Image image, Single x, Single y, Single width, Single height)  
    at NationalInstruments.Restricted.GraphicsInternal.DrawImage(Graphics graphics, Image image, Single x, Single y)  
    at NationalInstruments.Restricted.GraphicsInternal.DrawImage(Graphics graphics, Image image, PointF point)  
    at s.a(Graphics , PointF )  
    at s.a(PointF , Rectangle , Graphics )  
    at s.DrawForeground(ComponentDrawArgsInternal args)  
    at NationalInstruments.Restricted.ControlElement.a(ComponentDrawArgsInternal , Rectangle , Boolean )  
    at NationalInstruments.Restricted.ControlElement.DrawChildren(ComponentDrawArgsInternal args, Rectangle clipRectangle)  
    at NationalInstruments.Restricted.ControlElement.a(ComponentDrawArgsInternal , Rectangle , Boolean )  
    at NationalInstruments.Restricted.ControlElement.DrawChildren(ComponentDrawArgsInternal args, Rectangle clipRectangle)  
    at NationalInstruments.Restricted.ControlElement.a(ComponentDrawArgsInternal , Rectangle , Boolean )  
    at NationalInstruments.Restricted.ControlElement.DrawChildren(ComponentDrawArgsInternal args, Rectangle clipRectangle)  
    at NationalInstruments.Restricted.ControlElement.a(ComponentDrawArgsInternal , Rectangle , Boolean )  
    at NationalInstruments.Restricted.ControlElement.a(ComponentDrawArgsInternal , Rectangle )  
    at NationalInstruments.Restricted.ControlElement.Paint(PaintEventArgs e)  
    at NationalInstruments.UI.WindowsForms.ControlBase.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 System.Windows.Forms.ControlNativeWindow.OnMessage(Message& m)  
    at System.Windows.Forms.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.ComponentManager.System.Windows.Forms.UnsafeNativeMethods+IMsoComponentManager.FPushMessageLoop(Int32 dwComponentID, Int32 reason, Int32 pvLoopData)  
    at System.Windows.Forms.ThreadContext.RunMessageLoopInner(Int32 reason, ApplicationContext context)  
    at System.Windows.Forms.ThreadContext.RunMessageLoop(Int32 reason, ApplicationContext context)  
    at System.Windows.Forms.Application.Run(Form mainForm)  

Additional information:

The plots on the graph all have  ProcessSpecialValues set to true.
Only one plot is visible.
As well as regular data values, we have also added NaN data values to the plot. These are used to create gaps in the data (note - these gaps are part of our user's requirements).
A cursor is visible, with snapmode = ToPlot
The error occurred immediately after the x-position of the cursor was changed to match a gap in the data - i.e. an area containing NaN data entries.



0 Kudos
Message 1 of 3
(3,473 Views)

Could you please create a small test project that reproduces this behavior and post it in this thread? Thanks.

- Elton

0 Kudos
Message 2 of 3
(3,462 Views)
I've implemented a workaround based on catching the error and then asking the user to select a different area of the plot.

Given that, helping you fix the graphing control is not very high on my priority list. Don't expect me to produce a test app anytime soon.
0 Kudos
Message 3 of 3
(3,444 Views)