|
|
 | | From: | Christopher Brooks | | Subject: | Re: Possible process domain bug | | Date: | Wed, 15 Dec 2004 17:58:54 -0800 |
|
|
 | Hmm, this looks like a bug. There are problems nesting PN inside a domain.
It looks actor.process.BranchController.addBranches() is throwing a ClassCastException. I added a catch there so I could see the type of the object. The message says that we are getting a DEReceiver
The bogus line is marked below
// If the port lacks either producer or consumer // receivers, then there is no point in creating a branch. if (producerReceivers.length > i && consumerReceivers.length > i) { try { producerReceiver = ----> (ProcessReceiver)producerReceivers[i][0]; } catch (ClassCastException ex) { // pn/test/auto/decspbug.xml is a DE model with // a PN composite that fails with a ClassCastException // error, so we give a better message. throw new ClassCastException("Failed to cast '" + producerReceivers[i][0] + "', which is a '" + producerReceivers[i][0].getClass().getName() + "' to a ProcessReceiver.");
} consumerReceiver = (ProcessReceiver)consumerReceivers[i][0];
branch = new Branch( producerReceiver, consumerReceiver, this ); _branches.add(branch); } }
I've checked in a test as ptolemy/domains/pn/test/auto/decspbug.xml
Let's see if anyone takes a look at it.
_Christopher
--------
Hi all, I think there is a problem with the process domains, in particular, csp and pn. I'm working on a specification that mix CT, DE, CSP and SR. When CSP is used inside a DE topology, exceptions are thrown (something related to the addBranches method of the BranchController class). I have attached a simple specification that reproduces the bug. Ivan <>
---------------------------------------------------------------------------- Posted to the ptolemy-hackers mailing list. Please send administrative mail for this list to: ptolemy-hackers-request@ptolemy.eecs.berkeley.edu
|
|
|