LabWindows/CVI

cancel
Showing results for 
Search instead for 
Did you mean: 

Help! About "Stack overflow" when call SetAxisRange function.

HI,
I encounter some trouble about SetAxisRange function when I used Labwindows/CVI6.
The description is as following:
There is a graph in my uir file, it's ok when I call SetAxisRange function(function's parameter are
SetAxisRange(panel,control,VAL_MANUAL,0.0, 3.0,VAL_MANUAL, -10.0, 10.0);); It's wrong, however,when I change
parameter Xmax value, SetAxisRange(panel,control,VAL_MANUAL,0.0, 6.0,VAL_MANUAL, -10.0, 10.0) - Xmax value is
6.0. In CVI6.0 Debug mode, some messages are displayed.
Firstly, "NON_FATAL RUNTIME ERROR "Test.c", Line 480,col 13, thread id 0x0000033C, function id 1
The program has caused a first chance 'Stack overflow.' fault at 001B:68473963.".
Secondly, "NON_FATAL RUNTIME ERROR "Test.c", Line 480,col 13, thread id 0x0000033C, function id 1
The program has caused a first chance 'General Protection.' fault at 001B:68473963.".
Finally, "NON_FATAL RUNTIME ERROR "Test.c", Line 480,col 13, thread id 0x0000033C, function id 1
The program has caused a 'General Protection.' fault at 001B:68473963.".

Why does not it happen when the parameter is Xmax = 3.0 ,1.0, 2.0...?
Why does it happen when the parameter is Xmax = 5.0, 6.0?

Pls tell me why? How to solve?

Any suggestions..???
0 Kudos
Message 1 of 9
(3,423 Views)
Since SetAxisRange is become obsolete, have you tried using SetAxisScalingMode? Do you get the same errors even with this function?


Proud to use LW/CVI from 3.1 on.

My contributions to the Developer Community
________________________________________
If I have helped you, why not giving me a kudos?
Message 2 of 9
(3,419 Views)
Thank a lot!
Have a good day!
0 Kudos
Message 3 of 9
(3,396 Views)
I use SetAxisScalingMode, however, the same errors is shown? why?
0 Kudos
Message 4 of 9
(3,392 Views)
This sound similar to a bug that was discovered with the CVI 7.0 runtime. Try disabling Autoscaling on the top X axis of the graph and see if this problem still occurs.
Bilal Durrani
NI
0 Kudos
Message 5 of 9
(3,380 Views)
There was a CVI bug sometime ago that would have caused this symptom to appear. However, if memory serves this bug only happened in version 7.0 and was fixed for version 7.1. You mention that you're using CVI version 6.0 which would seem to rule this out. However, it's possible that some other NI software might have upgraded your CVI runtime engine to 7.0 and that could explain it.

To find out which version of the CVI runtime you have, go to your windows system directory and check the version of cvirte.dll.

If you do have version 7.0 of the runtime, then this is probably the root of the problem. If that's the case, let me know and we can proceed with a workaround.

Luis
NI
0 Kudos
Message 6 of 9
(3,378 Views)
Yes, ever CVI70 is installed in my system(Windows2000), however, it is already uninstalled. By the way, Is there a patch about this bug to CVI70? if it exist, pls tell me.
Thanks.
0 Kudos
Message 7 of 9
(3,370 Views)
You can download the CVI 7.1 RTE from here. When distributing your application, you will need to ensure that your users also have the 7.1 RTE. The CDK for 6.0 will not automatically distribute the 7.1 RTE. It will only distribute the version of the RTE that it was originally installed with (i.e. 6.0). You will need to deploy the newer RTE with your distribution kit manually.
Bilal Durrani
NI
0 Kudos
Message 8 of 9
(3,356 Views)
Just to clarify the issue you are seeing.

The "Stack overflow" problem was a bug introduced in the 7.0 version of the RTE. This was fixed in 7.1. If you still had the 6.0 RTE installed on your system, you would not have seen this problem. But somhow, intentionally or unintentionally, you had the 7.0 RTE installed on your machine, either by you or some application you installed. Even though you uninstalled the RTE from Add/Remove programs, you probably still have the 7.0 RTE on your system. You can verify this by going to the system32 folder and checking the version of cvirte.dll.

You could manully delete the RTE files and then repair CVI 6.0 and this will ensure that you now have the 6.0 RTE on your machine. But then, you would now have broken the application that put the 7.0 RTE on your system in the first place.

So the next best thing would be to install the 7.1 RTE on your system and always deploy that with your application to ensure consistency. If you were to use the RTE that is deployed by default with CVI 6.0 (i.e. the 6.0 RTE), your customers would not see the Stack overflow bug, but I always recommend deploying the same version of the RTE that the application was developed with.

Let me know if you have any questions.
Bilal Durrani
NI
0 Kudos
Message 9 of 9
(3,349 Views)