I have problem with VI Analyzer leaving open references to some of the VIs it tests. I use VI Analyzer API in a CI system where it is followed by JKI VIPM, which builds packages. This system was running fine on LabVIEW 2017 and VIPM 2017, however switching to 2021 versions lead to unexpected issue with VIPM informing me there are open VIs, which are part of a package build and it won't build it until I close them. There were no such open VIs and the only explanation was open VI references. After a full day of "banging my head" I narrowed it down to VI Analyzer 2021 not closing all references it opened during testing. More precisely, it leaves open references to VIs called by reentrant VIs. I would appreciate any advice on how to deal with that.
I attached an example (supposed to run on C:\Temp). AnalyzeAndCheckVIsInMemory.vi is going to run VI Analyzer tests and monitor VIs in Memory. I can see tested VIs being loaded one by one and finally one of them is left in memory even after VI Analyzer has finished and its task is destroyed. The VI left in memory is one called by a reentrant VI. If I change the calling VI to non-reentrant, the called VI is removed from memory when VI Analyzer finishes testing.
I was looking for a way to remove VIs from memory without closing LabVIEW or my CI system main VI, but I couldn't figure out how to do it. I also need those tested VIs to be reentrant, so making them non-reentrant is not an option.
Solved! Go to Solution.
This looks like a problem with one specific test. If you turn the "Reentrant VI issues" test off, it appears to go away:
OK, if you go to the actual test itself, which is in:
LabVIEW 2021\project\_VI Analyzer\_tests\Block Diagram\Warnings\Reentrant VI Issues.llb
There's a VI in that library called "ReentVI CheckForNoReentSubVIs" and it has this code inside it, which needs to close this reference here but does not:
I can see this bug is present in LabVIEW 2020, but when I open the Reentrant VI Issues test in LabVIEW 2021, I see that the VI reference is closed properly. Are you sure the screenshot above is from LabVIEW 2021? Because this is what mine looks like:
Opened again to confirm:
This install was installed with the offline ISO image instead of from VIPM, so maybe there's a chance it's not quite the same version you're looking at?
Reminds me of something I saw earlier that was a bit odd, in this reply to one of my posts by crossrulz, who generally knows his stuff:
"The primitive was added back to the palettes in LabVIEW 2021 SP1 and is still there in 2022 Q3. So it is only missing in LabVIEW 2021 non-SP1."
Which I thought was odd, because I definitely installed the offline version of SP1 from the ISO, but I was missing the primitive in question (sort 1D array).
Might be there's something off with my particular install, but I would venture that whatever is going on with my install, the problem Penov has will likely be resolved by adding a close reference node and/or updating to the patch level that has the update shown in your screenshot. Maybe there was a f1 patch he and I didn't get?
Since this probably came with the install of VI analyzer instead of LabVIEW 2021 (whatever version), that might be the source. I have the 32-bit version installed, and the color of the icon in the corner of your screenshot looks different than mine. Maybe it's bitness-related? Is there a chance only the 64 bit version got this update?
Yup, you're exactly right. The VI Analyzer Toolkit 2021 32-bit installer is shipping the old version of the Reentrant VI Issues test. The 64-bit version is correct. And both the 32-bit and 64-bit are correct in LV 2022 Q3, so this problem is specific to LV 2021 32-bit.
Anyway, for LabVIEW 2021 32-bit users who come across this thread in the future, attached below is the Reentrant VI Issues test, saved in 2021, that has the Close Reference fix (this is the exact file that ships with LV 2021 VI Analyzer Toolkit 64-bit). Drop it in [LabVIEW 2021]\project\_VI Analyzer\_tests\Block Diagram\Warnings and mass compile it, and you should be good to go.
And for anyone seeing this thread who is using LabVIEW 2020 or previous and needs to fix the issue, you can manually change the code as described above.
Thanks to all of you for the quick resolving of my issue and saving me the time to search for the VI test that caused it. My LabVIEW is 32-Bit version SP1, f1, which I forgot to mention in my original post.