From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Error accessing Map value with For Loop

Solved!
Go to solution

I encountered unexpected behavior when trying to access Map values with For Loop. This is simplified code.

200511_map_debug-05.png

 

As you see, one value is added to empty map then read in two different ways. Surprisingly for me indicator value by loop receives no data while the map contains expected member and indicator key by loop receives correct key value.

 

image.png

 

LabVIEW 2019 64-bit

 

What do I do wrong?

Thank you.

 

_____________________________________
www.azinterface.net - Interface-based multiple inheritance for LabVIEW OOP
0 Kudos
Message 1 of 8
(3,081 Views)

I opened the same VI with LabVIEW 2019 32-bit. It works as expected.

 

Shall I conclude that 64-bit LabVIEW has a bug?

_____________________________________
www.azinterface.net - Interface-based multiple inheritance for LabVIEW OOP
0 Kudos
Message 2 of 8
(3,061 Views)

I have seen something similar when trying to use a maps on compactRIO. I am not sure if it is the same problem, but I got a hard crash of the application when running the following on a cRIO:

ASundq_0-1589204546762.png

 

I did not dive into it any deeper, but the following work around solved the issue for me:

ASundq_1-1589204607260.png

 

0 Kudos
Message 3 of 8
(3,021 Views)

Yes, I solved the problem in exactly the same way. But it is a workaround that probably works at expense of performance☹️

_____________________________________
www.azinterface.net - Interface-based multiple inheritance for LabVIEW OOP
0 Kudos
Message 4 of 8
(3,016 Views)

Seems the question is buried among pages of the forum.

 

I resurrect it reformulating the question.

 

Is it a LabVIEW 2019 64-bit bug?

_____________________________________
www.azinterface.net - Interface-based multiple inheritance for LabVIEW OOP
0 Kudos
Message 5 of 8
(2,918 Views)

It works for me in LabVIEW 2019 64-bit (SP1 f1).

Works for Me.png

0 Kudos
Message 6 of 8
(2,896 Views)
Solution
Accepted by topic author _Y_

Reading the 2019 SP1 Readme, it appears to have been fixed (ID 741225).


GCentral
There are only two ways to tell somebody thanks: Kudos and Marked Solutions
Unofficial Forum Rules and Guidelines
"Not that we are sufficient in ourselves to claim anything as coming from us, but our sufficiency is from God" - 2 Corinthians 3:5
0 Kudos
Message 7 of 8
(2,872 Views)

Probably this is the answer while LabVIEW did not crush in my case.

_____________________________________
www.azinterface.net - Interface-based multiple inheritance for LabVIEW OOP
0 Kudos
Message 8 of 8
(2,835 Views)