LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

A bug with Tab Control property node>pages (Labview 6.0.2 and Windows NT4.0 sp6)

I think that I've found a bug involving the Tab control property node>pages.

In a loop, I'm controlling which pages are to be displayed, using the tab selector property node, according to the value of some parameters (actually, this work with constant parameter too).
the thing is, if you let the vi run long enough, it keeps taking more and more ressources (memory as well as CPU), and it eventually takes 100% CPU ressources, and it turns out to be a problem...

I'm using Labview 6.0.2, on Windows NT4.0 build 1381, service pack 6.

Please try this minimal VI and monitor it with the task manager:

I can't post the VI (this would be a good idea to add this feature...
), so here is the way to design it:

- create a tab selector, add a few pages
- create a property node for the tab control, and pick the property "Pages".
- Add two index (for example) array form the functions palette, and index it with values within the number of pages in your tab selector. link those to the tab control property node output.
- from the functions palette, add two property node, and link it to the output of the "index array". Change to write, and pick the property "Page Visible". Create booleans constants and link it to the property node (value doens't matter).
- Now, wrap everything in a While loop, set the condition to true (or use a button) so that it's infinite, and add a "Wait (ms)" from the function palette (e.g. use a value of 80ms).
- You're set, now open the task manager, and run the VI. You should see Labview memory and cpu occupancy slighly but steadily increase until it reach 100% (this can take some time depending on your computer...).

I hope I ma
de myself clear.
If you want me to send you the VI directly, please write me back, I'll do it right away (22 KB)
0 Kudos
Message 1 of 5
(3,394 Views)
I'm pretty sure that the behavior you are seeing is caused by the repeated creation of page references inside the loop. If you move the Pages property node outside the loop you will see that the memory isn't increasing. What is happening is that each time the loop executes the property node creates a new set of references. Since these references are not new each time it is best to move this outside the loop and only get the page references once.
Message 3 of 5
(3,394 Views)
Yes, that's right.
Thank you !

I now have to figure out something to get it out of my loop, which is not so simple, because the original case is a lot more complex.
0 Kudos
Message 4 of 5
(3,394 Views)
You are opening new references for the Tab Control at the rate of 2 every
80ms. Then you are not closing the references so they remain in memory.

Move your Tab Control outside of your while loop and close
the references when you are through with them. Close Object Reference
is in the same location where you found the Property Node.

Alan


"Julien" wrote in message news:506500000008000000E91D0000-986697009000@quiq.com...
> I think that I've found a bug involving the Tab control property
> node>pages.
>
> In a loop, I'm controlling which pages are to be displayed, using the
> tab selector property node, according to the value of some parameters
> (actually, this work with constant parameter too).
> the thing is, if you let the vi run long enough, it keeps taking more
> and more ressources (memory as well as CPU), and it eventually takes
> 100% CPU ressources, and it turns out to be a problem...
>
> I'm using Labview 6.0.2, on Windows NT4.0 build 1381, service pack 6.
>
> Please try this minimal VI and monitor it with the task manager:
>
> I can't post the VI (this would be a good idea to add this
> feature...), so here is the way to design it:
>
> - create a tab selector, add a few pages
> - create a property node for the tab control, and pick the property
> "Pages".
> - Add two index (for example) array form the functions palette, and
> index it with values within the number of pages in your tab selector.
> link those to the tab control property node output.
> - from the functions palette, add two property node, and link it to
> the output of the "index array". Change to write, and pick the
> property "Page Visible". Create booleans constants and link it to the
> property node (value doens't matter).
> - Now, wrap everything in a While loop, set the condition to true (or
> use a button) so that it's infinite, and add a "Wait (ms)" from the
> function palette (e.g. use a value of 80ms).
> - You're set, now open the task manager, and run the VI. You should
> see Labview memory and cpu occupancy slighly but steadily increase
> until it reach 100% (this can take some time depending on your
> computer...).
>
> I hope I made myself clear.
> If you want me to send you the VI directly, please write me back, I'll
> do it right away (22 KB)
0 Kudos
Message 5 of 5
(3,394 Views)