LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

LVOOP spurious overwrite of private data?

Solved!
Go to solution
Hi, all,

It looks to me like LVOOP is spuriously overwriting private members of objects in certain circumstances. To duplicate the problem, unpack the attached and open the Test VI of DerivedClass. Enter anything you want for the name and address and run the VI. The name out should equal the name in -- but it doesn't.

Runing LabVIEW 8.5 on Windows XP. I've checked the known bugs in 8.5 and 8.5.1 and don't see anything like it.

Any clues on a fix or workaround?

Thanks,
- Steve.



Message Edited by SPM on 07-07-2008 02:18 PM
0 Kudos
Message 1 of 14
(4,005 Views)
Works fine for me in the current beta, but the project in the attachment was empty, so I had to add the classes and VIs to it. I suggest you upload another version where the classes are in the project, so people can have a reference point.

___________________
Try to take over the world!
0 Kudos
Message 2 of 14
(3,978 Views)
The classes were in the project, but something nuked them. Even after I reconstructed it, it still shows the same bad behavior on a different machine.

I've got LabVIEW 8.5, which is probably two minor revisions behind the current beta.

Here's another copy.

- Steve.





Message Edited by SPM on 07-07-2008 03:13 PM
0 Kudos
Message 3 of 14
(3,974 Views)
I ran it about a dozen times, with and without entering the address as well, and it seems to work fine - I enter a silly name and get to see it in both indicators just fine. I guess someone else has to try with 8.5 and 8.5.1.

___________________
Try to take over the world!
0 Kudos
Message 4 of 14
(3,965 Views)
Just to clarify, if you enter "foo" for the name control, I would expect to see the following:

Name out: "foo"
Report: "foo is a silly name."

Instead, I'm seeing the following:

Name out: "foo is a silly name."
Report: "foo is a silly name."

- Steve.

0 Kudos
Message 5 of 14
(3,959 Views)
Solution
Accepted by topic author SPM
SPM,

I am also seeing the problem in LabVIEW 8.5.1.  This is an issue that happens when a class contains only one data member.  There are two ways to fix the problem:
  1. Use the "Always Copy" primitive on the branched wire of the class in "Report.vi".  This will ensure that the member data is not overwritten.
  2. Add a dummy data member to "BaseClass".  You don't have to create any access methods for this data.  Its existence will fix the problem.
Let me know if this works.

-Chris M


Message Edited by CMal on 07-07-2008 03:32 PM
Message 6 of 14
(3,954 Views)
Adding a phony boolean does the trick. Thanks!

- Steve.

0 Kudos
Message 7 of 14
(3,951 Views)
I also see the issue in 8.5.1, but it does work fine in the beta.

___________________
Try to take over the world!
0 Kudos
Message 8 of 14
(3,926 Views)
Thanks, tst -- hopefully it'll be out of beta soon (I'm working on a customer project and can't risk instability.)

BTW, this is prolly a stupid question, but how can I get the update when it comes? I searched the NI site yesterday for a way to download 8.5.1, but didn't find it.

- Steve.

0 Kudos
Message 9 of 14
(3,910 Views)


SPM wrote:
Thanks, tst -- hopefully it'll be out of beta soon (I'm working on a customer project and can't risk instability.)

BTW, this is prolly a stupid question, but how can I get the update when it comes? I searched the NI site yesterday for a way to download 8.5.1, but didn't find it.

- Steve.



Do you have a yearly subscription service plan?  If so, the latest version gets shipped in the quarterly update.  I think we got ours about 4 months ago.
0 Kudos
Message 10 of 14
(3,904 Views)