LabWindows/CVI

cancel
Showing results for 
Search instead for 
Did you mean: 

How to avoid Win2K to reboot when I stop a program in debug mode

I use Labwindows/CVI 6.0 under Win2K.
In debug mode, when a run-time fault occurs, I have to stop the program in order to leave the debugger.
To do that, I have the "Terminate execution" command or the "Stop" button.
Either with the command or the button, the system reboots immediately.
0 Kudos
Message 1 of 5
(3,541 Views)
Hello

CVI by itself should not do that. Are you calling any devices, or any hardware with CVI using National Instruments device drivers like NI-DAQ? Is there a reason why you would get a run-time error in the first place? Can you use break points with out have the same effect?

In certain applications, if you interrupt a driver during its operations while its accessing its hardware (for example, pausing via breakpoint in the middle of an event, etc) it can cause unexpected and undesirable results, since the driver operations are happening in the kernal mode. The OS cannot prevent bad things from happening when the operations are running under kernal mode.

This is what I think might be happening in your case. if you are using NI-DAQ or any other National Instrum
ents driver, you might try posting your question in their category, they might be able to help you out alot more with the problem. You should even post a small peice of your code that you can reproduce the problem with. But CVI by itself should not reboot your machine for you.


Bilal Durrani
NI
Bilal Durrani
NI
0 Kudos
Message 2 of 5
(3,541 Views)
I have the same problem even before any error happening. When I place a breakpoint and then decide to push the 'stop' button the system will crash.

The strange thing is that it does not happen before a call to niDMM_Read() was made. But after that, anywhere in my program when I push 'stop' the system will reboot.
If I take out niDMM_Read() the problem does not occur !

Any idea ?
0 Kudos
Message 3 of 5
(3,541 Views)
I contacted NI in the Netherlands and they advised to to use niDMM_close to unload the driver from memory. Still the problem was there. But when, after doing the close, I do a niDMM_Init the problem is gone !! (But will re-appear when you have a done a niDMM_Read.)

So I have made a commandline parameter which I only use when debugging and replaced all calls to niDMM_Read with a self made function which will do a close and an init when the commandline parameter is used.
0 Kudos
Message 4 of 5
(3,541 Views)
For me is even worst, after the PC auto reset and it hang at the startup windows. the solution is remove the PCI-4060 and restart. after login to windows and replace the card restart again. why will this happen? Help me please... thanks...
0 Kudos
Message 5 of 5
(3,541 Views)