LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Control reference goes invalid in built applications if passed by subVI

I have an application made in LabVIEW 8.5 that shows some peculiar behaviour from VIs that work on references to a tree control (not that I've tested it with other controls yet though):
 
If the reference to a tree control is passed directly to the subVI that works on it (using property and invoke nodes) things work fine both in the development environment and in built applications.
 
If however the tree reference is passed through a sub-VI (in other words the VI actually using it is a sub-sub-VI), things does not work in built applications. Instead you get error 1055 (invalid reference).
 
A cure for the problem is to tell the application builder not to remove the front panel of the sub-VI that passes the control reference (no change required for the sub-sub-VI). This is easy enough if you are aware of the problem and only have a few such VIs, but it is a nasty source of bugs/test requirements in a larger application....
 
Has anyone else seen this and is there something more elegant that can be done? Unfortunately I have not been able to recreate the problem in a simple demo, it seems that there must be some complexity involved for it to appear (although in this case it appears in several VIs working on different tree controls). Finding the conditions that create the problem will probably take quite abit of work...but if anyone else has seen this we could establish that it's not a unique case.
Message 1 of 5
(3,281 Views)

Hi Mads,

how do you pass the reference to the sub vi? As far as i know the Front Panel is still there if you connect a Front Panel object to the connector pane.

Hope it helps.

Mike

0 Kudos
Message 2 of 5
(3,265 Views)
It is passed directly by wire. I tried to test whether there was something bad about the sub-VI by instead creating it automatically using the create sub-VI function...the control reference was still lost.
0 Kudos
Message 3 of 5
(3,253 Views)

This sounds very simular to a problem I am having with very large and complex apps built in LV 8.5 and running under the RTE.  I get various referneces (controls, VI refs, queues, etc) that somehow become invalid for no good reason when passed down to sub-VIs.  The exe will work fine for a long time but then suddenly it will crash due to one of these type of errors (1055, 1, etc).  I have no idea what is going on.

What is worse is sometimes my queue ref will become invaild while a dequeue call is waiting on them.  Since I do not call any release queues until the app is shutting down, there is no way this could be happening programatically.

 

I wish someone at NI would just tell us what is broken in the 8.5 RTE so we could find a workable solution.  Should I upgrade to 8.6 ir would that just introduce a bunch of new bugs?

 

-John

 

-John
------------------------
Certified LabVIEW Architect
Message 4 of 5
(3,124 Views)

New bugs. LabVIEW does not have any BUGS. It has unwanted features. LV 8.6 has its own bugs with references.

 

 




Joe.
"NOTHING IS EVER EASY"
0 Kudos
Message 5 of 5
(3,117 Views)