Actor Framework Discussions

cancel
Showing results for 
Search instead for 
Did you mean: 

Error 1556 at Normal Stop Message

I am seeing an Error 1556 at the output of a Normal Stop Message. This actor will process other messages correctly, but doesn't appear to be handling the stop message. The actor stays running after the stop message is sent. The message is placed on the Self Enqueuer. Stop Core is overridden, but currently has no functionality other than the call to parent.

Probing the error: Error 1556 occured at In Place Element Structure in Actor Framework.lvlib:Message Priority Queue.lvclass:Priority Enqueue.vi:1->Calibrator Actor.lvlib:Calibrator Actor.lvclass:Actor.vi:5->Actor Framework.lvlib:Actor.lvclass:Actor.vi:ACBRProxyCaller.3BC00035.

The reference is invalid. This error might occur because the reference has been deleted.

The actor is very simply launched via a call to Obtain Message Queue -> Read Enquerer -> Launch Actor -> Release Message Queue. I'm trying to test the isolated actor's functionality before integration into the larger application, so the parallel loop in Actor Core is set up to process user events from the front panel and put messages on the Self Enqueuer to cause changes in the Actor's state.

I'm running LV2012SP1 with the debug fork installed. Any thoughts on what's going on?

0 Kudos
Message 1 of 7
(8,908 Views)

Does it work if you only send it the Normal Stop Message (before any other messages are sent)?  This would be basically launch and kill.

If it does work, then I expect that a message bein processed by the actor is actually returning a bogus actor as an output of the Do.vi.  This could happen in the To More Specific Node if the 'bative' Actor cannot be cast into your desired Actor.

Without any code, it is hard to guess.

0 Kudos
Message 2 of 7
(5,403 Views)

Launch and kill has the same error, which is the part that makes it bizarre.

I'm not sure what the right way to post the code is, since the actor communicates with a piece of hardware which I don't have simulated. I was hoping not to have to invest time building a simulator for the hardware...

I will look and see if there's a bogus actor being generated at any point that might be tripping me up.

0 Kudos
Message 3 of 7
(5,403 Views)

I am seeing an Error 1556 at the output of a Normal Stop Message. This actor will process other messages correctly, but doesn't appear to be handling the stop message. The actor stays running after the stop message is sent. The message is placed on the Self Enqueuer. Stop Core is overridden, but currently has no functionality other than the call to parent.

Probing the error: Error 1556 occured at In Place Element Structure in Actor Framework.lvlib:Message Priority Queue.lvclass:Priority Enqueue.vi:1->Calibrator Actor.lvlib:Calibrator Actor.lvclass:Actor.vi:5->Actor Framework.lvlib:Actor.lvclass:Actor.vi:ACBRProxyCaller.3BC00035.

Have you ever tried to remove in Place Element Structure and replace with unbundle(by name) and bundle(by name)? I encountered a similiar problem with  AF,Inplace Element Structure and 1556. It became normal after I removed the structure.

0 Kudos
Message 4 of 7
(5,403 Views)

I get this error when I send the wrong message enqueuer to the Normal Stop.  Make sure you are sending a valid enqueuer reference (ie: it's being loaded into the caller's private data correctly.)

CLAD
0 Kudos
Message 5 of 7
(5,403 Views)

Snipper wrote:

Have you ever tried to remove in Place Element Structure and replace with unbundle(by name) and bundle(by name)? I encountered a similiar problem with  AF,Inplace Element Structure and 1556. It became normal after I removed the structure.

Although I can believe that this made the error go away, I truly doubt that it actually fixed your problem, and I suspect that you have a more severe race condition bug lurking in your code.

Error 1556 means that the refnum has already been disposed. I can believe that removing the IPE changed the timing of your nodes on the diagram such that some node executed earlier than it did otherwise, and so was able to execute before the refnum was disposed by some other part of the code. But if all you did was remove the IPE, then the change in the timing is one that could be changed right back as you make other changes and the compiler decides to balance threads differently, or the OS happens to give more time to one slice than the other on a particular run.

If you believe that there is a bug in the In-Place Element Structure and that you fixed your code by removing that structure, that would be a claim that would require proof in the form of a VI hierarchy demonstrating the issue.

0 Kudos
Message 6 of 7
(5,403 Views)

AristosQueue 编写:

Snipper wrote:

Have you ever tried to remove in Place Element Structure and replace with unbundle(by name) and bundle(by name)? I encountered a similiar problem with  AF,Inplace Element Structure and 1556. It became normal after I removed the structure.

Although I can believe that this made the error go away, I truly doubt that it actually fixed your problem, and I suspect that you have a more severe race condition bug lurking in your code.

Error 1556 means that the refnum has already been disposed. I can believe that removing the IPE changed the timing of your nodes on the diagram such that some node executed earlier than it did otherwise, and so was able to execute before the refnum was disposed by some other part of the code. But if all you did was remove the IPE, then the change in the timing is one that could be changed right back as you make other changes and the compiler decides to balance threads differently, or the OS happens to give more time to one slice than the other on a particular run.

If you believe that there is a bug in the In-Place Element Structure and that you fixed your code by removing that structure, that would be a claim that would require proof in the form of a VI hierarchy demonstrating the issue.

Maybe you are right. I just make timing changed. But I have traced my application when debugging(By breakpoint and log event info to file), I believe the refum with 1556 error was only disposed by Stop method, but it did not been triggered at that moment.   And my program is used like this: within IPE, dynamically read new classes from file(means allocate memory),  while IPE means not reallocate memory, so I guess sometimes LabVIEW compiler will do Excessive optimization and maybe some error occurs. I will try to reappear it in this weekend(mydaily work is fuuuulll) by a demo VI or little project..

0 Kudos
Message 7 of 7
(5,403 Views)