10-31-2013 03:00 PM
Hello,
I am using Windows 7 and LabVIEW 12.0.
The first time that I run a VI that is part of a project, everything goes smoothly. However, if I try to run the same VI again, I get an error message saying "LabVIEW 12.0f1 Development System has stopped working." I have to force-quit out of LabVIEW. When I restart LabVIEW and run the VI, it works. But the second time always results in an error.
Thanks in advance for any advice you can give!
10-31-2013 03:28 PM
Just a generic comment - make sure you are running the latest f patch for 12.0, or the latest f patch for SP1 if you have that. Patches are there for a reason, it might not help but it's always worth a shot.
10-31-2013 03:43 PM
I'm quite new to LabVIEW. How do I go about doing that?
10-31-2013 05:14 PM - edited 10-31-2013 05:15 PM
Patches can be downloaded for free from ni.com. Just search ni.com for software updates for the LabVIEW development environment you have. Or you can use the Update service application - it can list all the critical updates currently available for your version.
Once you have confirmed you are running the best LabVIEW version you have, and you still have problems, you'll probably need to post some code or a VI snippet in order for people to be able to assist you further.
11-08-2013 03:17 PM
Hi,
The f patch is not the problem. I have attached images of a more basic version of the original code that results in the same error after running a second time.
Any advice is much appreciated.
11-11-2013 11:56 AM
Hi nt387,
I have looked through the screenshots and I have a question regarding the .NET references you are using in the application. In the state machine on the right, do you close the .NET references with the Close Reference.vi?
11-11-2013 12:36 PM
I don't think I do. I just copied the invoke node from the first screenshot and changed OpenDevices to Close Devices.
11-12-2013 03:39 PM
Another interesting thing to note: Disabling the entire section of power meter device (1st screenshot) results in no errors no matter how many times the program is run. I feel as though the issue has something to do with having two open devices at the same time, or it is some memory issue. I still do not know how to resolve this problem, however.
11-13-2013 11:50 AM
nt387,
I would first recommend closing your .NET references at the end of your program. This is a very common cause of LabVIEW crashes and hangs. Here is a simple .NET example that shows the open, read/write, and close reference model you want to use in LabVIEW.
.NET Example with Close Reference.vi
(I would recommend wiring your error terminals even though this is not shown in the example)
If you run the program in highlight execution mode, can you pinpoint the VI where the error originates?
11-13-2013 12:51 PM
My understanding is that LabVIEW pins .Net object references to ensure their location and if necessary to prevent the GAC from un-intentionally collecting them. As suggested by Sam-B, make sure you use the Close Reference VI to ensure that the objects are un-pinned and can be correctly disposed of.