Actor Framework Discussions

cancel
Showing results for 
Search instead for 
Did you mean: 

Debugging actor based executable

I have a fairly large actor based application.  The top level VI just launches a root actor, which provides the main user interface and comprises a custom runtime menu and a subpanel.  The root actor launches various nested actors, which insert themselfs into the subpanel at the appropriate times.  The application seems to work in the development environment, but causes an access violation when it is built into an executable and the executable is run (actually just when a certain action is performed in the exe).  I would like to step through my code using LabVIEW debugging tools and so have enabled debugging in the build specification and connected to the exe from the development environment (http://digital.ni.com/public.nsf/allkb/8DA679805915DE40862572D5007B2F70), but am encountering some problems.

 

The root actor has a custom runtime menu.  If the debugger is launched before the VI is running, the custom runtime menu is replaced by a standard LabVIEW menu.  I have done some searching and some experimenting and come to the following conclusions:

  • A top level VI with a custom menu must be running before the debugger is started or the custom menu will be replaced.
  • A subVI with a custom run time menu must be called between starting the top level VI and starting the debugger or else the custom menu will be replaced by the debugger.  It is okay if the subVI has stopped execution before the debugger is called.  The custom menu will be displayed when it is called again.
  • If the subVI is reentrant and is already running when the debugger is called, the subVI will not be openned in the debugger.

 Actor core is reentrant, so this seems to be causing a problem.  If the root actor is not launched before the debugger is started, its runtime menu will be replaced when it runs.  If it is launched before the debugger, the debugger does not show it, but instead opens Count Actors.vi from the actor framework library.  This actor has a comment on the block diagram stating, "The purpose of this VI is to ensure at least one front panel remains open when using the Actor Framework. This is required to prevent the LabVIEW Run-Time Engine from shutting down when running as a built application."

 

Does anyone have suggestions for debugging an executable in such a situation?

 

0 Kudos
Message 1 of 3
(2,880 Views)

During debugging my large AF application, I have found two tools very helpful:

- Monitored Actor

- Desktop Execution Trace Toolkit (can also be used with an executable via VI Server)

 

 

 

0 Kudos
Message 2 of 3
(2,860 Views)

A possible workaround is to dynamically generate your menus in the "Menu (activation)" event, at least for the critical menu items you need, rather than use statically-configured menus (that the debugger is interfering with).

0 Kudos
Message 3 of 3
(2,847 Views)