Bug #6000
closedparameter copy-paste exception on console.
Description
This workflow (see attachment) has two parameters. The first one, called datadir, is Parameter type and the second one, called outputdir, is StringParameter type. The second one use the first one's as part of its value: $datadir/output. When I copy and paste parameter outputdir on the canvas, no error dialog pop up. But the console has an exception messages.
ptolemy.kernel.util.IllegalActionException: Warning:, there was a problem propagating "outputdir".
[run] in .auto.outputdir
[run] Because:
[run] Error evaluating expression: $datadir/output
[run] in .auto.outputdir
[run] Because:
[run] The ID datadir is undefined.
[run] at ptolemy.data.expr.Variable._propagate(Variable.java:1789)
[run] at ptolemy.data.expr.Variable.validate(Variable.java:1460)
[run] at ptolemy.moml.MoMLParser.endDocument(MoMLParser.java:802)
[run] at com.microstar.xml.XmlParser.doParse(XmlParser.java:162)
[run] at com.microstar.xml.XmlParser.parse(XmlParser.java:132)
[run] at ptolemy.moml.MoMLParser.parse(MoMLParser.java:1556)
[run] at ptolemy.moml.MoMLParser.parse(MoMLParser.java:1512)
[run] at ptolemy.moml.MoMLParser.parse(MoMLParser.java:1655)
[run] at ptolemy.moml.MoMLVariableChecker.checkCopy(MoMLVariableChecker.java:112)
[run] at ptolemy.moml.MoMLVariableChecker.checkCopy(MoMLVariableChecker.java:81)
[run] at ptolemy.vergil.basic.BasicGraphFrame.copy(BasicGraphFrame.java:341)
[run] at ptolemy.vergil.basic.BasicGraphFrame$CopyAction.actionPerformed(BasicGraphFrame.java:3477)
[run] at javax.swing.JComponent$ActionStandin.actionPerformed(JComponent.java:3376)
[run] at javax.swing.SwingUtilities.notifyAction(SwingUtilities.java:1645)
[run] at javax.swing.JComponent.processKeyBinding(JComponent.java:2859)
[run] at javax.swing.KeyboardManager.fireBinding(KeyboardManager.java:267)
[run] at javax.swing.KeyboardManager.fireKeyboardAction(KeyboardManager.java:216)
[run] at javax.swing.JComponent.processKeyBindingsForAllComponents(JComponent.java:2936)
[run] at javax.swing.JComponent.processKeyBindings(JComponent.java:2928)
[run] at javax.swing.JComponent.processKeyEvent(JComponent.java:2822)
[run] at java.awt.Component.processEvent(Component.java:6159)
[run] at java.awt.Container.processEvent(Container.java:2083)
[run] at java.awt.Component.dispatchEventImpl(Component.java:4744)
[run] at java.awt.Container.dispatchEventImpl(Container.java:2141)
[run] at java.awt.Component.dispatchEvent(Component.java:4572)
[run] at java.awt.KeyboardFocusManager.redispatchEvent(KeyboardFocusManager.java:1856)
[run] at java.awt.DefaultKeyboardFocusManager.dispatchKeyEvent(DefaultKeyboardFocusManager.java:722)
[run] at java.awt.DefaultKeyboardFocusManager.preDispatchKeyEvent(DefaultKeyboardFocusManager.java:1000)
[run] at java.awt.DefaultKeyboardFocusManager.typeAheadAssertions(DefaultKeyboardFocusManager.java:865)
[run] at java.awt.DefaultKeyboardFocusManager.dispatchEvent(DefaultKeyboardFocusManager.java:686)
[run] at java.awt.Component.dispatchEventImpl(Component.java:4616)
[run] at java.awt.Container.dispatchEventImpl(Container.java:2141)
[run] at java.awt.Window.dispatchEventImpl(Window.java:2489)
[run] at java.awt.Component.dispatchEvent(Component.java:4572)
[run] at java.awt.EventQueue.dispatchEventImpl(EventQueue.java:710)
[run] at java.awt.EventQueue.access$400(EventQueue.java:82)
[run] at java.awt.EventQueue$2.run(EventQueue.java:669)
[run] at java.awt.EventQueue$2.run(EventQueue.java:667)
[run] at java.security.AccessController.doPrivileged(Native Method)
[run] at java.security.AccessControlContext$1.doIntersectionPrivilege(AccessControlContext.java:87)
[run] at java.security.AccessControlContext$1.doIntersectionPrivilege(AccessControlContext.java:98)
[run] at java.awt.EventQueue$3.run(EventQueue.java:683)
[run] at java.awt.EventQueue$3.run(EventQueue.java:681)
[run] at java.security.AccessController.doPrivileged(Native Method)
[run] at java.security.AccessControlContext$1.doIntersectionPrivilege(AccessControlContext.java:87)
[run] at java.awt.EventQueue.dispatchEvent(EventQueue.java:680)
[run] at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:296)
[run] at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:211)
[run] at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:201)
[run] at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:196)
[run] at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:188)
[run] at java.awt.EventDispatchThread.run(EventDispatchThread.java:122)
[run] Caused by: ptolemy.kernel.util.IllegalActionException: Error evaluating expression: $datadir/output
[run] in .auto.outputdir
[run] Because:
[run] The ID datadir is undefined.
[run] at ptolemy.data.expr.Variable._evaluate(Variable.java:1691)
[run] at ptolemy.data.expr.Variable._propagate(Variable.java:1767)
[run] ... 51 more
[run] Caused by: ptolemy.data.expr.UndefinedConstantOrIdentifierException: The ID datadir is undefined.
[run] at ptolemy.data.expr.ParseTreeEvaluator.visitLeafNode(ParseTreeEvaluator.java:723)
[run] at ptolemy.data.expr.ASTPtLeafNode.visit(ASTPtLeafNode.java:125)
[run] at ptolemy.data.expr.ParseTreeEvaluator._evaluateChild(ParseTreeEvaluator.java:1360)
[run] at ptolemy.data.expr.ParseTreeEvaluator._evaluateAllChildren(ParseTreeEvaluator.java:1314)
Files
Updated by Christopher Brooks over 11 years ago
- Assignee changed from Derik Barseghian to Christopher Brooks
- % Done changed from 0 to 10
That's a warning, not an exception.
Take a look at the source.
Line 1789 of ptolemy/data/expr/Variable.java
if (!handleModelError(this, ex)) {
// FIXME: In the short term, warn about errors opening models.
// There are a bunch of things that need to be fixed, but there are also
// legitimate models such as ptolemy/actor/parameters/test/auto/ParameterSetTest.xml
// that refer to parameter not present when the model is parsed.
new IllegalActionException(this, ex,
"Warning:, there was a problem propagating \""
+ getName() + "\".")
.printStackTrace();
The above code prints a warning, it is not throwing an exception.
Edward discovered a problem with variables, so we are printing a warning while we figure out what to do.
Updated by jianwu jianwu over 11 years ago
Hi Christopher, thanks for your info. I noticed it is a warning and agree it doesn't have high priority.
Updated by Christopher Brooks about 11 years ago
Edward fixed an issue with copy and paste, but the problem persists.
I updated the output so that it indicates that it is a warning:
The message below is a Warning, and can be ignored.See https://projects.ecoinformatics.org/ecoinfo/issues/6000
- Start of Warning ####
ptolemy.kernel.util.IllegalActionException: Warning:, there was a problem propagating "probability".
in .VirtSim.Logic.Logique._Controller.probability
Because:
Error evaluating expression: ptolemy.domains.modal.kernel.FSMActor$ProbabilityFunction@3fb1bede
in .VirtSim.Logic.Logique._Controller.probability
Because:
The ID ptolemy is undefined.
at ptolemy.data.expr.Variable._propagate(Variable.java:1809)
at ptolemy.data.expr.Variable.validate(Variable.java:1469)
Updated by Christopher Brooks about 11 years ago
- Status changed from New to Closed
- % Done changed from 10 to 100
Fixed in ptII r67879.