Actor Framework Discussions

cancel
Showing results for 
Search instead for 
Did you mean: 

LabVIEW Crashing on Actor Launch

Hello all,

I've got a really frustrating problem at the moment with my project.  For some reason when I launch a set of my actors using the code below LabVIEW crashes straightaway.  The strange thing is it didn't use to do it, it was working fine, and there are no errors in the error list.

I've checked through all the Actor Core.vi files in the actors to make sure they aren't corrupted or anything, they all open fine.

Has anyone got any idea what might be causing this please? I can't see how to progress as it all seems fine.  I've tried just launching one of the actors, all combinations but it happens anyway. I'm running 2012 SP1.

Thanks,

Martin

code.PNG

error.PNG

0 Kudos
Message 1 of 18
(13,617 Views)

I have had this happen a few times on code that worked perfectly before. Two things have fixed it for me in the past:

1. Creating a Crash Tester.vi that has a dialog in it. I would drop this VI in the launcher VI, the Prelaunch VI of the startup Actor, and in key places in the Actor Core of the startup Actor. This pauses execution until you hit the okay button. I did this because I had no idea where the crash could possibly be happening, so if I could see which dialog it crashed after I might be able to fix it. Thing is, there was no crash after all the dialogs. After removing the dialogs, still no crash. I don't know why it fixed it, there must be some race condition that is avoided (and fixed?) with time delays.

2. Doing a mass compile (ctrl-shift clicking the run button), saving, and restarting LabVIEW helps with a lot of issues I've had with the Actor Framework. I must say though, the new Actor Framework on LabVIEW 2012 is a lot more stable (and faster in the IDE) than AF 2 on 2011.

Hope you resolve your problem,

Luke

0 Kudos
Message 2 of 18
(6,124 Views)

Hi Luke,

Thanks very much for the reply.  I did a mass compile on the whole project as you suggested and it works fine now! I'm not quite sure what was wrong or how the mass compile has fixed it but I'm very pleased it has.

Thank you again,

Martin

0 Kudos
Message 3 of 18
(6,124 Views)

Although I'm glad the mass compile fixed things, there's still a bug in LV clearly.

Do you have source code control such that you can send in your VIs before you did the mass compile? Are you willing to share your VIs with NI? It would be nice to know what we're looking at here so we can make sure it doesn't happen again.

0 Kudos
Message 4 of 18
(6,124 Views)

...and out of curiosity: Do you separate compiled code?

I have had a small but noticeable increase in these kind of crashes* since I started separating compiled code in my projects... But the benefits outweigh the hassles so I'm not going back now! 

* i.e. fixable by forced recompile

0 Kudos
Message 5 of 18
(6,124 Views)

My largest AF project consistently corrupted itself until I disabled "separate object code". Too much cross-linking caused by classes, libraries, and inlined VIs everywhere. My SCC repository has exploded in size again since, but at least I don't get those corruptions anymore.

FYI to AF developers: The Actor Framework Message Maker's templates used inlined "Send Message" VIs, which compound the cross-linking of code that might otherwise be loosely coupled. The VIs in its templates are also marked to have their object code separated. I recommend changing both of these things to increase your dev environment's stability (based solely on my happy experience doing it).

Message 6 of 18
(6,124 Views)

Thanks all for the responses. I'm afraid I don't have a before&after version of the code and much as I'd like to upload what I have to help others it is not allowed at my work.

If I discover how to make the crash happen I'll make a separate example which I could share.

Thanks for the tips on the changes to help with SCC/stability, I'll give that a go.

Thanks,

Martin

0 Kudos
Message 7 of 18
(6,124 Views)

Staab's hypothesis that the crash is related to separating compiled code seems reasonable as a theory, but correlation is not causation. Unless/until someone is willing to let NI have a look at one of these crashes, we can't diagnose it and we can't fix it. Very large customers are working entirely with separating compiled ccode and not reporting problems, some of them using OO and some of them using AF. So it can't be *just* separation. It may be separation in combo with a particular SCC. Or in combo with a particular rename operation. Please, if you develop one of these crashes in your code, please share it with NI. We have secure ways of handling your code and minimizing the number of developers here who get to see it, and to make sure it is deleted when we are done with the project. In extreme cases, we can get the lawyers invovled to sign NDAs. We understand the proprietary nature of the projects many of you work on. Please give us a shot to untangle one of these if you can.

Message 8 of 18
(6,124 Views)

Regarding Removing Compiled Code:

We separated the code from all our classes in LV2010 and found a very dangerous bug though.
It might have been fixed in 2012, but we haven’t dared (had time to take the risk again), to try it again. It didn’t crash, but all our Enum values changed back to the first value in the Enum.
I just closed the VI, removed the Compiled Code directory and opened it again, and then it was correct.

Unfortunately, I had already build and deployed an executable to production.

Regarding the Launching of Actors:

I very recently had a production machine only being able to launch about 4 actors in a row and then it froze. The problem was that the Actor launch VI, never got the returning Queue that the asynchronous VI should enqueue. I’ve posted it on lava.org (currently Lava.org seems to be down, just search for “Actor Problem” on Lava)

0 Kudos
Message 9 of 18
(6,124 Views)

MikaelH wrote:

I’ve posted it on lava.org (currently Lava.org seems to be down, just search for “Actor Problem” on Lava)

 

I'm sure that's lavag.org you're referring to.

--
Patur Sivertsen Vase
www.hfjensen.dk
0 Kudos
Message 10 of 18
(6,124 Views)