[kepler-dev] [Bug 4143] - "change failed" error while copy/paste-ing an ImageJ actor
bugzilla-daemon at ecoinformatics.org
bugzilla-daemon at ecoinformatics.org
Wed Jun 10 21:15:41 PDT 2009
http://bugzilla.ecoinformatics.org/show_bug.cgi?id=4143
------- Comment #2 from cxh at eecs.berkeley.edu 2009-06-10 21:15 -------
I can replicate this under Mac OS X. (thanks for the sample demo, it is a bi
big help)
The stacktrace I get when I paste after clearing the cache is:
ptolemy.kernel.util.IllegalActionException: Error evaluating expression:
/Users/cxh/.kepler/model_1244692997781/RExpression1.png
in .copyPaste.ImageJ2.fileOrURL
Because:
problem creating output file (in attributeChanged method)
at ptolemy.data.expr.Variable.validate(Variable.java:1450)
at ptolemy.moml.MoMLParser.endDocument(MoMLParser.java:666)
at com.microstar.xml.XmlParser.doParse(XmlParser.java:162)
at com.microstar.xml.XmlParser.parse(XmlParser.java:132)
at ptolemy.moml.MoMLParser.parse(MoMLParser.java:1394)
at ptolemy.moml.MoMLParser.parse(MoMLParser.java:1367)
at ptolemy.moml.MoMLParser.parse(MoMLParser.java:1522)
at ptolemy.moml.MoMLChangeRequest._execute(MoMLChangeRequest.java:270)
at ptolemy.kernel.util.ChangeRequest.execute(ChangeRequest.java:170)
at
ptolemy.kernel.util.NamedObj.executeChangeRequests(NamedObj.java:699)
at ptolemy.kernel.util.NamedObj.requestChange(NamedObj.java:1686)
at ptolemy.actor.CompositeActor.requestChange(CompositeActor.java:1351)
at org.kepler.gui.KeplerGraphFrame.paste(KeplerGraphFrame.java:1020)
at
ptolemy.vergil.basic.BasicGraphFrame$PasteAction.actionPerformed(BasicGraphFrame.java:2814)
at
javax.swing.JComponent$ActionStandin.actionPerformed(JComponent.java:3236)
at javax.swing.SwingUtilities.notifyAction(SwingUtilities.java:1576)
at javax.swing.JComponent.processKeyBinding(JComponent.java:2772)
at javax.swing.KeyboardManager.fireBinding(KeyboardManager.java:255)
at
javax.swing.KeyboardManager.fireKeyboardAction(KeyboardManager.java:204)
at
javax.swing.JComponent.processKeyBindingsForAllComponents(JComponent.java:2849)
at javax.swing.JComponent.processKeyBindings(JComponent.java:2841)
at javax.swing.JComponent.processKeyEvent(JComponent.java:2735)
at java.awt.Component.processEvent(Component.java:5379)
at java.awt.Container.processEvent(Container.java:2010)
at java.awt.Component.dispatchEventImpl(Component.java:4068)
at java.awt.Container.dispatchEventImpl(Container.java:2068)
at java.awt.Component.dispatchEvent(Component.java:3903)
at
java.awt.KeyboardFocusManager.redispatchEvent(KeyboardFocusManager.java:1826)
at
java.awt.DefaultKeyboardFocusManager.dispatchKeyEvent(DefaultKeyboardFocusManager.java:681)
at
java.awt.DefaultKeyboardFocusManager.preDispatchKeyEvent(DefaultKeyboardFocusManager.java:938)
at
java.awt.DefaultKeyboardFocusManager.typeAheadAssertions(DefaultKeyboardFocusManager.java:810)
at
java.awt.DefaultKeyboardFocusManager.dispatchEvent(DefaultKeyboardFocusManager.java:645)
at java.awt.Component.dispatchEventImpl(Component.java:3941)
at java.awt.Container.dispatchEventImpl(Container.java:2068)
at java.awt.Window.dispatchEventImpl(Window.java:1801)
at java.awt.Component.dispatchEvent(Component.java:3903)
at java.awt.EventQueue.dispatchEvent(EventQueue.java:463)
at
java.awt.EventDispatchThread.pumpOneEventForHierarchy(EventDispatchThread.java:269)
at
java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:190)
at
java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:184)
at
java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:176)
at java.awt.EventDispatchThread.run(EventDispatchThread.java:110)
The string "problem creating output file (in attributeChanged method)"
appears in:
./util/src/util/IJMacro.java
./util/src/util/ImageJActor.java
./util/src/util/KeplerImageReader.java
Looking at ImageJActor.java, I see:
} catch (Exception e) {
throw new IllegalActionException("problem creating output file (in
attributeChanged method)");
}
There are three problems with this:
1) The thrown exception does not include "this", so the UI won't
be able to indicate which actor has the problem
2) The thrown exception does not include the causing exception.
3) The thrown exception does not include the name of the file
A better version is:
} catch (Exception ex) {
throw new IllegalActionException(this, ex,
"Problem creating the output file \"" +
_file + "\"");
}
Now the exception is:
ptolemy.kernel.util.IllegalActionException: Error evaluating expression:
/Users/cxh/.kepler/model_1244692997781/RExpression1.png
in .copyPaste.ImageJ2.fileOrURL
Because:
Problem creating the output file
"/Users/cxh/.kepler/model_1244692997781/RExpression1.png"
in .copyPaste.ImageJ2
Because:
No such file or directory
at ptolemy.data.expr.Variable.validate(Variable.java:1450)
at ptolemy.moml.MoMLParser.endDocument(MoMLParser.java:666)
at com.microstar.xml.XmlParser.doParse(XmlParser.java:162)
at com.microstar.xml.XmlParser.parse(XmlParser.java:132)
at ptolemy.moml.MoMLParser.parse(MoMLParser.java:1394)
at ptolemy.moml.MoMLParser.parse(MoMLParser.java:1367)
at ptolemy.moml.MoMLParser.parse(MoMLParser.java:1522)
at ptolemy.moml.MoMLChangeRequest._execute(MoMLChangeRequest.java:270)
at ptolemy.kernel.util.ChangeRequest.execute(ChangeRequest.java:170)
at
ptolemy.kernel.util.NamedObj.executeChangeRequests(NamedObj.java:699)
at ptolemy.kernel.util.NamedObj.requestChange(NamedObj.java:1686)
at ptolemy.actor.CompositeActor.requestChange(CompositeActor.java:1351)
at org.kepler.gui.KeplerGraphFrame.paste(KeplerGraphFrame.java:1020)
at
ptolemy.vergil.basic.BasicGraphFrame$PasteAction.actionPerformed(BasicGraphFrame.java:2814)
at
javax.swing.JComponent$ActionStandin.actionPerformed(JComponent.java:3236)
at javax.swing.SwingUtilities.notifyAction(SwingUtilities.java:1576)
at javax.swing.JComponent.processKeyBinding(JComponent.java:2772)
at javax.swing.KeyboardManager.fireBinding(KeyboardManager.java:255)
at
javax.swing.KeyboardManager.fireKeyboardAction(KeyboardManager.java:204)
at
javax.swing.JComponent.processKeyBindingsForAllComponents(JComponent.java:2849)
at javax.swing.JComponent.processKeyBindings(JComponent.java:2841)
at javax.swing.JComponent.processKeyEvent(JComponent.java:2735)
at java.awt.Component.processEvent(Component.java:5379)
at java.awt.Container.processEvent(Container.java:2010)
at java.awt.Component.dispatchEventImpl(Component.java:4068)
at java.awt.Container.dispatchEventImpl(Container.java:2068)
at java.awt.Component.dispatchEvent(Component.java:3903)
at
java.awt.KeyboardFocusManager.redispatchEvent(KeyboardFocusManager.java:1826)
at
java.awt.DefaultKeyboardFocusManager.dispatchKeyEvent(DefaultKeyboardFocusManager.java:681)
at
java.awt.DefaultKeyboardFocusManager.preDispatchKeyEvent(DefaultKeyboardFocusManager.java:938)
at
java.awt.DefaultKeyboardFocusManager.typeAheadAssertions(DefaultKeyboardFocusManager.java:810)
at
java.awt.DefaultKeyboardFocusManager.dispatchEvent(DefaultKeyboardFocusManager.java:645)
at java.awt.Component.dispatchEventImpl(Component.java:3941)
at java.awt.Container.dispatchEventImpl(Container.java:2068)
at java.awt.Window.dispatchEventImpl(Window.java:1801)
at java.awt.Component.dispatchEvent(Component.java:3903)
at java.awt.EventQueue.dispatchEvent(EventQueue.java:463)
at
java.awt.EventDispatchThread.pumpOneEventForHierarchy(EventDispatchThread.java:269)
at
java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:190)
at
java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:184)
at
java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:176)
at java.awt.EventDispatchThread.run(EventDispatchThread.java:110)
Gotta run . . .
More information about the Kepler-dev
mailing list