LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

random crashes - my bug or NI's?

Hi,

I have a LabView program that seems to crash every few hours,
seemingly at random. By crash I mean that LabView does not respond to
any user input - I have to do a Ctrl-Alt-Del to bring up the task
manager (I'm using Win95) and kill LabView itself. Do you have any
tips on determining whether the problem is mine (a bug in my program)
or something to do with the LabView development environment itself or
windows? The computer's environment is a bit dubious, as it's an old
Win95 box with tons of programs added by many people over the last few
years. I removed many of the utilities haven't done a re-install of
Windows.

The program in question talks to two devices through serial ports
every few seconds, displays measurements and store
results to a file.
Both the COM ports and output file are opened and closed every
iteration. LabView version is 6.0.

Ken Kobayashi
kobayash@solar.mtk.nao.ac.jp
http://solarwww.mtk.nao.ac.jp/kobayashi/personal/
0 Kudos
Message 1 of 8
(3,238 Views)
My feeling is first identify where the freeze is happening, which is most
easily done by having the code print debugging info either to a string
indicator or to a file. That will give a handle on where the problem lies
and how reproducible it is. Also check your code- you don't say how you're
using the serial port, but if you're opening it each time and not correctly
closing it, for instance (despite what you say), then that could cause
problems. This is pretty generic advice, but without knowing more- and
ideally having a single reference VI that shows the problem- there's not
much else can be said.

I'd also, personally, be reluctant to develop on the machine you describe.
Reinstall, preferably with something more reliable such as Win2000 or NT4.
Win95 i
sn't wonderfully stable at the best of times and you don't know what
system files have been replaced by those utilities etc.

--
Craig Graham
Physicist/Labview Programmer
Lancaster University, UK



"Ken Kobayashi" wrote in message
news:5ED86AE934E12355.3B90F620F3DD98D7.6D6D27715170BBC8@lp.airnews.net...
>
> Hi,
>
> I have a LabView program that seems to crash every few hours,
> seemingly at random. By crash I mean that LabView does not respond to
> any user input - I have to do a Ctrl-Alt-Del to bring up the task
> manager (I'm using Win95) and kill LabView itself. Do you have any
> tips on determining whether the problem is mine (a bug in my program)
> or something to do with the LabView development environment itself or
> windows? The computer's environment is a bit dubious, as it's an old
> Win95 box with tons of programs added by many people over the last few
> years. I removed many of the utilities haven't done a re-install of
> Windows.
Message 2 of 8
(3,238 Views)
I am having similar problems in a program where I am controlling a PCMCIA card (CANcardXL). The program sends and receives CAN messages. The program tends to crash at random (not always while running either). I have the same symptoms (does not repond to any user input & have to kill LabView through Task Manager). I am running this with Windows XP Pro and LabView 7 Express. In general LabView 7 tends to crash quite often when doing a variety of tasks, such as saving or opening a VI. Have you determined the source of your crashes yet?
0 Kudos
Message 3 of 8
(3,238 Views)
I use LabVIEW 7 Express and Matlab R13 under Win2000Pro. When I use matalb script, both LabVIEW and Matlab hang on at the same time. After killing matlab thread through TaskManager, I can execute vi with matlab script. But the result is not as expected and there comes error code "1050".
0 Kudos
Message 4 of 8
(3,238 Views)
We had similar problems as this. Make sure that under the Windows Device Manager that the COM ports have all the settings the same as the program (Baud, data bits, parity, etc.) Also, make sure that HARDWARE FLOW CONTROL is selected. Reboot after any changes.

If it's a memory problem, you can trace it using the Vi profiler (under advanced options).


2006 Ultimate LabVIEW G-eek.

0 Kudos
Message 5 of 8
(3,238 Views)
Does it completely die all at once or does the machine start dragging? If you have open references that are causing a memory leak it may eventually be crashing your machine. If it's crashing suddenly I wouldn't necessarily attribute it to this but you may read up on memory leaks in the numerous other posts about them. Especially with Win95 and memory management... I would have to agree with the previous post on getting a different system with Win2k or the like.
0 Kudos
Message 6 of 8
(3,238 Views)
Yeah, but any OS can be compromised by over installing programs. Win 95 is actually remarkablly stable after a fresh install. It beats the snot out of Win 98.


2006 Ultimate LabVIEW G-eek.

0 Kudos
Message 7 of 8
(3,238 Views)
I also had similar problem. My solution was to keep the serial port open, and close port when finished. This seemed to be device dependent. My first code worked in one system, but not in another almost identical system without keeping the serial port open.
0 Kudos
Message 8 of 8
(3,238 Views)