Bug #5240
closedNameDuplicationException from SequencePlotter
0%
Description
Reproduce with attached workflow.
ptolemy.kernel.util.IllegalActionException: Error creating effigy and tableau
in .plot-error.a plot
Because:
Attempt to insert object named "plot" into container named ".configuration.directory.effigy2", which already contains an object with that name.
at ptolemy.actor.lib.gui.Plotter.initialize(Plotter.java:167)
at ptolemy.actor.lib.gui.SequencePlotter.initialize(SequencePlotter.java:130)
at ptolemy.actor.process.ProcessThread.run(ProcessThread.java:135)
Caused by: ptolemy.kernel.util.NameDuplicationException: Attempt to insert object named "plot" into container named ".configuration.directory.effigy2", which already contains an object with that name.
at ptolemy.kernel.util.NamedList.append(NamedList.java:133)
at ptolemy.kernel.CompositeEntity._addEntity(CompositeEntity.java:2080)
at ptolemy.kernel.ComponentEntity.setContainer(ComponentEntity.java:518)
at ptolemy.kernel.CompositeEntity.setContainer(CompositeEntity.java:1815)
at ptolemy.actor.gui.Effigy.setContainer(Effigy.java:401)
at ptolemy.kernel.ComponentEntity.<init>(ComponentEntity.java:106)
at ptolemy.kernel.CompositeEntity.<init>(CompositeEntity.java:164)
at ptolemy.actor.gui.Effigy.<init>(Effigy.java:133)
at ptolemy.actor.gui.PlotEffigy.<init>(PlotEffigy.java:71)
at ptolemy.actor.lib.gui.Plotter.initialize(Plotter.java:155)
... 2 more
Caused by: ptolemy.kernel.util.NameDuplicationException: Attempt to insert object named "plot" into container named ".configuration.directory.effigy2", which already contains an object with that name.
at ptolemy.kernel.util.NamedList.append(NamedList.java:133)
at ptolemy.kernel.CompositeEntity._addEntity(CompositeEntity.java:2080)
at ptolemy.kernel.ComponentEntity.setContainer(ComponentEntity.java:518)
at ptolemy.kernel.CompositeEntity.setContainer(CompositeEntity.java:1815)
at ptolemy.actor.gui.Effigy.setContainer(Effigy.java:401)
at ptolemy.kernel.ComponentEntity.<init>(ComponentEntity.java:106)
at ptolemy.kernel.CompositeEntity.<init>(CompositeEntity.java:164)
at ptolemy.actor.gui.Effigy.<init>(Effigy.java:133)
at ptolemy.actor.gui.PlotEffigy.<init>(PlotEffigy.java:71)
at ptolemy.actor.lib.gui.Plotter.initialize(Plotter.java:155)
at ptolemy.actor.lib.gui.SequencePlotter.initialize(SequencePlotter.java:130)
at ptolemy.actor.process.ProcessThread.run(ProcessThread.java:135)
Files
Updated by David Welker almost 14 years ago
Re-assigning to 2.3 since this less critical.
Updated by Christopher Brooks almost 14 years ago
The model consists of two Plots under PN. The error is reproducible under Ptolemy, outside of Kepler. I think it is a threading bug, where in
ptolemy/actor/lib/gui/Plotter.java, we have:
PlotEffigy plotEffigy = new PlotEffigy(containerEffigy,
containerEffigy.uniqueName("plot"));
The problem is that both plotters are trying to get a unique name for
"plot" and are getting the same name back. We need some locking here.
Updated by Christopher Brooks over 12 years ago
I'm closing this because I can't reproduce it in the current tree.
The problem is that a model with two plots was producing a stack trace.
I tried reproducing this in ptII trees from around 2010-11, but could
not reproduce the bug. However, I'm using a slow net connection for
the tests on old trees, so the problem might not be triggered.
There have been various changes to the plotter since this bug including
the splitting into interface and implementation. So, it could be
that the bug is fixed.
However, it is troubling that I can't reproduce the bug in an old ptII tree.