LabWindows/CVI

cancel
Showing results for 
Search instead for 
Did you mean: 

stopping a program in debug mode

Hi all,

i have am having a intermitent issue with a program. first let me give you the issue and then the specs.

This is an inconsistant program lockup. when the program runs in an, .exe format it runs fine for an hour to a couple of days and then goes to a white screen and freezes. the program is basically just continiously reading a DAQ card and comparing readings to set values.

if i have the program running in Debug mode thru CVI and it freezes, CVI sees it as running (in top left hand corner of CVI interface), if i push the stop button (break execution) the break execution dims but the program never stops and the Running indication is still active.Smiley Mad

 

question--- is there another way to stop the program while it is in this frozen state to see where the issue is hanging up. like a hard stop command ????

 

I can only stop the program by using task manager and ending CVI there. which does me no good in finding the freezing point.

CVI 2012 sp1

with a PCI 6071E DAQ

0 Kudos
Message 1 of 2
(3,181 Views)

There isn't an easy way to debug this kind of events. Smiley Mad

 

The behaviour you are seeing (stop button dimmed after click but program that soesn't stop) normally happens when the program is stuck in a operation waiting for it to finish before breaking into the IDE. It may be a popup message waiting for user input, a I/O operation with a long or infinite timeout...

To deal with such a kind of thing you can for example write operations to a log file -one line before each critical call and one after that- so that you can at least see where it hanged. Alternatively you can use DebugPrintf to write messages to the debug output window: if in the IDE you have this window listed in Windows menu, if an .exe you can use utilities like DebugView to receive those messages. Another alternative can be to use Remote Debugging.

 

However, this is only a list of possible instruments and techniques: solving these problems usually ends up in a boring task of trial and error to narrow down to the critical situation and trying to overcome it.



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?
0 Kudos
Message 2 of 2
(3,171 Views)