Jump to content

Maps\Sets hide class recursion (Bug?)


Recommended Posts

Running LabVIEW 2019f3

I found a potential bug and need your help to determine if it's real or not. Quick search didn't come up anyone reporting it.

I have 3 classes. Class1 contains Class2. Class2 contains Class3. Now, if I try to drop Class1 into the private data of Class3, LabVIEW will report an error and prevent this action. Mainly because you will have recursion, which is not allowed. This is all fine and expected. Even if Class1 is inside a cluster or a DVR or any other "wrapper", LabVIEW detects this as recursion and reports an error (broken VI).

However, I am able to "break" this check if I put Class1 as the data of a Map. It seems like LabVIEW cannot detect the recursion, in this case. I don't think this is intended behavior. Even though the VI does not break. I notice some bad behavior. Application builder hangs or terminates halfway through. Also the app takes forever to startup and run in source code (probably due to compiler churn?).

I did not try to do this intentionally. It was on accident, and was curious why it even worked. After I noticed the application build issues, i backtracked to the latest changes and guessed this was the issue. I haven't changed my code yet, but thought I'd post here first. If this is normal behavior then I should look elsewhere for my build issues.

Edit: So I played around a bit more with this. I don't need to be elaborate and use 3 Classes. You can just drop a Class inside the Map data and then drop the Map inside the Class itself and LabVIEW will not complain. This even works with Sets.

 

Screen Shot 2020-11-09 at 3.30.37 PM.png

Screen Shot 2020-11-09 at 3.31.53 PM.png

Link to comment

I tried this on purpose a while back and was starting to get excited when I made it farther than I did with DVRs or Queues, but in the end it screws with your private class data and you can not bundle or unbundle it  (try creating an accessor in your Class1).  Sadly it is a bug that it doesn't complain sooner when you do this.  Still stuck with pointless Type Cast dances to achieve recursive data types. 

And, yes, this is most likely the root cause of your build issue.

Link to comment

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.