Open wkuang76 opened 2 years ago
@wkuang76 Can you look into your build error logs and see which VI is "bad"? I'd like to see if this is happening after a fresh install on my own machine.
Those errors are usually from a corrupted VI in the compiled cache, locally to your machine. If not, we can address this by mass compile the source and updating the package. Just need to know if this is local or not.
@francois-normandin
Here is the build log starting from ERROR.
=================
[ERROR] Code:1502 A VI broke during the build process from being saved without a block diagram. Either open the build specification to include the block diagram of that VI or enable debugging to include the block diagrams of all VIs in the build. Report this error to National Instruments technical support.
C:\Program Files\National Instruments\LabVIEW 2020\vi.lib\JKI\JKI SMO\SMO\Private\LaunchProcess.vi
@wkuang76 I can confirm that I'm able to build from a new install.
Some suggestions for you to explore:
uninstall SMO + clear compiled cache + reinstall SMO
open the launch process VI and see if it is broken on your machine. Perform a mass compile of this VI by using Ctrl+Click on the run arrow...
@francois-normandin If I do Tools -> Advanced -> Clear Compiled Object Cache and then load the project, I can successfully build EXE. But if I save the project afterwards, LauchProcess.vi error happens again during the build.
I tried builds on three different machines, and they all worked. Therefore I will conclude that this is a local issue. Since this can happen to anyone, regardless of using SMO or not, here are a few tricks (to be used as documentation for future users that might run into similar problems):
1- When you find a VI that seems corrupted, it probably needs to be re-compiled. To do that, open the front panel of the "Bad VI" and Ctrl-click on the Run arrow, then make a 1-pixel adjustment on the front panel, and save it to disk. Ctrl-Click will not run your VI, but instead force it to recompile. Most of the time, recompiling a "Bad VI" will change a flag in the binary representation and solve your problem (for this one VI, you might have to do it for others separately if multiple VI were in a bad state).
2- If this is not enough to solve it... Uninstall SMO + Clear Compile Cache + Reinstall SMO
In VIPM, make sure to de-install SMO completely
When done, find the Tools>>Advanced menu and select "Clear Compiled Object Cache..."
Close and re-open LabVIEW + Install SMO again from VI Package Manager
3- If not enough... Make sure the problem is not with your build specification or a descendent class of SMO.
Create a new project with only SMO Test Launcher. Create a simple EXE from the Test Launcher. If it compiles, then it might be that the corruption of that VI occurs as part of the build process. Delete your Application Build spec and start it from scratch.
Example attached for convenience (LV2020): launch_process_badVI.zip
I am getting the following error message when building EXE. I was able to build without any problems for months. It's not clear what triggered the error. Recent changes to VI code are largely cosmetic. Any advice on how to fix this issue?
============================= A VI broke during the build process from being saved without a block diagram. Either open the build specification to include the block diagram of that VI or enable debugging to include the block diagrams of all VIs in the build. Report this error to National Instruments technical support.
C:\Program Files\National Instruments\LabVIEW 2020\vi.lib\JKI\JKI SMO\SMO\Private\LaunchProcess.vi
Click the link below to visit the Application Builder support page. Use the following information as a reference:
Error 1502 occurred at AB_Source_VI.lvclass:Close_Reference.vi -> AB_Build.lvclass:Save.vi
Possible reason(s):
LabVIEW: (Hex 0x5DE) Cannot save a bad VI without its block diagram.