Can't close place dialog after updating color type

Bug #1988734 reported by Kenneth Yrke Jørgensen
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
TAPAAL
Fix Committed
Critical
Unassigned

Bug Description

To reproduce:

 - open color - token-ring example
 - add a new color to the color type process
 - Open the edit place dialog and press ok

The dialog will not close and you the exception:

<code>
Exception in thread "AWT-EventQueue-0" java.lang.NullPointerException: Cannot invoke "dk.aau.cs.model.CPN.ProductType.getColor(java.util.Vector)" because "pt" is null
 at dk.aau.cs.model.CPN.Expressions.TupleExpression.eval(TupleExpression.java:45)
 at dk.aau.cs.model.CPN.Expressions.NumberOfExpression.eval(NumberOfExpression.java:68)
 at dk.aau.cs.model.CPN.Expressions.AddExpression.eval(AddExpression.java:33)
 at pipe.gui.petrinet.editor.PlaceEditorPanel.doOkColors(PlaceEditorPanel.java:719)
 at pipe.gui.petrinet.editor.PlaceEditorPanel.doOK(PlaceEditorPanel.java:669)
 at pipe.gui.petrinet.editor.PlaceEditorPanel.lambda$initButtonPanel$0(PlaceEditorPanel.java:150)
 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.plaf.basic.BasicButtonListener.mouseReleased(BasicButtonListener.java:279)
 at java.desktop/java.awt.Component.processMouseEvent(Component.java:6617)
 at java.desktop/javax.swing.JComponent.processMouseEvent(JComponent.java:3342)
 at java.desktop/java.awt.Component.processEvent(Component.java:6382)
 at java.desktop/java.awt.Container.processEvent(Container.java:2264)
 at java.desktop/java.awt.Component.dispatchEventImpl(Component.java:4993)
 at java.desktop/java.awt.Container.dispatchEventImpl(Container.java:2322)
 at java.desktop/java.awt.Component.dispatchEvent(Component.java:4825)
 at java.desktop/java.awt.LightweightDispatcher.retargetMouseEvent(Container.java:4934)
 at java.desktop/java.awt.LightweightDispatcher.processMouseEvent(Container.java:4563)
 at java.desktop/java.awt.LightweightDispatcher.dispatchEvent(Container.java:4504)
 at java.desktop/java.awt.Container.dispatchEventImpl(Container.java:2308)
 at java.desktop/java.awt.Window.dispatchEventImpl(Window.java:2773)
 at java.desktop/java.awt.Component.dispatchEvent(Component.java:4825)
 at java.desktop/java.awt.EventQueue.dispatchEventImpl(EventQueue.java:772)
 at java.desktop/java.awt.EventQueue$4.run(EventQueue.java:721)
 at java.desktop/java.awt.EventQueue$4.run(EventQueue.java:715)
 at java.base/java.security.AccessController.doPrivileged(AccessController.java:391)
 at java.base/java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:85)
 at java.base/java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:95)
 at java.desktop/java.awt.EventQueue$5.run(EventQueue.java:745)
 at java.desktop/java.awt.EventQueue$5.run(EventQueue.java:743)
 at java.base/java.security.AccessController.doPrivileged(AccessController.java:391)
 at java.base/java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:85)
 at java.desktop/java.awt.EventQueue.dispatchEvent(EventQueue.java:742)
 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.pumpEventsForFilter(EventDispatchThread.java:117)
 at java.desktop/java.awt.WaitDispatchSupport$2.run(WaitDispatchSupport.java:190)
 at java.desktop/java.awt.WaitDispatchSupport$4.run(WaitDispatchSupport.java:235)
 at java.desktop/java.awt.WaitDispatchSupport$4.run(WaitDispatchSupport.java:233)
 at java.base/java.security.AccessController.doPrivileged(AccessController.java:312)
 at java.desktop/java.awt.WaitDispatchSupport.enter(WaitDispatchSupport.java:233)
 at java.desktop/java.awt.Dialog.show(Dialog.java:1079)
 at java.desktop/java.awt.Component.show(Component.java:1720)
 at java.desktop/java.awt.Component.setVisible(Component.java:1667)
 at java.desktop/java.awt.Window.setVisible(Window.java:1032)
 at java.desktop/java.awt.Dialog.setVisible(Dialog.java:1014)
 at pipe.gui.petrinet.graphicElements.tapn.TimedPlaceComponent.showEditor(TimedPlaceComponent.java:417)
 at pipe.gui.petrinet.PetriNetTab$CanvasGeneralDrawController.lambda$registerEvents$9(PetriNetTab.java:2477)
 at net.tapaal.gui.DrawingSurfaceManager.AbstractDrawingSurfaceManager.lambda$triggerEvent$1(AbstractDrawingSurfaceManager.java:119)
 at java.base/java.util.Optional.map(Optional.java:260)
 at net.tapaal.gui.DrawingSurfaceManager.AbstractDrawingSurfaceManager.triggerEvent(AbstractDrawingSurfaceManager.java:117)
 at pipe.gui.petrinet.graphicElements.GraphicalElement$1.mouseClicked(GraphicalElement.java:30)
 at java.desktop/java.awt.Component.processMouseEvent(Component.java:6620)
 at java.desktop/javax.swing.JComponent.processMouseEvent(JComponent.java:3342)
 at java.desktop/java.awt.Component.processEvent(Component.java:6382)
 at java.desktop/java.awt.Container.processEvent(Container.java:2264)
 at java.desktop/java.awt.Component.dispatchEventImpl(Component.java:4993)
 at java.desktop/java.awt.Container.dispatchEventImpl(Container.java:2322)
 at java.desktop/java.awt.Component.dispatchEvent(Component.java:4825)
 at java.desktop/java.awt.LightweightDispatcher.retargetMouseEvent(Container.java:4934)
 at java.desktop/java.awt.LightweightDispatcher.processMouseEvent(Container.java:4572)
 at java.desktop/java.awt.LightweightDispatcher.dispatchEvent(Container.java:4504)
 at java.desktop/java.awt.Container.dispatchEventImpl(Container.java:2308)
 at java.desktop/java.awt.Window.dispatchEventImpl(Window.java:2773)
 at java.desktop/java.awt.Component.dispatchEvent(Component.java:4825)
 at java.desktop/java.awt.EventQueue.dispatchEventImpl(EventQueue.java:772)
 at java.desktop/java.awt.EventQueue$4.run(EventQueue.java:721)
 at java.desktop/java.awt.EventQueue$4.run(EventQueue.java:715)
 at java.base/java.security.AccessController.doPrivileged(AccessController.java:391)
 at java.base/java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:85)
 at java.base/java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:95)
 at java.desktop/java.awt.EventQueue$5.run(EventQueue.java:745)
 at java.desktop/java.awt.EventQueue$5.run(EventQueue.java:743)
 at java.base/java.security.AccessController.doPrivileged(AccessController.java:391)
 at java.base/java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:85)
 at java.desktop/java.awt.EventQueue.dispatchEvent(EventQueue.java:742)
 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)
