LAVA Forums Buy cool LAVA gear Forums RSS Feed

Welcome Guest ( Log In | Register )

> Bug reporting guidelines:

See here for the proper LabVIEW bug reporting procedure.


Tags
(This content has not been tagged yet)
2 Pages V   1 2 >  
Reply to this topic Start new topic
> Bad bug that deletes data in a wire
Rating 5 V
Wolfram
post Aug 6 2007, 03:00 PM
Post #1


Very Active
***

Member
Posts: 61
Joined: 12-November 04
From: Germany
Member No.: 1013
Using LabVIEW Since:1994
LV:8.5.1 ,8.2.1 ,7.1.1
Germany Nothing Selected Nothing Selected


I've encountered the following bug: See attachment
It is one of the bad and strange ones.

Wolfram

Edit:
I've replaced the attachment. There was a race condition in the
previous demonstration VIs.
Wolfram

This post has been edited by Wolfram: Aug 6 2007, 03:50 PM
Attached File(s)
Attached File  BugDataLoss.llb ( 43.49K ) Number of downloads: 181
 


Tags
(This content has not been tagged yet)
Go to the top of the page
+Quote Post
Ad
post Aug 6 2007, 03:00 PM
Post #















Tags
(This content has not been tagged yet)
Go to the top of the page
Quote Post
neB
post Aug 6 2007, 04:05 PM
Post #2


Certified Kool-Aid Kid
*****

Premium Member
Posts: 1188
Joined: 6-December 02
From: Pittsburgh PA USA
Member No.: 29
Using LabVIEW Since:1998
LV:7.1 ,. ,.
United States Germany Nothing Selected


QUOTE (Wolfram @ Aug 6 2007, 11:00 AM) *
I've encountered the following bug: See attachment
It is one of the bad and strange ones.

Wolfram

Edit:
I've replaced the attachment. There was a race condition in the
previous demonstration VIs.
Wolfram



Thanks for sharing.

THe bug fix list for LabVIEW 8.5 has an item that talks about writing to a control via property nodes and it over-rides a read from a local. I wonder if this is related.

This bug reminds me of trying to chip ECL circuits. Bad siganls can propogate backwards throught a gate there as well.

Ben


Tags
(This content has not been tagged yet)
Go to the top of the page
+Quote Post
Tomi Maila
post Aug 6 2007, 04:38 PM
Post #3


Drawing Tool - LVOOP example application
*****

Premium Member
Posts: 1184
Joined: 29-January 06
From: Helsinki
Member No.: 4014
Using LabVIEW Since:2004
LV:8.5.1 ,8.2.1 ,7.1.1
Finland Nothing Selected Nothing Selected My Blog


I was able to reproduce the bug in LabVIEW 8.2.1 and LabVIEW 8.5. I guess this issue is related to the LabVIEW in-placeness algorithm. Would you please report this bug to NI if you have not already done so.

What happens is that LabVIEW decides not to make a buffer copy for the subVI as it incorrectly thinks that the buffer is not modified by the subVI. However the buffer is modified by the subVI by calling a property node for an indicator. As a buffer copy is not made, the call to the property node actually modifies the original buffer. This results the buffer to become empty after the subVI call. I changed the property node for local variable and the bug disappeared. Replacing the local variable with property node reproduced the bug once again. The bug appeared for both value and value (signalling) properties.

I found even stranger issue. The buffer modifications "backpropagate" to a constant on block diagram. See the attached project (for LabVIEW 8.5). To reproduce, open block diagram of main.vi. Take a look at the constant there. Then run the VI. Hide the block diagram and show it again by pressin Ctrl+E twice. The constant value has been modified.

Attached Image
main before execution



Attached Image
main after execution


Attached Image

subVI


Attached File  buffer_backpropagation.zip ( 16.35K ) Number of downloads: 93


Tomi

--------------------
Tomi Maila



Tags
(This content has not been tagged yet)
Go to the top of the page
+Quote Post
jzoller
post Aug 6 2007, 04:44 PM
Post #4


Very Active
***

Member
Posts: 83
Joined: 12-October 04
Member No.: 793
Using LabVIEW Since:2002
LV:8.5.1 ,8.6 ,.
United States us_colorado Nothing Selected


Nice find, and a very good demonstration. I can confirm this bug for 6.0.2, 7.0, 7.1, 8.0 and 8.2.1,

