LabWindows/CVI

cancel
Showing results for 
Search instead for 
Did you mean: 

xyGraph causes Runtime Error during Panel resizing

Help
 
 
   When I resize the main panel with the xyGraph panel open I get a the following error. FATAL RUN-TIME ERROR:   "Main_GUI.c", line 197, col 5, thread id 0x000004DC:   The program has caused a 'Double' fault at 001B:6E9D3DEB. This only occurs when data is being graph or data is being displayed.  I have two displays OpenGL picture of the rocket or xy plot of the rocket rates and errors. If the xy Graph is never opened all is OK. But one it is created that is it(displayed or not), no resizing! Once the data is entering the GUI you can not resize the panel with the xy plot displayed or hidden. Any suggestion. The debugger only returns to GetUserEvent(FALSE, &handle, &id). Is there a way I can bypass the CVI's resize and create my own?
David E. Jennings
NASA Sounding Rocket Guidance Navigation and Control Group
NASA/Goddard Space Flight Center/Wallops Flight Facility
Building F10 RM 204
Wallops Island VA, 23337
Phone: (757) 824-1283
Fax: (757) 824-2423
E-mail:Jennings_Dave@nsroc.net / davidejennings@yahoo.com
0 Kudos
Message 1 of 9
(4,119 Views)
Hi, David.

Just to confirm, are you saying that if you've created (but are not displaying) the graph, resizing the panel (without the graph) causes the error? Off the top of my head, I'd first recommend that you double-check the correctness of all the handles that pertain to the graph (and the process of displaying it). You may next want to try one of our graph shipping examples to see if the problem is repeated. To find the graph-related shipping examples, complete the following steps:

1. Run CVI.
2. Select Help>>Find Examples
3. Inthe top left corner of the Example Finder, select the Search tab.
4. Type graph in the keyword field.
5. The graph examples are displayed in the central part of the example window.

Since I'm not familiar with your program, I don't know which example is best, but it would be helpful to know if this error pervades outside your application. Let me know what you find out.
Sarah K.
Search PME
National Instruments
0 Kudos
Message 2 of 9
(4,098 Views)

is it a log plot? or a type of plot which has an invalid domain?

 

0 Kudos
Message 3 of 9
(4,090 Views)
In the app there are 3 stripcharts on the main panel and in the child panel there is a xygraph. The initial state is the xygraph childpanel is hidden and no data is being set to it. The xygraph as a callback to change scaling using SetAxisScalingMode when the user performs a mouse right click. The app crashes when the user Hides the xygraph child panel after data has been feed to the xygraph. The initial state is hidden but the user can open the child panel and it runs fine. It is just when HidePanel is called for the child. Or if the xygraph child panel is visible and the main panel is re-sized. If the child panel as never been displayed and thus no data has been plotted (SetGraphCursor is not performed), re-sizing doesn't affect it.
I hope this give you a clearer understanding.
 
David
David E. Jennings
NASA Sounding Rocket Guidance Navigation and Control Group
NASA/Goddard Space Flight Center/Wallops Flight Facility
Building F10 RM 204
Wallops Island VA, 23337
Phone: (757) 824-1283
Fax: (757) 824-2423
E-mail:Jennings_Dave@nsroc.net / davidejennings@yahoo.com
0 Kudos
Message 4 of 9
(4,074 Views)
I can think of two possibilities:

1. Does the xygraph have "Copy Original Plot Data" turned off? If you tell the graph to not copy the data, then you will need to keep around the original array that you passed to the graph. If you free the array, the program might crash, especially in release configuration.

2. I'm not sure which version of CVI you are using. There was a bug in CVI 7.0 that could have caused a crash when rescaling the graph. If you are using the CVI 7.0 run-time, and you want to eliminate this as a possibility, disable autoscaling for the top x-axis in the xygraph and see if the problem goes away.

Luis
NI
0 Kudos
Message 5 of 9
(4,060 Views)
1. Copy Original Plot Data" is turned on.  But I use SetGraphCursor to set a x and y point so there is no array passed from me to the graph. Would this help?
 
2 Yes I have ver 7.1.1 (314), should be the lastest patch. I had already disabled all autoscaling and I call my own scaling function and use SetAxisScalingMode.
 
Would a different approach work better.
  1. Maybe using an array to pass the data instead of just x and y.
  2. prior to re-sizing use DeleteGraphPlot (int panelHandle, int controlID, int plotHandle, int refresh);
      but I not sure how to get the plotHandle? Only calling SetGraphCursor. Where can I get the plotHandle?
      I would have to use PlotXY to return a handle.
David E. Jennings
NASA Sounding Rocket Guidance Navigation and Control Group
NASA/Goddard Space Flight Center/Wallops Flight Facility
Building F10 RM 204
Wallops Island VA, 23337
Phone: (757) 824-1283
Fax: (757) 824-2423
E-mail:Jennings_Dave@nsroc.net / davidejennings@yahoo.com
0 Kudos
Message 6 of 9
(4,046 Views)
I'm not sure I understand the completely how you are sending data to the graph. Is it the case that you are not actually plotting any data, and you are only positioning a graph cursor in the plot, using SetGraphCursor? In that case you are right -- there is no plot handle to delete, since there is no plot at all.

In order to understand this better, would it be possible for you to try to reproduce the problem in a reduced version of your program that you can post here? Even if you can no longer reproduce it, attaching the program might help us understand how you are programming the graph a little better.

Luis
0 Kudos
Message 7 of 9
(4,045 Views)
Hey Luis
 
 Here is a code that surrounds the problem. I hope this is all. If not let me know and we can make other arrangement.
David E. Jennings
NASA Sounding Rocket Guidance Navigation and Control Group
NASA/Goddard Space Flight Center/Wallops Flight Facility
Building F10 RM 204
Wallops Island VA, 23337
Phone: (757) 824-1283
Fax: (757) 824-2423
E-mail:Jennings_Dave@nsroc.net / davidejennings@yahoo.com
Download All
0 Kudos
Message 8 of 9
(4,033 Views)
I can't really run this code, so I can't debug it. But it looks as if all you are doing to the graph is positioning the two cursors. This isn't really plotting, and so you shouldn't have to worry what you do with the data, nor should you have to use arrays. The way you're calling those functions is fine. I don't see the graph in the .uir you attached, but I assume that you created the cursors in the uir that includes this graph?

Is it possible for you to attach a version of this program that I can run? Without being able to reproduce the crash, it will be very hard to figure out what is wrong.

Luis
0 Kudos
Message 9 of 9
(4,004 Views)