LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

labview freezes when programatically loading a project

Solved!
Go to solution

Hi guys,

 

I am writing a VI that programmatically loads a large project, then programmatically performs some build tasks. This is for setting up my auto build server (apparently a VM). I have got some success with it, however, it is not stable at all.

 

I find that when it failed, it was always due to labview got frozen at loading the project, not when it was loading the startup VI. 90% of the time it froze at loading some EIO files which i have no knowledge about and they are all NI password protected VIs. They can be located at:

C:\Program Files (x86)\National Instruments\LabVIEW 2011\resource\Framework\Providers\lveio\public\EIOResourceTree_Provider_Get[XXXXX] where [XXXXX] varies, a few examples are:

EIOResourceTree_Provider_GetRequiredBooleanProperty

EIOResourceTree_Provider_GetRequiredFilePathProperty

EIOResourceTree_Provider_GetRequiredI32Property

 

Sometims it could freeze at loading files under C:\Program Files (x86)\National Instruments\LabVIEW 2011\vi.lib\eio\errors

 

As soon as it finishes loading these files, it would be a good run without any problem. But right now I am only getting success in every 8 or 9 attempts, which is totally unbearable.

 

Another side note, if I am manually launching LabView.exe, then load the project, it will never fail. This freezing problem only happens when the project was programmatically lanuched.

 

Any insight is appreciated.

-------------------------------------------------------------
LabVIEW 2011 newbie >.<

Certified LabVIEW Developer
0 Kudos
Message 1 of 3
(2,622 Views)

attaching a ss of the startup VI.

 Capture.JPG

This VI is started through command line console, that is why you will see it reads the command line arguments.

 

The problem always occurs at the Load Project - Tony subVI.

Capture1.JPG

 

-------------------------------------------------------------
LabVIEW 2011 newbie >.<

Certified LabVIEW Developer
0 Kudos
Message 2 of 3
(2,620 Views)
Solution
Accepted by topic author syang

below is a workaround i found a while back but forgot to update here:

 

- The trick is to add a small wait time (about 3 seconds) to the start of the top level VI. in my case I added a 5 second delay before the first Base Path.vi call. see ss below.

1.JPG

 

I guess the cause results from that LabVIEW has some race conditions or mishandling of sequence during its initialization process.

-------------------------------------------------------------
LabVIEW 2011 newbie >.<

Certified LabVIEW Developer
0 Kudos
Message 3 of 3
(2,538 Views)