From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

Actor Framework Discussions

cancel
Showing results for 
Search instead for 
Did you mean: 

My application does not work when built into an exe

I have built an application that uses the Actor Framework. I have a top-level actor that manages other actors. I wired a true to show front panel in my top level actor but it does not show when running the exe. It works perfectly in dev mode.

The first thing I tried is to use the DETT to try tracing the problem. However I discovered that when I enable debugging in my project the problem goes away. When I turn off debugging, the top level actor fails to start. That rules out using DETT. I placed an error indicator right on the error out of launch actor but there is no error. I verified that it is indeed executing this part of the code with a message box.

I know that I have not provided a whole lot of details and unfortunately I cannot post the code. Is there anything that stands out with the limited information that I have provided?

=====================
LabVIEW 2012


0 Kudos
Message 1 of 18
(10,375 Views)

There's a terminal for "show front panel" on Launch Actor. 

0 Kudos
Message 2 of 18
(4,528 Views)

Is that terminal there because it has to be? Why doesn't the VI Server method work?

I don't like using it because AC.vi opens before it has been initialized, and the user can see various controls changing state, splitters moving into position, etc. I'd rather do that stuff secretly, then open the panel when it's ready to be seen.

0 Kudos
Message 3 of 18
(4,528 Views)

I may know what your problem is - what version of AF are you using, and what version of LabVIEW?  Building older versions of AF into an EXE uncovered a bug that led to a similar behavior (the RTE didn't realize the application was still running because for a split second no VI's FP was open, and therefore incorrectly terminated execution).  As a way to test for this issue, try adding a slight time delay to the top-level VI you use to launch your first actor (this ensures that one FP is always open). 

This issue has been fixed in 2012.

Elijah Kerry
NI Director, Software Community
Message 4 of 18
(4,528 Views)

Eli, was the issue fixed in LV 2012 or in AF 4.0? This will be important to my current app when I finally build it into an EXE. I'm using LV11.1 and AF 4.1 on the project.

0 Kudos
Message 5 of 18
(4,528 Views)

I'm not 100% sure (I can check with AristosQ tomorrow), but my understanding was that this was a deep-rooted bug in LabVIEW that the AF exposed, so the fix I was referring to is in 2012.  If I am mistaken, this post will disappear, only to be replaced by the correct answer!  😉

Elijah Kerry
NI Director, Software Community
0 Kudos
Message 6 of 18
(4,528 Views)

SteveChandler wrote:

...but it does not show when running the exe. It works perfectly in dev mode.

I don't know any specifics about the bug that Eli mentioned or about the Show FP input which was added to the AF, but one common reason for something like this is if the FP is removed when building an EXE. By default, the FP is removed for all VIs going into the build and only certain settings cause it to be kept. I believe building the app in debug mode keeps the FPs and BDs of all VIs, so that would explain why that worked.

Try creating a property node for one of the controls in your FP and then build the app. The node doesn't have to do anything. Just having it is enough to cause LV to keep the FP in the EXE.


___________________
Try to take over the world!
Message 7 of 18
(4,528 Views)

Thanks. I am using LV2012 with the default version of AF (4.0?).

Justin, I am wiring the show front panel terminal with a true.

David, I am only doing this for debug.

Elija, I launch the actor from another top level VI and so there already is a FP open when it is launched. I put an Equals Not A Refnum on the caller to actor queue output of Launch Actor and using a message box I can see that it is false. I did try putting a delay of 1 second just prior to launching the actor but that did not help.

I am not at work right now but I did uncover some more information since my post. Even though the actor was not launched (it's FP does not show), when I exit my top level application, the icon remains on the task bar. I can see it is still running in task manager. However this does not always happen.

[Edit: tst, I just saw your reply after I posted. That sounds promising! ]

[Edit #2, Maybe this is not so promising. I am not at work so I don't have access to my code but I did try building the Simple Actor Example from the NI Week 2012 presentation. I built it with debugging disabled and it still works. It uses the show front panel feature to display actors. I have the same version of LV here as I do at work.]

=====================
LabVIEW 2012


0 Kudos
Message 8 of 18
(4,528 Views)

I cannot attach the code but here is a screenshot of the section that I am having problems with.

=====================
LabVIEW 2012


0 Kudos
Message 9 of 18
(4,528 Views)

I go into detail about what tst describes in this short video tutorial: http://vishots.com/avoiding-broken-executables-when-using-dynamic-vis/

Message 10 of 18
(4,528 Views)