Project

General

Profile

Actions

Bug #5412

closed

saving with an open plot window crashes

Added by Daniel Crawl over 13 years ago. Updated over 13 years ago.

Status:
Resolved
Priority:
Normal
Assignee:
Category:
general
Target version:
Start date:
05/26/2011
Due date:
% Done:

0%

Estimated time:
Bugzilla-Id:
5412

Description

If there is a plot window open, the following error occurs when saving and crashes Kepler. It also partially writes out the model file, leaving it corrupt.

[run] java.lang.RuntimeException: Internal Error.  Mark style 0 not supported.
[run] at ptolemy.plot.Plot.writeFormat(Plot.java:1071)
[run] at ptolemy.actor.lib.gui.PlotterBase._exportMoMLContents(PlotterBase.java:509)
[run] at ptolemy.kernel.util.NamedObj.exportMoML(NamedObj.java:933)
[run] at ptolemy.kernel.InstantiableNamedObj.exportMoML(InstantiableNamedObj.java:218)
[run] at ptolemy.kernel.util.NamedObj.exportMoML(NamedObj.java:839)
[run] at ptolemy.kernel.util.NamedObj.exportMoML(NamedObj.java:767)
[run] at org.kepler.objectmanager.ActorMetadata.toString(ActorMetadata.java:1106)
[run] at org.kepler.kar.KARBuilder.handleInitiatorList(KARBuilder.java:202)
[run] at org.kepler.kar.KARBuilder.generateKAR(KARBuilder.java:313)
[run] at org.kepler.kar.SaveKAR.saveToDisk(SaveKAR.java:154)
[run] at org.kepler.gui.kar.ExportArchiveAction.actionPerformed(ExportArchiveAction.java:403)
[run] at javax.swing.AbstractButton.fireActionPerformed(AbstractButton.java:2028)
[run] at javax.swing.AbstractButton$Handler.actionPerformed(AbstractButton.java:2351)
[run] at javax.swing.DefaultButtonModel.fireActionPerformed(DefaultButtonModel.java:387)
[run] at javax.swing.DefaultButtonModel.setPressed(DefaultButtonModel.java:242)
[run] at javax.swing.AbstractButton.doClick(AbstractButton.java:389)
[run] at com.apple.laf.ScreenMenuItem.actionPerformed(ScreenMenuItem.java:95)
[run] at java.awt.MenuItem.processActionEvent(MenuItem.java:627)
[run] at java.awt.MenuItem.processEvent(MenuItem.java:586)
[run] at java.awt.MenuComponent.dispatchEventImpl(MenuComponent.java:337)
[run] at java.awt.MenuComponent.dispatchEvent(MenuComponent.java:325)
[run] at java.awt.EventQueue.dispatchEventImpl(EventQueue.java:683)
[run] at java.awt.EventQueue.access$000(EventQueue.java:86)
[run] at java.awt.EventQueue$1.run(EventQueue.java:639)
[run] at java.awt.EventQueue$1.run(EventQueue.java:637)
[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$2.run(EventQueue.java:653)
[run] at java.awt.EventQueue$2.run(EventQueue.java:651)
[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:650)
[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)
Actions #1

Updated by Christopher Brooks over 13 years ago

I checked in a change to ptolemy.plot.Plot, but I can't verify
that the problem is fixed in Kepler because Kepler does not build
in a fresh tree for me.

Before the change, I could not replicate the problem in Ptolemy.
I ran
$PTII/bin/vergil ~/ptII/ptolemy/domains/sdf/demo/Butterfly/Butterfly.xml
and then tried to save the model.

When you say "Kepler crashes", do you mean that the Kepler process exits
or do you mean that you get a stack trace?

If Kepler crashes, then there is a more substantial problem that should be fixed.

I temporarily modified ptolemy/plot/Plot.java to always throw an
exception:

/** Write plot format information to the specified output stream in                          
 *  PlotML, an XML scheme.                                                                   
 *  @param output A buffered print writer.                                                   
*/
public synchronized void writeFormat(PrintWriter output) {
super.writeFormat(output);
if (1==1) {
throw new RuntimeException("Test for internal error while writing");
}

When I run the above veril command, I can try to save the plot or the model
and I get a stack trace in both situations, but Vergil stays running.

Could you make a similar change to the Plot.java file in Kepler and
verify that Kepler remains running even if there is an exception?

Actions #2

Updated by Daniel Crawl over 13 years ago

I added throw new RuntimeException to Plot.java and saving to XML generates an exception, but saving to KAR exits Kepler.

I updated Plot.java to r61046 to get your fix, and still get errors, but these don't appear related to Plot. In both cases, Kepler does not exit.

Saving to XML:

java.lang.NullPointerException
at org.kepler.gui.KeplerGraphFrame._saveAs(KeplerGraphFrame.java:1491)
at ptolemy.actor.gui.TableauFrame._saveAs(TableauFrame.java:1071)
at ptolemy.actor.gui.PtolemyFrame._saveAs(PtolemyFrame.java:360)
at ptolemy.actor.gui.TableauFrame._save(TableauFrame.java:1051)
at ptolemy.gui.Top$FileMenuListener.actionPerformed(Top.java:1208)
at org.kepler.gui.MenuMapper$1.actionPerformed(MenuMapper.java:386)

Saving to KAR:

[run] java.lang.NullPointerException
[run] at org.kepler.objectmanager.library.LibraryManager.deleteKAR(LibraryManager.java:543)
[run] at org.keINFO (org.kepler.kar.KARBuilder:writeKARFile:581) done writing KAR file to /Users/crawl/KeplerData/workflows/MyWorkflows/Unnamed1.kar
[run] pler.gui.kar.ExportArchiveAction.actionPerformed(ExportArchiveAction.java:389)
[run] at javax.swing.AbstractButton.fireActionPerformed(AbstractButton.java:2028)
[run] at javax.swing.AbstractButton$Handler.actionPerformed(AbstractButton.java:2351)
[run] at javax.swing.DefaultButtonModel.fireActionPerformed(DefaultButtonModel.java:387)
[run] at javax.swing.DefaultButtonModel.setPressed(DefaultButtonModel.java:242)
[run] at javax.swing.AbstractButton.doClick(AbstractButton.java:389)
[run] at com.apple.laf.ScreenMenuItem.actionPerformed(ScreenMenuItem.java:95)
[run] at java.awt.MenuItem.processActionEvent(MenuItem.java:627)
[run] at java.awt.MenuItem.processEvent(MenuItem.java:586)
[run] at java.awt.MenuComponent.dispatchEventImpl(MenuComponent.java:337)
[run] at java.awt.MenuComponent.dispatchEvent(MenuComponent.java:325)
[run] at java.awt.EventQueue.dispatchEventImpl(EventQueue.java:683)
[run] at java.awt.EventQueue.access$000(EventQueue.java:86)
[run] at java.awt.EventQueue$1.run(EventQueue.java:639)
[run] at java.awt.EventQueue$1.run(EventQueue.java:637)
[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$2.run(EventQueue.java:653)
[run] at java.awt.EventQueue$2.run(EventQueue.java:651)
[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:650)
[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)
Actions #3

Updated by Christopher Brooks over 13 years ago

This seems to be a Kepler bug now, so I'm resetting the assignee to default.

Actions #4

Updated by Daniel Crawl over 13 years ago

I fixed the NPE in KeplerGraphFrame in r27705. The NPE when saving kars no longer occurs, possibly due to Ptolemy r61130.

Actions #5

Updated by Redmine Admin over 11 years ago

Original Bugzilla ID was 5412

Actions

Also available in: Atom PDF