LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

computer freezes after running program X-times

Hi!
 
I am running a complicated measurement program acquiring data from a spectrometer, a photodetector and a webcam.
I run Labview 7.1 on Windows 2000 Professional SP4 with 520 MB RAM (yes I know this is outdated, however the driver for the spectrometer does not run on XP and the product is obsolete).
 
The problem is that I can run my program once without error and warnings and then the second time towards the end it freezes like it was in an endless loop, but there isn't any. I cannot quit Labview anymore and if I try to get to the task manager with ctrl-alt-del the screen just stays blue and I have to shut the computer off manually and reboot. This is very annoying because sometimes even some of the subVIs get corrupted. What is the best solution to debug it? In my case I guess there is no screen dump made since it actually does not crash but just becomes unresponsive. However is there a VI that would create a detailed LOG file about any strange things happening at the COM ports, GPIB bus e.t.c ?
 
Thanks a lot for your help, I appreciate.
 
David
0 Kudos
Message 1 of 11
(3,873 Views)

It is difficult to give advice without seeing the code, but here are a few things to look out for.

Are you wiring all the error clusters?

If things don't work at the second iteration, it is often due to uninitialized shift registers or partially wired output tunnels that are set to "use default if unwired". If you are not careful, you might get invalid references this way, for example.

Have you tried running in execution highlighting mode or with a few strategically placed probes?

Does your code contain any third party drivers (dlls, etc.)?

What are the priority settings of your VIs?

Message Edited by altenbach on 07-19-2007 11:20 AM

0 Kudos
Message 2 of 11
(3,867 Views)
Your post title is a bit misleading, because, according to the description, X=1. 😄
0 Kudos
Message 3 of 11
(3,854 Views)
Dear Mr. Altenbach,

I am still fighting with my computer crashing because of Labview.

General remarks:
-Priorities are set to normal (I don't care about real-time in this application).
- The program is using third party drivers (dll for spectrometer)

How does the error reproduce?
The first run of the program finishes without error and also the written data files are o.k. On the second rund the program terminates (i.e. the run arrow becomes white again). When I the click into the Laqbview Window or the File explorer (Win2000). Then the computer freezes immediately and the only thing to do is a hardboot. When I then look at the files it has written, I see that in the second run it stopped writing files after index=5).

What have I done for debugging:
-running in execution highlighting mode
- running with a few strategically placed probes
- updating VISA to the most recent version (4.1)
- close Labview and reopen after each run
- added additional wait timer when writing data string to file


I attached the program code (I am afraid it is quite a large program with many sub-VIs). I simplified the program code inorder to mae it more transparent but to still be able to reproduce the error.
The main sub-Vi's are 'Spectrosolutions_Take spectra.vi' and ' Take single I-V-P.vi'. They make the communication and data acquisition with the measurement equipment. Those Sub Vis are error-free. I can run them continuously without getting error messages or crashing.


I really have no idea how to track down this error.
I am guessing migrating to WIndows XP might help, but unfortunately some of the third party drivers do not work on XP.


Thanks in advance
0 Kudos
Message 4 of 11
(3,829 Views)
Hi David,
 
1) Do you run into the same problem when Highlight Execution is selected?
 
2) Has this application always crashed?
 
3) Are you having problems with other VIs?
 
4) Do you have the same problem if you do not call DLLs?
 
Regards,
Elizabeth S.
Applications Engineer
National Instruments
 
 
Message 5 of 11
(3,806 Views)

Hi Elizabeth

1) Do you run into the same problem when Highlight Execution is selected?

No, with highlight exectuion selected I can run it as many times I wish without crashing.

2) Has this application always crashed?
 
It's a new application...however we had similar applications using the same drivers that required the computer to be booted once in a while, but it was definitely more stable.
 
3) Are you having problems with other VIs?
 
Nope!
 
4) Do you have the same problem if you do not call DLLs?
 
No DLLs - no problem. I made a small test program where I replaced the measurement VIs that communicate with the spectrometer and multimeter with a constant data string. This allowed me to check if there is an issue with storing and importing data files and data conversion. But it seems to work o.k..
The weird thing is that when the computer crashes, it does not crash during execution. Sometimes I am even able to close Labview. But when I try to have a look at the data files that my program has written, it gets stuck.
 
For your information I also attached the textfiles with the system information and the typical output data files.
 
Kind regards
David
Download All
0 Kudos
Message 6 of 11
(3,784 Views)
Hi David,
 
Does your VI crash when you disable all DLL calls?
 
Are you able to isolate the issue?
 
Regards,
Elizabeth S.
Applications Engineer
National Instruments
0 Kudos
Message 7 of 11
(3,759 Views)

I once had an issue similar to this where the dll was actually freezing after some amount of use and putting a wait between calls helped.  There was a timing issue it seemed with the dll and if it was called too fast the dll would freeze.  Since labview waits for the dll to reture it appeared that labview was crashing but it was not.  Since running in highlight mode fixes the problem I would consider putting an explicit wait after each dll call and see if this fixes your problem. 

 

Paul

Paul Falkenstein
Coleman Technologies Inc.
CLA, CPI, AIA-Vision
Labview 4.0- 2013, RT, Vision, FPGA
0 Kudos
Message 8 of 11
(3,749 Views)
Dear Elizabeth,

the problem seems to be linked to the DLLs of the spectrometer. My program runs smoothly if I replace the SubVI that calls the DLLs by a constant data string.
I also tried it out  on an evaluation copy of Labview 8.2.1 still on Windows 2000 in order to see if there is any difference  to Labview 7.1. The same freezing occured after running the program twice. I just attached the spectrometer driver files FYI. The communication with the spectrometer is over USB. Maybe it is a commmunication problem?  What kind of reset commands are there in Labview?

Kind regards,
David
0 Kudos
Message 9 of 11
(3,704 Views)
Hi Paul,

thanks for your suggestion. Unfortunately it did not do the job.
I put an explicit wait of 5000ms(!) after each DLL call, but the issue remained.

Thanks
David
0 Kudos
Message 10 of 11
(3,703 Views)