In cpn branch I have a problem to save a net as I get:
java.lang.ArrayIndexOutOfBoundsException: Array index out of range: 0
at java.base/java.util.Vector.get(Vector.java:750)
at dk.aau.cs.model.CPN.Expressions.AddExpression.toString(AddExpression.java:176)
at dk.aau.cs.io.writeTACPN.appendColoredPlaceDependencies(writeTACPN.java:370)
at dk.aau.cs.io.TimedArcPetriNetNetworkWriter.createPlaceElement(TimedArcPetriNetNetworkWriter.java:481)
at dk.aau.cs.io.TimedArcPetriNetNetworkWriter.appendPlaces(TimedArcPetriNetNetworkWriter.java:269)
at dk.aau.cs.io.TimedArcPetriNetNetworkWriter.appendTemplates(TimedArcPetriNetNetworkWriter.java:253)
at dk.aau.cs.io.TimedArcPetriNetNetworkWriter.savePNML(TimedArcPetriNetNetworkWriter.java:114)
at dk.aau.cs.io.TimedArcPetriNetNetworkWriter.savePNML(TimedArcPetriNetNetworkWriter.java:136)
at pipe.gui.petrinet.PetriNetTab.writeNetToFile(PetriNetTab.java:1816)
at pipe.gui.petrinet.PetriNetTab.writeNetToFile(PetriNetTab.java:1830)
at pipe.gui.petrinet.PetriNetTab.saveNet(PetriNetTab.java:1836)
at net.tapaal.gui.GuiFrameController.save(GuiFrameController.java:528)
at net.tapaal.gui.GuiFrameController.save(GuiFrameController.java:510)
at net.tapaal.helpers.Reference.Reference.ifPresent(Reference.java:29)
at pipe.gui.GuiFrame$4.actionPerformed(GuiFrame.java:94)
at java.desktop/javax.swing.AbstractButton.fireActionPerformed(AbstractButton.java:1972)
at java.desktop/javax.swing.AbstractButton$Handler.actionPerformed(AbstractButton.java:2313)
at java.desktop/javax.swing.DefaultButtonModel.fireActionPerformed(DefaultButtonModel.java:405)
at java.desktop/javax.swing.DefaultButtonModel.setPressed(DefaultButtonModel.java:262)
at java.desktop/javax.swing.AbstractButton.doClick(AbstractButton.java:374)
at java.desktop/javax.swing.AbstractButton.doClick(AbstractButton.java:354)
at java.desktop/javax.swing.plaf.basic.BasicMenuItemUI$Actions.actionPerformed(BasicMenuItemUI.java:983)
at java.desktop/javax.swing.SwingUtilities.notifyAction(SwingUtilities.java:1810)
at java.desktop/javax.swing.JComponent.processKeyBinding(JComponent.java:2947)
at java.desktop/javax.swing.JMenuBar.processBindingForKeyStrokeRecursive(JMenuBar.java:710)
at java.desktop/javax.swing.JMenuBar.processBindingForKeyStrokeRecursive(JMenuBar.java:717)
at java.desktop/javax.swing.JMenuBar.processBindingForKeyStrokeRecursive(JMenuBar.java:717)
at java.desktop/javax.swing.JMenuBar.processKeyBinding(JMenuBar.java:688)
at java.desktop/javax.swing.KeyboardManager.fireBinding(KeyboardManager.java:311)
at java.desktop/javax.swing.KeyboardManager.fireKeyboardAction(KeyboardManager.java:297)
at java.desktop/javax.swing.JComponent.processKeyBindingsForAllComponents(JComponent.java:3040)
at java.desktop/javax.swing.SwingUtilities.processKeyBindings(SwingUtilities.java:1731)
at java.desktop/javax.swing.UIManager$2.postProcessKeyEvent(UIManager.java:1549)
at java.desktop/java.awt.DefaultKeyboardFocusManager.dispatchKeyEvent(DefaultKeyboardFocusManager.java:894)
at java.desktop/java.awt.DefaultKeyboardFocusManager.preDispatchKeyEvent(DefaultKeyboardFocusManager.java:1150)
at java.desktop/java.awt.DefaultKeyboardFocusManager.typeAheadAssertions(DefaultKeyboardFocusManager.java:1020)
at java.desktop/java.awt.DefaultKeyboardFocusManager.dispatchEvent(DefaultKeyboardFocusManager.java:848)
at java.desktop/java.awt.Component.dispatchEventImpl(Component.java:4882)
at java.desktop/java.awt.Container.dispatchEventImpl(Container.java:2324)
at java.desktop/java.awt.Window.dispatchEventImpl(Window.java:2780)
at java.desktop/java.awt.Component.dispatchEvent(Component.java:4833)
at java.desktop/java.awt.EventQueue.dispatchEventImpl(EventQueue.java:773)
at java.desktop/java.awt.EventQueue$4.run(EventQueue.java:722)
at java.desktop/java.awt.EventQueue$4.run(EventQueue.java:716)
at java.base/java.security.AccessController.doPrivileged(AccessController.java:399)
at java.base/java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:86)
at java.base/java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:97)
at java.desktop/java.awt.EventQueue$5.run(EventQueue.java:746)
at java.desktop/java.awt.EventQueue$5.run(EventQueue.java:744)
at java.base/java.security.AccessController.doPrivileged(AccessController.java:399)
at java.base/java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:86)
at java.desktop/java.awt.EventQueue.dispatchEvent(EventQueue.java:743)
at java.desktop/java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:203)
at java.desktop/java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:124)
at java.desktop/java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:113)
at java.desktop/java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:109)
at java.desktop/java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:101)
at java.desktop/java.awt.EventDispatchThread.run(EventDispatchThread.java:90)
java.lang.ArrayIndexOutOfBoundsException: Array index out of range: 0
at java.base/java.util.Vector.get(Vector.java:750)
at dk.aau.cs.model.CPN.Expressions.AddExpression.toString(AddExpression.java:176)
at dk.aau.cs.io.writeTACPN.appendColoredPlaceDependencies(writeTACPN.java:370)
at dk.aau.cs.io.TimedArcPetriNetNetworkWriter.createPlaceElement(TimedArcPetriNetNetworkWriter.java:481)
at dk.aau.cs.io.TimedArcPetriNetNetworkWriter.appendPlaces(TimedArcPetriNetNetworkWriter.java:269)
at dk.aau.cs.io.TimedArcPetriNetNetworkWriter.appendTemplates(TimedArcPetriNetNetworkWriter.java:253)
at dk.aau.cs.io.TimedArcPetriNetNetworkWriter.savePNML(TimedArcPetriNetNetworkWriter.java:114)
at dk.aau.cs.io.TimedArcPetriNetNetworkWriter.savePNML(TimedArcPetriNetNetworkWriter.java:136)
at pipe.gui.petrinet.PetriNetTab.writeNetToFile(PetriNetTab.java:1816)
at pipe.gui.petrinet.PetriNetTab.writeNetToFile(PetriNetTab.java:1830)
at pipe.gui.petrinet.PetriNetTab.saveNet(PetriNetTab.java:1836)
at net.tapaal.gui.GuiFrameController.save(GuiFrameController.java:528)
at net.tapaal.gui.GuiFrameController.save(GuiFrameController.java:510)
at net.tapaal.helpers.Reference.Reference.ifPresent(Reference.java:29)
at pipe.gui.GuiFrame$4.actionPerformed(GuiFrame.java:94)
at java.desktop/javax.swing.AbstractButton.fireActionPerformed(AbstractButton.java:1972)
at java.desktop/javax.swing.AbstractButton$Handler.actionPerformed(AbstractButton.java:2313)
at java.desktop/javax.swing.DefaultButtonModel.fireActionPerformed(DefaultButtonModel.java:405)
at java.desktop/javax.swing.DefaultButtonModel.setPressed(DefaultButtonModel.java:262)
at java.desktop/javax.swing.AbstractButton.doClick(AbstractButton.java:374)
at java.desktop/javax.swing.AbstractButton.doClick(AbstractButton.java:354)
at java.desktop/javax.swing.plaf.basic.BasicMenuItemUI$Actions.actionPerformed(BasicMenuItemUI.java:983)
at java.desktop/javax.swing.SwingUtilities.notifyAction(SwingUtilities.java:1810)
at java.desktop/javax.swing.JComponent.processKeyBinding(JComponent.java:2947)
at java.desktop/javax.swing.JMenuBar.processBindingForKeyStrokeRecursive(JMenuBar.java:710)
at java.desktop/javax.swing.JMenuBar.processBindingForKeyStrokeRecursive(JMenuBar.java:717)
at java.desktop/javax.swing.JMenuBar.processBindingForKeyStrokeRecursive(JMenuBar.java:717)
at java.desktop/javax.swing.JMenuBar.processKeyBinding(JMenuBar.java:688)
at java.desktop/javax.swing.KeyboardManager.fireBinding(KeyboardManager.java:311)
at java.desktop/javax.swing.KeyboardManager.fireKeyboardAction(KeyboardManager.java:297)
at java.desktop/javax.swing.JComponent.processKeyBindingsForAllComponents(JComponent.java:3040)
at java.desktop/javax.swing.SwingUtilities.processKeyBindings(SwingUtilities.java:1731)
at java.desktop/javax.swing.UIManager$2.postProcessKeyEvent(UIManager.java:1549)
at java.desktop/java.awt.DefaultKeyboardFocusManager.dispatchKeyEvent(DefaultKeyboardFocusManager.java:894)
at java.desktop/java.awt.DefaultKeyboardFocusManager.preDispatchKeyEvent(DefaultKeyboardFocusManager.java:1150)
at java.desktop/java.awt.DefaultKeyboardFocusManager.typeAheadAssertions(DefaultKeyboardFocusManager.java:1020)
at java.desktop/java.awt.DefaultKeyboardFocusManager.dispatchEvent(DefaultKeyboardFocusManager.java:848)
at java.desktop/java.awt.Component.dispatchEventImpl(Component.java:4882)
at java.desktop/java.awt.Container.dispatchEventImpl(Container.java:2324)
at java.desktop/java.awt.Window.dispatchEventImpl(Window.java:2780)
at java.desktop/java.awt.Component.dispatchEvent(Component.java:4833)
at java.desktop/java.awt.EventQueue.dispatchEventImpl(EventQueue.java:773)
at java.desktop/java.awt.EventQueue$4.run(EventQueue.java:722)
at java.desktop/java.awt.EventQueue$4.run(EventQueue.java:716)
at java.base/java.security.AccessController.doPrivileged(AccessController.java:399)
at java.base/java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:86)
at java.base/java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:97)
at java.desktop/java.awt.EventQueue$5.run(EventQueue.java:746)
at java.desktop/java.awt.EventQueue$5.run(EventQueue.java:744)
at java.base/java.security.AccessController.doPrivileged(AccessController.java:399)
at java.base/java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:86)
at java.desktop/java.awt.EventQueue.dispatchEvent(EventQueue.java:743)
at java.desktop/java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:203)
at java.desktop/java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:124)
at java.desktop/java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:113)
at java.desktop/java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:109)
at java.desktop/java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:101)
at java.desktop/java.awt.EventDispatchThread.run(EventDispatchThread.java:90
Open the attached CPN net. Add a new place of color type "lift" and add a new token 1'(1, closed, up). Then try to save/load and it fails (in the debug menu).