LabWindows/CVI

cancel
Showing results for 
Search instead for 
Did you mean: 

PlotY function causing "general protection fault" in cvirte.dll

As said in the question, when I use plotY function (for first time or not) to plot data on a graph control, on an autoscaled axis.
I use labwindows/CVI 7.0 on win98 based machine. cvirte.dll version is 7.0.0.393

The program is fine. Every output value from preceeding graph related functions is checked for errors and warnings. Moreover, the debugger tells me that it is in an other thread that I can't access, and that it is impossible to locate faulty instruction in source code => bug is not in my code.

The main point is the fact that it crashes depending on the data that are inside the buffer !!
The data is frequency measurement, and it seems to be related to higher frequency : the autoscaling works fine with 2MHz, and crashed with 117-118 MHz (I dont have frequency generators in the middle of these two frequencies).
The program also works fine when the data buffer is filled with power measurements.
Other scale mode doesn't give any problem.

---------
The ploty function is made using the function panel. the data are inside an array defined as :
#define MAXDATA 100
....

double data[MAXDATA];

...

PlotY(.....,data,MAXDATA, ....); // or smthing like that
---------

The step by step execution crashes giving the following two messages :

NON-FATAL RUN-TIME ERROR: Unknown source position, thread id 0xFAA01355: Exception occurred in conditional breakpoint expression.
FATAL RUN-TIME ERROR: Unknown source position, thread id 0xFAA01355: The program has caused a 'General Protection' fault at 016F:00000009.

The first non fatal error is an other clue that indicate me that it is not my part of the code that is faulty : I don't have any breakpoints in my code.

---------

When I lauch the debugable executable apart from CVI I get the following from windows
IXL CEB_DBG a caus� une d�faillance de page dans
le module CVIRTE.DLL � 016f:685c0893.
Registres :
EAX=010d0f78 CS=016f EIP=685c0893 EFLGS=00010202
EBX=010d0f7c SS=0177 ESP=0066e5dc EBP=0066e5e4
ECX=3ffdc0c0 DS=0177 ESI=01160c78 FS=433f
EDX=00000000 ES=0177 EDI=00c2e000 GS=0000
Octets � CS : EIP :
f3 a5 ff 24 95 a8 09 5c 68 8b c7 ba 03 00 00 00
�tat de la pile :
00b9e304 010d3b20 0066e624 684c3f81 00b9e304 010d0f7c fffffffc 684c4600 010d0f7c 00b9e304 fffffffc 00000000 00000010 00b939fc 68603c24 010d0f78

---------

after rebooting and building a stand alone executable I get :
IXL CEB a caus� une d�faillance de page dans
le module CVIRTE.DLL � 016f:685c0893.
Registres :
EAX=0103ab7c CS=016f EIP=685c0893 EFLGS=00010202
EBX=0103ab80 SS=0177 ESP=005de430 EBP=005de438
ECX=3ffdc0bf DS=0177 ESI=010ca880 FS=40e7
EDX=00000000 ES=0177 EDI=00b9e000 GS=0000
Octets � CS : EIP :
f3 a5 ff 24 95 a8 09 5c 68 8b c7 ba 03 00 00 00
�tat de la pile :
00b0e300 0103d77c 005de478 684c3f81 00b0e300 0103ab80 fffffffc 684c4600 0103ab80 00b0e300 fffffffc 00000000 00000010 00b039fc 68603c24 0103ab7c

---------

Let me know if you need more information to help me.
I can provide full source code, but it requires hp53131 intrument for running, and is quite big ...
For the moment, I would be gratefull for giving me a sample of code properly doing autoscale.

Best regards

Pierre Mazein

Laboratoire IXL
0 Kudos
Message 1 of 21
(4,125 Views)
See:
http://exchange.ni.com/servlet/ ProcessRequest?RHIVEID=101&RPAGEID=135& HOID=5065000000080000006DD00000& USEARCHCONTEXT_CATEGORY_0=_318_& USEARCHCONTEXT_CATEGORY_S=0& UCATEGORY_0=_318_&UCATEGORY_S=0"
0 Kudos
Message 2 of 21
(4,125 Views)
I tried to remove the Top X axis autoscale, but it still crashes.

More precisely it seems to crash when the scale must be modified.

Is it possible to have the dll source code (at least what is graph control related) ? to spot the faulty instructions.
And perhaps to fix it ? 😉

Pierre
0 Kudos
Message 3 of 21
(4,125 Views)
Here is an example of program that crashes all the time.

Just clic on the crash button.

Pierre

PS : Special thanks to fred.

PPS : I just signed for the beta test program. Do you know whether this bug is corrected or not in the pre 7.1 release ?
0 Kudos
Message 4 of 21
(4,126 Views)
I tried the "CVi program that crashes" with Windows 2000 and cvirte.dll version 7.0.0.395 and it works without crashing. I don't know if it's fixed in 7.1 or not but it should be as NI has been aware of the problem for a while.

Duncan
0 Kudos
Message 5 of 21
(4,125 Views)
Where did you get this revision 7.0.0.395 from ?

Pierre
0 Kudos
Message 6 of 21
(4,125 Views)
I found the dll.

But it still crashes with it. In both release and debug mode.
This time it was done on a win2000 computer, with nothing related to CVI installed.

Are there other libraries to check ?

By the way : when CVi starts, the about window still mention 7.0.0.393 ??

Thanks for your help suggestions.

Pierre.
0 Kudos
Message 7 of 21
(4,125 Views)
Pierre,

I've been able to reproduce the crash with the program that you attached. This is not the same as the top x-axis autoscaling bug. I'm currently investigating it, and hopefully I'll have some news for you in a couple of days. This bug still exists in the 7.1 beta, but it will be fixed for the 7.1 release.

I'm not sure why it didn't crash when Duncan ran your program. It might just be that other factors affect its reproducibility.

The bug should still happen in version 7.0.0.395 of cvirte.dll (this is basically the 7.0 version with a couple of unrelated patches. The reason you still see 393 in the about window is because only the runtime engine was patched, not the environment).

I'll keep you posted. Hopefully, on
ce I find the root cause of the bug I can give you a workaround that you can use until 7.1 comes out.

Luis
NI
0 Kudos
Message 8 of 21
(4,125 Views)
For whatever it's worth, I also built and ran it a few minutes ago on my laptop, a Pentium M using Windows XP and the most recent version of CVI that comes with Developer Suite Pro, and it ran OK without crashing. This sounds like it could be a frustrating problem to find.

Duncan
0 Kudos
Message 9 of 21
(4,124 Views)
Pierre,

We've found the cause of the bug and we were able to fix it. The fix will be in the 7.1 release.

One of the factors that is causing the crash to happen is the fact that you're plotting nine-digit numbers. Not that there's anything wrong with that. (It's one of several factors that just happens to trigger a set of events that end up resulting in the crash.) You can work around this while keeping the same data by doing one of two things: change the precision setting of the y-axis from auto to something else, or change the display format of the y-axis from floating point to one of the other two modes. That should make the crash go away.

Thanks for reporting this. It helped us out a lot.

Luis
0 Kudos
Message 10 of 21
(4,124 Views)