03-23-2020 12:27 PM
This bug has been driving me nuts. I've trimmed the code down to a tiny piece that fails.
This throws error 1162:
No error here:
Why do I get an error when I pass the empty string through a cluster?
Solved! Go to Solution.
03-23-2020 01:21 PM
While I can't answer your question, I can confirm I get the same results on my LV2018/32 bit installation.
The weird thing is... if you delete the text "APP_FILE" in the String constant inside the Cluster constant, it works. You can replace it with other text and it fails. Looks like a bug to me. I wonder if it has something to do with the compiler doing some constant folding shenanigans?
03-23-2020 01:28 PM
I was also able to reproduce the behavior in 2019 and found the same pattern described in the previous post: if the string constant in the cluster is empty, then there's no error.
I have filed Bug #993017 for the appropriate team to further investigate and follow-up.
Thanks!
03-23-2020 01:31 PM
I've discovered that in my little snippet, I can fix the problem with either this:
or this:
but neither fixes the problem in my real app. In order to fix it in my real app, I have to do this:
04-01-2020 12:24 PM
And now in my main app, it's broken again. The "Always copy" and "Type cast" functions are no longer effective.
04-01-2020 01:59 PM
No error with the following,
You can always try another way to make a copy with this
(Note your snippet with the typecast and always copy did not produce an error.)
mcduff
04-01-2020 02:53 PM
This works. You've got to trick the compiler into not inlining stuff.
04-01-2020 05:32 PM
@paul_cardinale wrote:
This works. You've got to trick the compiler into not inlining stuff.
And now that doesn't work anymore.
04-01-2020 05:47 PM
Whether or not this bug is manifest seems to depend on whether the block diagram that owns "Get Menu Item Info" has ever been opened.