[kepler-dev] Possible bug: variable name must equal MoML name
xiaowen
xin2 at llnl.gov
Mon Oct 11 16:35:09 PDT 2004
Hi,
In the process of writing an actor, Ilkay and I encountered a possible
bug in the implementation of the code that allows instantiation of a
class in the workflow.
Attached are the workflow and the actor that demonstrates this problem.
In the attached actor code, there's a port that's instantiated as:
inputo = new TypedIOPort(this, "input", true, false);
So the variable name is "inputo", but it is named "input" in the MoML.
When I run this workflow, I get:
Exception in thread ".np.InstanceOfClass2.NameProblem"
java.lang.RuntimeException: java.lang.NullPointerException
at
ptolemy.actor.process.ProcessThread.run(ProcessThread.java:219)
Caused by: java.lang.NullPointerException
at NameProblem.fire(NameProblem.java:28)
at
ptolemy.actor.process.ProcessThread.run(ProcessThread.java:181)
Exception in thread ".np.InstanceOfClass.NameProblem"
java.lang.RuntimeException: java.lang.NullPointerException
at
ptolemy.actor.process.ProcessThread.run(ProcessThread.java:219)
Caused by: java.lang.NullPointerException
at NameProblem.fire(NameProblem.java:28)
at
ptolemy.actor.process.ProcessThread.run(ProcessThread.java:181)
However, interestingly enough, if I rename the variable to "input", and
thus match the MoML name, there's no exception.
So somehow, the workflow only runs if the variable name is the same as
the MoML name.
Is this a bug in Ptolemy or is something missing in my understanding of
writing actors?
Thanks in advance for the help!
Xiaowen
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: NameProblem.java
URL: <http://mercury.nceas.ucsb.edu/kepler/pipermail/kepler-dev/attachments/20041011/3f42bf13/attachment.pl>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: np.xml
Type: application/octet-stream
Size: 6267 bytes
Desc: not available
URL: <http://mercury.nceas.ucsb.edu/kepler/pipermail/kepler-dev/attachments/20041011/3f42bf13/attachment.obj>
More information about the Kepler-dev
mailing list