eclipselabs / passerelle

Passerelle, an actor-based process engine based on Ptolemy II
5 stars 3 forks source link

ErrorHandler actors terminate too quickly in thread-based executions of models with loops #75

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. Define a model with a loop and an ExceptionGenerator.
   Use an ErrorHandler actor to catch the exception.
   (cfr attached model)
2. Run it

What is the expected output? What do you see instead?
The ErrorHandler should receive the generated error and e.g. send it onwards in 
an error handling branch.

But it often happens that the model terminates too quickly and the ErrorHandler 
has wrapped up before receiving the exception.

The problem is common for daemon actors. 
In models with loops they may terminate too quickly.

The root cause is in DirectorUtils.getActiveActorsWithoutInputs() and its usage 
in Process/CapDirector.removeThread(), which is invoked each time an actor 
terminates in a thread-based execution model.

Loops are not correctly handled there.

Original issue reported on code.google.com by erwin...@gmail.com on 4 May 2014 at 6:41

Attachments:

GoogleCodeExporter commented 9 years ago
fix done with impact on :
ProcessDirector, CapDirector, DirectorUtils

Original comment by erwin...@gmail.com on 4 May 2014 at 7:33

GoogleCodeExporter commented 9 years ago
checked by Olof in DAWN

Original comment by erwin...@gmail.com on 5 May 2014 at 2:51