Some observations:
-Replacing the sub-vi graph with a simple data indicator: still bugged.
-Replacing the sequence loop with a case statement: still bugged.
-Replacing the clusters/arrays with dbls: still bugged.
-Replacing the top level sequence loop with other error primitives (flatten/unflatten) and wiring the errors: still bugged.
-Replacing the sub-vi value property node with a local: bug goes away.
-Routing the error wire in the top level vi around the sequence: bug goes away.
-The bug doesn't appear on the first run, but does appear on subsequent runs. Ouch...

Looks like a ref to the sub-vi data is being incorrectly retained where the data enters the top level sequence loop.

Very nice find!

Joe Z.

QUOTE (Wolfram @ Aug 6 2007, 09:00 AM) *
I've encountered the following bug: See attachment
It is one of the bad and strange ones.

Wolfram

Edit:
I've replaced the attachment. There was a race condition in the
previous demonstration VIs.
Wolfram


Tags
(This content has not been tagged yet)
Go to the top of the page
+Quote Post
neB
post Aug 6 2007, 04:46 PM
Post #5


Certified Kool-Aid Kid
*****

Premium Member
Posts: 1188
Joined: 6-December 02
From: Pittsburgh PA USA
Member No.: 29
Using LabVIEW Since:1998
LV:7.1 ,. ,.
United States Germany Nothing Selected


QUOTE (Tomi Maila @ Aug 6 2007, 12:38 PM) *
I was able to reproduce the bug in LabVIEW 8.2.1 and LabVIEW 8.5. I guess this issue is related to the LabVIEW in-placeness algorithm. Would you please report this bug to NI if you have not already done so.

What happens is that LabVIEW decides not to make a buffer copy for the subVI as it incorrectly thinks that the buffer is not modified by the subVI. However the buffer is modified by the subVI by calling a property node for an indicator. As a buffer copy is not made, the call to the property node actually modifies the original buffer. This results the buffer to become empty after the subVI call. I changed the property node for local variable and the bug disappeared. Replacing the local variable with property node reproduced the bug once again. The bug appeared for both value and value (signalling) properties.

I found even stranger issue. The buffer modifications "backpropagate" to a constant on block diagram. See the attached project (for LabVIEW 8.5). To reproduce, open block diagram of main.vi. Take a look at the constant there. Then run the VI. Hide the block diagram and show it again by pressin Ctrl+E twice. The constant value has been modified.

Attached Image
main before execution



Attached Image
main after execution


Attached Image

subVI


Attached File  buffer_backpropagation.zip ( 16.35K ) Number of downloads: 93


Tomi


I'll take care of reporting this to NI.

Ben


Tags
(This content has not been tagged yet)
Go to the top of the page
+Quote Post
Tomi Maila
post Aug 6 2007, 04:49 PM
Post #6


Drawing Tool - LVOOP example application
*****

Premium Member
Posts: 1184
Joined: 29-January 06
From: Helsinki
Member No.: 4014
Using LabVIEW Since:2004
LV:8.5.1 ,8.2.1 ,7.1.1
Finland Nothing Selected Nothing Selected My Blog


QUOTE (Ben @ Aug 6 2007, 07:46 PM) *
I'll take care of reporting this to NI.

I was just about to file a report bu you do that smile.gif After all you are a champion and have more direct channels... wink.gif

--------------------
Tomi Maila



Tags
(This content has not been tagged yet)
Go to the top of the page
+Quote Post
neB
post Aug 6 2007, 04:51 PM
Post #7


Certified Kool-Aid Kid
*****

Premium Member
Posts: 1188
Joined: 6-December 02
From: Pittsburgh PA USA
Member No.: 29
Using LabVIEW Since:1998
LV:7.1 ,. ,.
United States Germany Nothing Selected


QUOTE (Tomi Maila @ Aug 6 2007, 12:49 PM) *
I was just about to file a report bu you do that smile.gif After all you are a champion and have more direct channels... wink.gif


OK, I'll do it this time but if you ever make Champion (hack, cough cough...), I'll expect you to do all of the bug reports. rolleyes.gif

Service Request = 1007895.

Matt will update this thread with CAR once filled.

Ben


Tags
(This content has not been tagged yet)
Go to the top of the page
+Quote Post
Tomi Maila
post Aug 6 2007, 08:03 PM
Post #8


Drawing Tool - LVOOP example application
*****

Premium Member
Posts: 1184
Joined: 29-January 06
From: Helsinki
Member No.: 4014
Using LabVIEW Since:2004
LV:8.5.1 ,8.2.1 ,7.1.1
Finland Nothing Selected Nothing Selected My Blog


QUOTE (Ben @ Aug 6 2007, 07:51 PM) *
OK, I'll do it this time but if you ever make Champion (hack, cough cough...), I'll expect you to do all of the bug reports. rolleyes.gif

