LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Application Builder: Application closes after launcher

Solved!
Go to solution

I'm trying to run the executable of my application that was built with the Application Builder. I am using actor framework and have a Launcher.vi that is set as the Startup VI and launches the parent actor. When I run the executable, I can see the Launcher.vi front panel open and close quickly, but the main front panel never opens. Where do I begin to debug my executable? Is there something obvious that I am forgetting to do? I have compared my application configuration to the Actor Framework example (which does produce a working executable) and can't find anything that is different.

 

0 Kudos
Message 1 of 4
(3,287 Views)
Step 1: what can cause the launcher to stop prematurely? My guess would be an error. Do you have the ability to trap.errors that occur during launch? If not, the code doesn't need to be complex. All it has to do is in the case of an error, dump it to a text file in the application directory.

A common source of errors can be a failure to generate a path properly, or failing to include a dynamically launched file (class?) in the executable.

Mike...

Certified Professional Instructor
Certified LabVIEW Architect
LabVIEW Champion

"... after all, He's not a tame lion..."

For help with grief and grieving.
0 Kudos
Message 2 of 4
(3,270 Views)

Mike,

 

I'm not entirely sure what you mean by trapping errors, but I did try adding a case statement from the output of Launch Parent Actor in my launcher to a while loop (see launcher.png below). I did not see any errors.

 

I didn't mention this before but I can run the launcher in my LabView project and everything works fine. It's trying to run the built application where it all falls apart. I figured the error was somewhere in my Application Builder settings.

0 Kudos
Message 3 of 4
(3,193 Views)
Solution
Accepted by seanohue

OK, I figured out it. I went back and looked closer at the launcher for the Actor Framework example and noticed that the Launch Actor VI block does not have "Open Actor Core front panel" set to true which I thought was strange because the front panel opens correctly for that application. I poked around in the VI properties for the example projects parent Actor Core.vi and saw that Window Appearance has a custom configuration. The options for Show front panel when called and Close afterwards if originally closed were checked in the example project but un-checked for my project. I also looked at the Execution settings and saw that the example is configured for Shared clone reentrant execution while my project is configured for Non-reentrant execution.  

 

The Window Appearance change correctly launches my main front panel. I played with the Execution settings to see what those did and noticed that when my VI is configured for Non-reentrant execution, child actors don't seem to be getting launched. Additionally, the stop button on my front panel will close the front panel but the application is still running. Changing the mode to Shared clone launches child actors properly and completely closes the application when the stop button is pressed. I also tried Pre-allocated clone reentrancy to see what would happen; the launcher just errors out immediately saying the Call by Reference VI is not exectuable. 

 

I guess that makes sense. Actor Framework expects that state is not maintained when an actor is destroyed, so shared clone ensures that each instance of a child actor is given its own memory pool to be cleared when the actor is stopped. http://zone.ni.com/reference/en-XX/help/371361J-01/lvconcepts/reentrancy/

0 Kudos
Message 4 of 4
(3,177 Views)