Actor Framework Discussions

cancel
Showing results for 
Search instead for 
Did you mean: 

Cannot Complete Build Because VI was Broken

Hello all,

I've recently hit an issue trying to build an executable in LabVIEW 2013 SP1 that uses the Actor Framework. When I try to build the executable, I get the following error message:

Cannot complete build because following VI loaded broken:

<project path>\main.vi

Open the VI in LabVIEW and fix the listed errors. If the VI loads as expected but errors are still detected during the build, contact National Instruments technical support for assistance.

Broken VIs:

- Actor Framework.lvlib:Message Queue.lvclass:Obtain Message Queue.vi:

          VI failed to compile.

I tried everything I could think of to fix it, ctrl-shift-clicking the run button to force recompile, mass compile on the project folder, mutliple restarts of LabVIEW and the computer, nothing seems to fix it. The main.vi is not broken when I open it, and the code runs fine.

When I quit LabVIEW after attempting a build, I also get a LabVIEW internal warning dialog. I have attached the report it generates, I believe it is related to the issue. This line in paticular looks troublesome:

DWarn 0xA291168F: Error: generated insane Intermediate Representation in [VI "Actor Framework.lvlib:Message Queue.lvclass:Obtain Message Queue.vi" (0x2c0a4630)]

If anyone has experienced this or knows what to do, I would be very grateful for your help.

Thank you,

Luke

0 Kudos
Message 1 of 10
(8,468 Views)

A bit of an update, I have found that if I create a new build specification, the executable builds fine. When I add the Web Service that the application uses back in, I get the same error message. I have tried mass compiling the Web Service VIs, but it doesn't appear to have any effect.

Anyone have experience using Web Services with the Actor Framework? I'm using a functional global with a normal queue reference to communicate between the Web Service VIs and the Actor.

0 Kudos
Message 2 of 10
(6,712 Views)

I have a little experience.  I launch my top level actor from within the web service startup VI, and hold the reference in a named notifier, rather than a global.

It was an example from a presentation I gave a couple of years back.  I never built it into an EXE, though.

0 Kudos
Message 3 of 10
(6,712 Views)

Another update, removing the functional global and using a named queue allowed the executable to be built. Very strange, would still like some info as to why this causes the build to fail.

0 Kudos
Message 4 of 10
(6,712 Views)

Thanks for the comment, apparently there is some kind of issue with using a functional global to store a queue reference (or other data perhaps). I had switched to a functional global to move away from using a named queue, however after I switched back to using a named queue I was able to build the executable again.

0 Kudos
Message 5 of 10
(6,712 Views)

Functional Global Variables used to store references is a tricky business. I don't understand why that would break your executable and I don't understand the error message that you are getting.

I do know that for a Functional Global Variable to be able to store a reference, the VI that first calls the FGV to create such reference needs to stay in memory for as long as you need the information to be stored in the FGV. Otherwise as soon as that VI goes out of memory, the reference dies.

This is because the reference lifetime is attached to the top level VI that calls the VI that creates the reference.

I hope this makes sense.

This still doesn't explain why building the exe would fail.

For an opportunity to learn from experienced developers / entrepeneurs (Steve, Joerg, and Brian amongst them):
Check out DSH Pragmatic Software Development Workshop!

DQMH Lead Architect * DQMH Trusted Advisor * Certified LabVIEW Architect * Certified LabVIEW Embedded Developer * Certified Professional Instructor * LabVIEW Champion * Code Janitor

Have you been nice to future you?
0 Kudos
Message 6 of 10
(6,712 Views)

Maybe an anomaly in the application builder? I have had a somehow similar issue (allthough NOT relating to AFW):

http://forums.ni.com/t5/LabVIEW/labview-2013-build-specification-error-with-build-all/m-p/3101581/hi...

My workaround was to build the application by right-clicking and selecting build rather than activate the specification folder and select 'Build all'.

0 Kudos
Message 7 of 10
(6,712 Views)

This is an important point, that might be well addressed with niACS's suggestion.  Hopefully, all references required would be generated by the controlling object which, theoretically, would be the last one out.  See this discussion regarding proper closing of the AF...

0 Kudos
Message 8 of 10
(6,712 Views)

niACS wrote:

I have a little experience.  I launch my top level actor from within the web service startup VI, and hold the reference in a named notifier, rather than a global.

It was an example from a presentation I gave a couple of years back.  I never built it into an EXE, though.

What are the mechanics of building a system that relies on a Web Service startup VI for launch into an exe?  Web services are generally "published", right? Would the startup be the top level VI in a build?

0 Kudos
Message 9 of 10
(6,712 Views)

From what I could tell, Web Services have changed for 2013 and 2014. Web Services can be added to an Application build specification so that the Web Service is run by the application web server. The Web Service is run in the application namespace, so it can access global resources.

This was news to me, and so far it seems to be much easier to work with than before. Besides from a few gotchas, having a built-in web service in an application works well.

0 Kudos
Message 10 of 10
(6,712 Views)