01-19-2020 08:50 PM - edited 01-19-2020 09:17 PM
There's a bug in 2019 SP1 that may or may not have absorbed a month of my life trying to resolve. The "Replace with" functionality doesn't always work correctly and you can end up with projects in weird states where they're pointing to multiple libraries/PPLs.
NI has opened a CAR for the issue and R&D is investigating. In the meantime, the best solution is to downgrade from SP1 to vanilla 2019.
EDIT: I'm told it also affects the latest prerelease version of 2020, so be careful if you start playing around with any 2020 beta versions.
01-20-2020 09:24 AM
Just be aware that if you are using sets and maps, they have bugs on vanilla 2019 that are fixed on SP1...
01-20-2020 10:10 AM
Catch 22
01-20-2020 10:52 AM
Reading the first post makes it sound like we should just avoid the Replace With... functionality. Is that true, or is it "PPLs or the Replace with" in the title?
Especially if this is only the reverse direction (lvlibp to lvlib) I'd pick newer and shinier - no? Both are new features but probably that wasn't the only fix in SP1 and although it's a nice feature to have, hopefully it isn't generally a required one.
That being said, I did have a somewhat similar issue with Actor Framework as a PPL and replacing with an lvlib (under SP1) a week or so ago.
Restoring via git didn't initially work, but clearing the compiled cache and then resetting my project again got it back into the desired shape.
Since it was accidental (I dropped an AF.lvlib VI rather than my lvlibp via quick drop) I was fine just moving on.
01-20-2020 11:01 AM
I helped troubleshoot this a little, the replace appears to work (the LVLIB in the project is replaced by the LVLIBP), but there still is a dependency on the original LVLIB. The replace process seems to be not be properly updating the inheritance of child classes to point to the right parent when that parent is moving LVLIB -> LVLIBP.
You can manually fix that inheritance to get the correct state, but if there's a lot of classes this can be a pain!
01-20-2020 12:05 PM
@Craig_ wrote:
I helped troubleshoot this a little, the replace appears to work (the LVLIB in the project is replaced by the LVLIBP), but there still is a dependency on the original LVLIB. The replace process seems to be not be properly updating the inheritance of child classes to point to the right parent when that parent is moving LVLIB -> LVLIBP.
You can manually fix that inheritance to get the correct state, but if there's a lot of classes this can be a pain!
So I actually DID go through the hassle of manually updating a small project I had to use the correct inheritance. But then the code got into a really frustrating state: when I would finish updating the inheritance, I'd save all, and close the project. Then when I reopened the project, LabVIEW was somehow "holding on" to the original LVLIB reference and had broken all the VIs.
When I reopened the VIs that claimed they were pointing to the LVLIB, the references would then get fixed. But this state would always revert back to broken on a close and reopen, even if I cleared object cache and did a total restart of the IDE.
If I tried to build the PPL in the ostensibly "fixed" state, the resulting PPL would be built with broken VIs and be unusable.
01-20-2020 12:23 PM - edited 01-20-2020 12:24 PM
@cbutcher wrote:
Especially if this is only the reverse direction (lvlibp to lvlib) I'd pick newer and shinier - no? Both are new features but probably that wasn't the only fix in SP1 and although it's a nice feature to have, hopefully it isn't generally a required one.
It's both directions. If you've built all your PPLs already and/or never decide to turn an LVLIB into a PPL after integrating it into a project, then may not be something to worry about.
01-20-2020 06:55 PM
One thing that works for me when:
is to save all and then clear the cache via Tools>>Advanced>>Clear Compiled Object Cache...
Then I restart LabVIEW and clear the compiled object cache again for good measure (probably not necessary).
This does not remove the fact that there is a bug but may help when you are working around this issue or others.
Another option is to disable separating source code from compiled code but given that I use source code control, I really don't like this option.
01-23-2020 09:50 AM
22, 23/......whatever it takes....