09-11-2023 03:00 AM
@Darren wrote:
@raphschru wrote:
[LabVIEW 20xx]\vi.lib\VIServer\UID to GObject Reference.vi
This function only works in the development environment, not with the runtime.
Correct. If you need code that works in a built EXE, you'll need to create a map of UIDs. Which is pretty easy to do.
If you use the function with UIDs that are not nesecerially verified, LabVIEW will crash occasionally. You can use this function to get references to sub objects, for instance the scrollbar of an array, or individual decorations in controls. However, if the UID doesn't exist, every now and than you will get a crash.
04-11-2024 11:51 AM
Darren,
I just bumped into a funky issue that's giving me a hard time:
Building a VI into a lvlibp with typedef controls appears to result in new UIDs being assigned to the typedef's controls.
This feels like a bug?
I wonder if this is happening due to the namespace change on the typedefs when built into the PPL, triggering a change in the assigned UID value.
04-11-2024 12:15 PM
Ok, I'm evaluating a possible workaround to this issue:
Checking "disconnect type definitions" in the LVLIBP build spec protects the UIDs from being changed in the output LVLIBP.
I need to figure out if there are unintended consequences to this...
04-11-2024 01:48 PM
I can't reproduce this behavior... in my testing the UIDs for typedef cluster controls and their elements match in the source code and the built PPL. They only change if I change the typedef between non-strict and strict before building.
If you want to PM me some sample code that reproduces the issue I can investigate further.
04-11-2024 01:49 PM
Sure thing, let me see if I can zip up a demo
04-11-2024 02:00 PM
Darren,
I managed to distill the issue down into a small, reproducible zipped folder of code, attached.
This was created with LV2021 SP1 64-bit.
Something that I learned from making this demo code here:
The issue only appears to happen when I have nested typedefs.
04-11-2024 02:22 PM
I can reproduce the issue with your PPL, but if I re-build it in LV 2024 Q1 the issue no longer occurs... looks like it was a bug that was fixed at some point:
04-11-2024 02:24 PM
oh, cool!
That's good news.
It seems like "disconnect from typedef" is an acceptable workaround for me in Lv2021 SP1 as well.
But it's good to know that this becomes fixed when we upgrade our LabVIEW dev version.
Thanks!
04-12-2024 02:40 AM - edited 04-12-2024 02:41 AM
@brentjustice wrote:
oh, cool!
That's good news.
Yes, good news!
Not so cool that:
a) we need to find out about the bug like this and
b) that we need to find out the change (even if it's a fix) like this.
The tiniest change can, will and did ruin our programs.
Yes, we actually use LabVIEW (a lot)!
Hyrum's Law, anyone?
An open bug (and change) repository would be nice 😎.