Actor Framework Discussions

cancel
Showing results for 
Search instead for 
Did you mean: 

Problem Building an AF Executable on a RT Target

Hello all,

Thought this might be the best place to go for some advice.  I have a large application for a PXI-RT target that utilizes AF heavily.  I have unfortunately been a bad developer and have not been building my application as I go along and have now hit a wall with the exe.  I am able to build the application with no errors but the exe is broken on the target (checked this by debugging the application).  It appears that every VI that has some aspect of the Actor.lvclass (such as Launch Actor Core) is broken.  Does anyone have any thoughts on this?  Anything that I should be looking at?  One other thing to note is that this application uses a web service to ship data between the client and the server.

Cheers, cirrus

0 Kudos
Message 1 of 20
(5,344 Views)

Here is something you might consider.

Executables don't have access to items vi.lib, unless those items are statically linked to the VIs included in your build.  Many components of Actor.lvclass only get loaded at run time.  Try including actoframework.lvlib in the build spec.

By the same token, the actor core VIs of any actor you build are also loaded dynamically, so be sure to include any of that code as well.

0 Kudos
Message 2 of 20
(4,492 Views)

Hmmmm... will add the reference to the AF lib, but nothing is necessarily dynamic about the loading of the actors in the application.  For instance, if I have a top level actor called "Controller", this actor will explicitly launch nested actors directly (i.e. the icon for the actor is laid down on the diagram and pumped into the VI Launch Nested Actor). It would seem to me that the only time you would have issues is if you load the actor via a call using something like Get LV Class Default Value where the reference to the object is simply a path, no?  Or maybe I am missing something here?

0 Kudos
Message 3 of 20
(4,492 Views)

That's a good point.  Cube dropping an actor on the block diagram should pull in everything in that class, and everything to which it statically links.  But it's easy to miss something.  As I said, it's something to look at.

Also, since there is an inheritance relationship, if *any* actor is broken, all actors will be broken, including Actor.lvclass.  So perhaps the issue is with one of the other actors?

0 Kudos
Message 4 of 20
(4,492 Views)

Sigh...that is a possibility.  The problem is that none is broken in development, just in the run time environment.  And to pile on, the error list indicates that nothing is broken despite the broken arrow.  Ugh.

0 Kudos
Message 5 of 20
(4,492 Views)

Oof.  I feel your pain.  Can you strip down your RT application, i.e. remove subsystems until you get a build that loads and runs, and then replace them until you find the failure point?

0 Kudos
Message 6 of 20
(4,492 Views)

That's a good idea; have done that before and will do that in this case...this does seem to be the best way to approach this.

0 Kudos
Message 7 of 20
(4,492 Views)

OK...so the real problem with this approach is that it drags in the other actors because they are explicitly called even if they are never launched.  Trying to build a launcher for the individual actors doesn't seem to do any good as they stop at pre-launch when certain parameters are not met.  Building a test harness for this case will require some significant work.  Is there something else I may be missing?  Logs, maybe, that might explain why the build succeeded but the actual run failed?  This is incredibly frustrating.

0 Kudos
Message 8 of 20
(4,492 Views)

OK, if you build a launcher for the individual actors, but you error our in Pre Launch Init, that strongly implies that the actor in question has loaded unbroken into memory.  You have launched Actor.vi for that actor, and Actor Core.vi is statically linked to Actor.vi (it is dynamic dispatch, but it should have loaded with the rest of the class).  If Actor Core.vi was broken, Launch Actor would return an Error 1003.

Your test harnesses don't have to be complex in this case - just launch the actor and immediately send it a Stop message.  If you error out, great, that actor - and its nested actors - are not loading broken.  If the test harness won't run because its broken, then the problem is with that nested actor or one of its nesteds.

Just to clarify:  your EXE loads broken, correct?  It doesn't load, run, and immediately exit?

Also, how many actors do you have in this system?

0 Kudos
Message 9 of 20
(4,492 Views)

What is the console output? You said you found it by debugging?

I once run into a similar problem with extremly_long_file_names. Using af tends to long filenames also. Doesn't necessarily have to do anything with af itself.

0 Kudos
Message 10 of 20
(4,492 Views)