Exception in thread "AWT-EventQueue-0" java.lang.NullPointerException: Cannot invoke "dk.aau.cs.model.CPN.ProductType.getColor(java.util.Vector)" because "pt" is null
 at dk.aau.cs.model.CPN.Expressions.TupleExpression.eval(TupleExpression.java:45)
 at dk.aau.cs.model.CPN.Expressions.NumberOfExpression.eval(NumberOfExpression.java:68)
 at dk.aau.cs.model.CPN.Expressions.AddExpression.eval(AddExpression.java:33)
 at pipe.gui.petrinet.editor.PlaceEditorPanel.doOkColors(PlaceEditorPanel.java:719)
 at pipe.gui.petrinet.editor.PlaceEditorPanel.doOK(PlaceEditorPanel.java:669)
 at pipe.gui.petrinet.editor.PlaceEditorPanel.lambda$initButtonPanel$0(PlaceEditorPanel.java:150)
 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.plaf.basic.BasicButtonListener.mouseReleased(BasicButtonListener.java:279)
 at java.desktop/java.awt.Component.processMouseEvent(Component.java:6617)
 at java.desktop/javax.swing.JComponent.processMouseEvent(JComponent.java:3342)
 at java.desktop/java.awt.Component.processEvent(Component.java:6382)
 at java.desktop/java.awt.Container.processEvent(Container.java:2264)
 at java.desktop/java.awt.Component.dispatchEventImpl(Component.java:4993)
 at java.desktop/java.awt.Container.dispatchEventImpl(Container.java:2322)
 at java.desktop/java.awt.Component.dispatchEvent(Component.java:4825)
 at java.desktop/java.awt.LightweightDispatcher.retargetMouseEvent(Container.java:4934)
 at java.desktop/java.awt.LightweightDispatcher.processMouseEvent(Container.java:4563)
 at java.desktop/java.awt.LightweightDispatcher.dispatchEvent(Container.java:4504)
 at java.desktop/java.awt.Container.dispatchEventImpl(Container.java:2308)
 at java.desktop/java.awt.Window.dispatchEventImpl(Window.java:2773)
 at java.desktop/java.awt.Component.dispatchEvent(Component.java:4825)
 at java.desktop/java.awt.EventQueue.dispatchEventImpl(EventQueue.java:772)
 at java.desktop/java.awt.EventQueue$4.run(EventQueue.java:721)
 at java.desktop/java.awt.EventQueue$4.run(EventQueue.java:715)
 at java.base/java.security.AccessController.doPrivileged(AccessController.java:391)
 at java.base/java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:85)
 at java.base/java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:95)
 at java.desktop/java.awt.EventQueue$5.run(EventQueue.java:745)
 at java.desktop/java.awt.EventQueue$5.run(EventQueue.java:743)
 at java.base/java.security.AccessController.doPrivileged(AccessController.java:391)
 at java.base/java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:85)
 at java.desktop/java.awt.EventQueue.dispatchEvent(EventQueue.java:742)
 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.pumpEventsForFilter(EventDispatchThread.java:117)
 at java.desktop/java.awt.WaitDispatchSupport$2.run(WaitDispatchSupport.java:190)
 at java.desktop/java.awt.WaitDispatchSupport$4.run(WaitDispatchSupport.java:235)
 at java.desktop/java.awt.WaitDispatchSupport$4.run(WaitDispatchSupport.java:233)
 at java.base/java.security.AccessController.doPrivileged(AccessController.java:312)
 at java.desktop/java.awt.WaitDispatchSupport.enter(WaitDispatchSupport.java:233)
 at java.desktop/java.awt.Dialog.show(Dialog.java:1079)
 at java.desktop/java.awt.Component.show(Component.java:1720)
 at java.desktop/java.awt.Component.setVisible(Component.java:1667)
 at java.desktop/java.awt.Window.setVisible(Window.java:1032)
 at java.desktop/java.awt.Dialog.setVisible(Dialog.java:1014)
 at pipe.gui.petrinet.graphicElements.tapn.TimedPlaceComponent.showEditor(TimedPlaceComponent.java:417)
 at pipe.gui.petrinet.PetriNetTab$CanvasGeneralDrawController.lambda$registerEvents$9(PetriNetTab.java:2477)
 at net.tapaal.gui.DrawingSurfaceManager.AbstractDrawingSurfaceManager.lambda$triggerEvent$1(AbstractDrawingSurfaceManager.java:119)
 at java.base/java.util.Optional.map(Optional.java:260)
 at net.tapaal.gui.DrawingSurfaceManager.AbstractDrawingSurfaceManager.triggerEvent(AbstractDrawingSurfaceManager.java:117)
 at pipe.gui.petrinet.graphicElements.GraphicalElement$1.mouseClicked(GraphicalElement.java:30)
 at java.desktop/java.awt.Component.processMouseEvent(Component.java:6620)
 at java.desktop/javax.swing.JComponent.processMouseEvent(JComponent.java:3342)
 at java.desktop/java.awt.Component.processEvent(Component.java:6382)
 at java.desktop/java.awt.Container.processEvent(Container.java:2264)
 at java.desktop/java.awt.Component.dispatchEventImpl(Component.java:4993)
 at java.desktop/java.awt.Container.dispatchEventImpl(Container.java:2322)
 at java.desktop/java.awt.Component.dispatchEvent(Component.java:4825)
 at java.desktop/java.awt.LightweightDispatcher.retargetMouseEvent(Container.java:4934)
 at java.desktop/java.awt.LightweightDispatcher.processMouseEvent(Container.java:4572)
 at java.desktop/java.awt.LightweightDispatcher.dispatchEvent(Container.java:4504)
 at java.desktop/java.awt.Container.dispatchEventImpl(Container.java:2308)
 at java.desktop/java.awt.Window.dispatchEventImpl(Window.java:2773)
 at java.desktop/java.awt.Component.dispatchEvent(Component.java:4825)
 at java.desktop/java.awt.EventQueue.dispatchEventImpl(EventQueue.java:772)
 at java.desktop/java.awt.EventQueue$4.run(EventQueue.java:721)
 at java.desktop/java.awt.EventQueue$4.run(EventQueue.java:715)
 at java.base/java.security.AccessController.doPrivileged(AccessController.java:391)
 at java.base/java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:85)
 at java.base/java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:95)
 at java.desktop/java.awt.EventQueue$5.run(EventQueue.java:745)
 at java.desktop/java.awt.EventQueue$5.run(EventQueue.java:743)
 at java.base/java.security.AccessController.doPrivileged(AccessController.java:391)
 at java.base/java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:85)
 at java.desktop/java.awt.EventQueue.dispatchEvent(EventQueue.java:742)
 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)

</code>

Changed in tapaal:
milestone: none → cpn
status: New → Confirmed
importance: Undecided → Critical
Jiri Srba (srba)
Changed in tapaal:
status: Confirmed → Fix Committed
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.