JKISoftware / JKI-State-Machine-Objects

Object-oriented framework for LabVIEW based on the JKI State Machine
BSD 3-Clause "New" or "Revised" License
95 stars 54 forks source link

EXE Build Failed due to LaunchProcess.vi #86

Open wkuang76 opened 2 years ago

wkuang76 commented 2 years ago

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.

francois-normandin commented 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.

wkuang76 commented 2 years ago

@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

Error 1502 occurred at AB_Source_VI.lvclass:Close_Reference.vi -> AB_Build.lvclass:Save.vi -> AB_EXE.lvclass:Save.vi -> AB_Build.lvclass:Copy_Files.vi -> AB_Application.lvclass:Copy_Files.vi -> AB_EXE.lvclass:Copy_Files.vi -> AB_Build.lvclass:Build.vi -> AB_Application.lvclass:Build.vi -> AB_EXE.lvclass:Build.vi -> AB_Build.lvclass:Build_from_Wizard.vi -> AB_UI_Frmwk_Build.lvclass:Build.vi -> AB_UI_FRAMEWORK.vi -> AB_Item_OnDoProperties.vi -> AB_Item_OnDoProperties.vi.ProxyCaller Possible reason(s): LabVIEW: (Hex 0x5DE) Cannot save a bad VI without its block diagram. [Output Files] [Errors] 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 -> AB_EXE.lvclass:Save.vi -> AB_Build.lvclass:Copy_Files.vi -> AB_Application.lvclass:Copy_Files.vi -> AB_EXE.lvclass:Copy_Files.vi -> AB_Build.lvclass:Build.vi -> AB_Application.lvclass:Build.vi -> AB_EXE.lvclass:Build.vi -> AB_Build.lvclass:Build_from_Wizard.vi -> AB_UI_Frmwk_Build.lvclass:Build.vi -> AB_UI_FRAMEWORK.vi -> AB_Item_OnDoProperties.vi -> AB_Item_OnDoProperties.vi.ProxyCaller Possible reason(s): LabVIEW: (Hex 0x5DE) Cannot save a bad VI without its block diagram. 2/9/2022 11:10:31 AM
francois-normandin commented 2 years ago

@wkuang76 I can confirm that I'm able to build from a new install.

Some suggestions for you to explore:

wkuang76 commented 2 years ago

@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.

francois-normandin commented 2 years ago

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).

image

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 image

When done, find the Tools>>Advanced menu and select "Clear Compiled Object Cache..." image

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