LabVIEW data corruption bug
I don’t normally blog about bugs. However with this particular bug I decided to make an exception as it potentially affects everyone in a very nasty way. A few days ago a severe LabVIEW data corruption bug was found by a LAVA forums member Wolfram. As a result of this bug LabVIEW incorrectly reuses calling VI data buffer when calling a value property node in a subVI. The content of a calling VI data buffer gets overwritten by the data passed to value property node. As LabVIEW stores block diagram constants as data buffers, also the values of block diagram constants get changed. The bug is present in all recent LabVIEW version including LV 8.5.
The most common use case I can think of that reproduces the bug is when passing data to an subVI to be interactively viewed by the user. In such cases it’s common to use value property to modify the displayed data. As a result of the bug, the values written to value property node ‘backpropagate’ to the calling VI or to where ever LabVIEW decided to make the last buffer copy. 
Main VI passes data for subVI to be visualized

SubVI uses value property node to modify the displayed data

Main VI after execution, moving mouse over the constant displays the changed constant value
Download an example project from the link below:
Print This Post

(5 votes, average: 4 out of 5)