LabWindows/CVI

cancel
Showing results for 
Search instead for 
Did you mean: 

General Protection fault during run release exe but not in debug mode

Hi,

I'm using CVI 6.0 and win 2K

I have a big problem, I just finished my application and I made a Release .exe, but I have a general protection fault, but when I'm using the debug mode, everything is fine, WHY ?, I tought the debug must reflect the real thing...how can I debug a release if in debug mode everything is fine, this is quite stupid.

Do you have an idea ?

Thank you,
0 Kudos
Message 1 of 5
(3,728 Views)
Hi,
Do you know where the GPF occurs? if not, maybe try putting in some printf or message popups along the way to pin down the area of your code that is causing the it. It may be that you are trying to access beyond the bounds of an array, or relying on an uninitialised variable that 'happens' to be ok in the debug environment but isn't so under the release version.
You could also try turning on all the debugging options under options->build options in the hope that it may trap the error in the debug mode. If that's still no good, maybe you could post your code here and I could see if I get the same results or if it is something kooky with your CVI installation
Message 2 of 5
(3,728 Views)
hi
first try to rebuild all the source files in the release mode ( sometimes it has old obj file )

if it doesnt work its mean u probably have a memory leak that the CVI didnt find and it can handle it in debug mode and not in release mode.
i sugest that u check all ur working with string ( if u use any)
and try to put some printf lines in the code to see what happend before it has a fault

hanan

hananV@newmail.net
0 Kudos
Message 3 of 5
(3,728 Views)
Thank you for your help,

The problem is not simple, what I'm doing is that I receive data via RS232 from a device than I'm doing some computing on the data so I can plot it. All data is computed and sended to a file.

In debug mode: Everything works fine. All data is getting in and I can plot it. its 100% OK !

but in release mode: Nothing work, I can't compute my data correctly, I get wrong values.

I would like to send you the code, but you can't do nothing about it, because you need to communicate with our device.

thank you anyway,

Gasma1975
0 Kudos
Message 4 of 5
(3,728 Views)
u could send me the code maybe i could tell u something just by look on it
any way good luck

hanan

hananV@newmail.net
0 Kudos
Message 5 of 5
(3,728 Views)