Is it always the rookie that files all the bug reports?

--------------------
Tomi Maila



Tags
(This content has not been tagged yet)
Go to the top of the page
+Quote Post
neB
post Aug 6 2007, 08:31 PM
Post #9


Certified Kool-Aid Kid
*****

Premium Member
Posts: 1188
Joined: 6-December 02
From: Pittsburgh PA USA
Member No.: 29
Using LabVIEW Since:1998
LV:7.1 ,. ,.
United States Germany Nothing Selected


QUOTE (Tomi Maila @ Aug 6 2007, 04:03 PM) *
...the rookie....

question.gif clock.gif

No. Just the one that wants it fixed.

Ben


Tags
(This content has not been tagged yet)
Go to the top of the page
+Quote Post
Spex
post Aug 6 2007, 11:03 PM
Post #10


One hit wonder!


NI
Posts: 1
Joined: 16-March 07
From: Austin
Member No.: 8049
Using LabVIEW Since:2006
LV:8.20 ,. ,.
Nothing Selected Nothing Selected Nothing Selected


This was reported to R&D (CAR #4C5FFLRK). Thanks for taking the time to report and investigate this everyone.

Another workaround (aside from Joe's method of using a local variable) is to force LabVIEW to copy the data in the wire before it is passed to the sub-VI or the sequence structure in the top-level VI. The bigger trick is predicting when this is going to happen wink.gif . Good catch, and thanks for the simple example.

Spex
AE


Tags
(This content has not been tagged yet)
Go to the top of the page
+Quote Post
Aristos Queue
post Aug 7 2007, 03:11 AM
Post #11


LV R&D Envoy
*****

NI
Posts: 1274
Joined: 15-August 06
From: Austin, TX
Member No.: 5877
Using LabVIEW Since:2000
LV:8.6 ,6.0 ,.
United States Nothing Selected Nothing Selected My Gallery


QUOTE (Tomi Maila @ Aug 6 2007, 03:03 PM) *
Is it always the rookie that files all the bug reports?

This is like Supreme Court Justice Stephen Bryer... in an interview, he said he had been the newest justice for 12 years, and the newest justice is the one who has to answer the door if anyone knocks while the judges are debating. 12 years of answering the door!

--------------------
"A VI outside a class is a gun without a safety. Data outside a class is a target."
--- A message from LabVOOP R&D


Tags
(This content has not been tagged yet)
Go to the top of the page
+Quote Post
jaegen
post Aug 8 2007, 04:54 AM
Post #12


Very Active
***

Member
Posts: 129
Joined: 29-October 04
From: Vancouver, B.C.
Member No.: 932
Using LabVIEW Since:1998
LV:8.5.1 ,7.1.1 ,.
Canada ca_british_columbia Nothing Selected


QUOTE (Spex @ Aug 6 2007, 04:03 PM) *
...
Another workaround (aside from Joe's method of using a local variable) is to force LabVIEW to copy the data in the wire before it is passed to the sub-VI or the sequence structure in the top-level VI.
...

This is the exact sort of thing I imagined that new "Always Copy" primitive would be used for when I first saw it ... it's a perfect workaround for memory manager bugs (not that there are ever any of those wink.gif ).

Jaegen

--------------------
"Duck was a neutral party, so he brought the ultimatum to the cows." -- Click, Clack, Moo: Cows That Type


Tags
(This content has not been tagged yet)
Go to the top of the page
+Quote Post
Tomi Maila
post Aug 8 2007, 09:11 AM
Post #13


Drawing Tool - LVOOP example application
*****

Premium Member
Posts: 1184
Joined: 29-January 06
From: Helsinki
Member No.: 4014
Using LabVIEW Since:2004
LV:8.5.1 ,8.2.1 ,7.1.1
Finland Nothing Selected Nothing Selected My Blog


I was thinking how bad this bug actually is. I found a very common use case of passing data to dialog windows where this bug can cause a lot of harm.

When a main VI calls a subVI that is used to display data it's common to use value property nodes within the subVI. However using value property node may cause severe troubles as this bug modifies data in constants and wire buffers elsewhere in the calling VI. See the images below for this use case.

Attached Image
Main VI passes data for subVI to be visualized


Attached Image
SubVI uses value property node to modify the displayed data


Attached Image
Main VI after execution, moving mouse over the constant displays the changed constant value


Attached File  buffer_bug_8.0.zip ( 15.04K ) Number of downloads: 77

Download the example project for LabVIEW 8.0