04-01-2009 02:27 PM
Measurement studio 8.5 and 8.6 with vs 2008
I have an application that usually works fine, however with a specific data set I now get the following exceptions, can anyone suggest what may be the cause of this within the NationalInstruments Library ? I can't produce a test app as this is a commercial prduct using various other libraries.
Thanks
Paul
009-04-01 20:18:50,917 [11] ERROR - Object is currently in use elsewhere.
at System.Drawing.Graphics.Restore(GraphicsState gstate)
at NationalInstruments.Restricted.GraphicsScope.Dispose(Boolean disposing)
at NationalInstruments.Restricted.GraphicsScope.Dispose()
at NationalInstruments.Restricted.ControlElement.a(ComponentDrawArgsInternal A_0, Rectangle A_1)
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.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)
2009-04-01 20:18:59,904 [11] ERROR - Attempted to read or write protected memory. This is often an indication that other memory is corrupt.
at System.Drawing.SafeNativeMethods.Gdip.GdipCreateFromHDC(HandleRef hdc, IntPtr& graphics)
at System.Drawing.Graphics.FromHdcInternal(IntPtr hdc)
at System.Windows.Forms.PaintEventArgs.get_Graphics()
at System.Windows.Forms.Control.PaintException(PaintEventArgs e)
at System.Windows.Forms.Control.PaintWithErrorHandling(PaintEventArgs e, Int16 layer, Boolean disposeEventArgs)
at System.Windows.Forms.Control.WmEraseBkgnd(Message& m)
at System.Windows.Forms.Control.WndProc(Message& m)
at System.Windows.Forms.ScrollableControl.WndProc(Message& m)
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)
04-01-2009 02:34 PM
I'm also getting this when loading the same file sometimes which would seem to be related
Paul
2009-04-01 20:31:34,466 [11] ERROR - Parameter is not valid.
at System.Drawing.Graphics.Restore(GraphicsState gstate)
at NationalInstruments.Restricted.GraphicsScope.Dispose(Boolean disposing)
at NationalInstruments.Restricted.GraphicsScope.Dispose()
at NationalInstruments.Restricted.ControlElement.a(ComponentDrawArgsInternal A_0, Rectangle A_1)
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.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)
04-02-2009 07:40 AM
Hi Paul,
I am not entirely sure what might be causing this but I shall have a look into it for you. I take it this happens every time? What are you doing with the data? In particular updating any indicators? They appear to be graphics errors which is why I mention this. Do you see the same behavoir on different PCs? Is there anything about this data inparticular that you think could be causing this? Or is there a particular section of code that appears to be causing this and if so could you send us a snippet? This should help to narrow down the issue.
If you could answer some of these questions and I can look into this a bit more.
Regards,
04-02-2009 07:51 AM
It's very similar on different machines and I can see nothing particulary strange with the data, but it's only happening with this dataset, others from the same batch seem fine and it's the first time I've seen this occur.I half suspected 8.6 as this is the first release that's been upgraded to that but after uninstalling it and re-installing 8.5I still got the same thing happening.
The only thing that may be happening is that a cursor may be changing colour, but I turned all of our timers that do this off and it still happened.
The application is a number of WaveformGraphs with multiple plots on each graph, also cursors and annotations etc. on a graph.
Thanks
Paul
04-08-2009 08:00 AM
Hi Paul,
So this dataset is treated the same as all of the others? Are these graphs a static view or are they strip charts?
Regards,
04-12-2009 01:09 PM
The dataset is treated in exactly the same way as the others, by static I'm assumin you mean that the data is plotted once and not updated ? The data is actually updated just once with a plotxyappend
regards
Paul
04-15-2009 07:59 AM
Hi Paul,
To narrow down the cause of this problem we need to work out what is unique about this data set in relation to the other data sets.
How are theses data sets been generated?
Are you plotting this specific data set differently than the others (I assume from your previous comments this is not the case).
Basically we need to find out the differences between this data set and the others and what differences there are in your application depending on the data set.
Thanks for your assistance with this.
Best regards,
John
04-15-2009 08:16 AM
I see nothing strange with the data, in fact it actually plots a couple of times but then bombs out when I try to view it again later (there are a number of charts in memory at once but only one on screen at a time)
If it helps I could put together a zip file with the application, symbol files and the data files causing the problem together with instructions how to make it crash.
Paul
04-15-2009 08:57 AM
Hi Paul,
That would be great as it would allow us to re-create the issue and therfore make is far easier to resolve.
Thanks
John
04-15-2009 10:41 AM
could you send me an email of where to send a link for it to ?