LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Bug: Delete element using CTRL+Delete only visually updates data

Solved!
Go to solution

It's great that in LV2020, we can use CTRL+Delete to delete an element in an array. But it is really bad that the actual data is not updated after a delete on a constant. Try it yourself, create an array constant and an indicator and use CTRL+Delete on an element in the constant and run the VI:

thols_0-1625647101635.png

I can even save the VI and restart LabVIEW and the incorrect data is still there.

 

I thought maybe it is not getting compiled, and something is stuck in the compile cache, but its the same when turning off "Separate compiled code..." on the VI, saving and restarting LabVIEW.

 

It gets correct if you do some more coding that is not just cosmetic, and then it is correct even after an undo. But if I load the VI again, the incorrect state is loaded.

 

Maybe someone could confirm and perhaps elaborate on exactly what is happening, or not happening.

 

 

constant array delete bug.gif

 

 

 

Certified LabVIEW Architect
Message 1 of 18
(4,391 Views)

Oh, and here's a VI with the issue saved.

Certified LabVIEW Architect
0 Kudos
Message 2 of 18
(4,349 Views)

Well today I learned I don't have SP1. I'm installing it just for the shortcuts... assuming they work 😉

 

I can report that in 2020 F2, running your code updates the indicator as expected, so the bug isn't "stuck" in the saved file somehow. I'm installing SP1 now; I'll report back if I can reproduce your bug here.

0 Kudos
Message 3 of 18
(4,331 Views)

!!!  Wow.  I see the same thing.  You run the VI and the indicator does NOT get updated.  (Or, more properly, it is being updated, just not correctly.)


LV 20 f1

Bill
CLD
(Mid-Level minion.)
My support system ensures that I don't look totally incompetent.
Proud to say that I've progressed beyond knowing just enough to be dangerous. I now know enough to know that I have no clue about anything at all.
Humble author of the CLAD Nugget.
0 Kudos
Message 4 of 18
(4,329 Views)

WOW that's crazy and needs to be fixed!

 

I even put a probe on the wire so it's NOT just a display bug!

ArraybugCapture.PNG

========================
=== Engineer Ambiguously ===
========================
Message 5 of 18
(4,315 Views)

Thanks for checking.


I think I have SP1, but I'm not sure. Version in About says 20.0.1. NI Update Service does not list any updates to LV2020. NIPM says I don't have any updates too. If I browse products in NIPM and install SP1, NIPM did not say I already had it installed, shouldn't it?. But after restart, I still have 20.0.1. Is this right? LV2019 says SP1 in the about window, so I would expect LV2020 to show the SP-number too. 

Certified LabVIEW Architect
0 Kudos
Message 6 of 18
(4,294 Views)

Hello thols,

 

very strange, I have LV 2020 SP1 installed (version is 20.0.1 - 32 bit version).

Downloading your VI it shows exactly the effect you describe.

 

However when I delete another element from the array or make other changes to the block diagramm (like adding a "Index Array) everthing is working correctly.

 

Regards, Jens

Kudos are welcome...
0 Kudos
Message 7 of 18
(4,255 Views)

Data gets marked as modified by operations.

 

For instance, in place element functions have a marked as modified flag. If you use external code to modify the data, and you don't set this flag, LabVIEW will not reinitialize the data with the constant, but keep the modified data.

 

It seems that deleting an element deletes it from the diagram, but doesn't set the modified flag. Running a 2nd time doesn't reinitialize the data, as LabVIEW thinks it's still what it needs to be.

 

Does saving and reloading the data return the modified data?

 

Also, does deleting the element before running (at least) once give correct results?

 

There probably are operations where LabVIEW reinitializes anyway. Deleting or adding relevant things probably, but I'm not sure what is relevant. It could be all things that force a recompile. Moving things isn't a reason to recompile. Does a CTRL+Run make things right?

 

Just thinking out loud, these are not solutions for sure.

Message 8 of 18
(4,202 Views)

Saving in the incorrect state and reloading returns the incorrect state.

 

Forced recompile returns the correct state.

 

Reverting (or loading again) after a force-recompile returns the incorrect state.

 

The VI does not get an asterisk when deleting the element. VI Mods bitset is 0.

 

"does deleting the element before running (at least) once give correct results?"

-No

 

 

Certified LabVIEW Architect
0 Kudos
Message 9 of 18
(4,193 Views)

@thols wrote:

 

The VI does not get an asterisk when deleting the element. VI Mods bitset is 0.

I get an asterisk when deleting an element in your VI.

 


@thols wrote:

"does deleting the element before running (at least) once give correct results?"

-No


On my system the answer is yes...

Kudos are welcome...
0 Kudos
Message 10 of 18
(4,178 Views)