Adding two varaibles with same name throws exception

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

Bug Description

To reproduce:
  - open a new colored net
  - Select Variables in Global constatns, Color Types and Variables
  - Add two new variables with the same name.

This throws an exceptions:
Exception in thread "AWT-EventQueue-0" java.lang.NullPointerException
 at pipe.gui.widgets.ColoredWidgets.VariablesDialogPanel.onOK(VariablesDialogPanel.java:272)
 at pipe.gui.widgets.ColoredWidgets.VariablesDialogPanel.lambda$initComponents$0(VariablesDialogPanel.java:105)
 at java.desktop/javax.swing.AbstractButton.fireActionPerformed(AbstractButton.java:1967)
 at java.desktop/javax.swing.AbstractButton$Handler.actionPerformed(AbstractButton.java:2308)
 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:6631)
 at java.desktop/javax.swing.JComponent.processMouseEvent(JComponent.java:3342)
 at java.desktop/java.awt.Component.processEvent(Component.java:6396)
 at java.desktop/java.awt.Container.processEvent(Container.java:2263)
 at java.desktop/java.awt.Component.dispatchEventImpl(Component.java:5007)
 at java.desktop/java.awt.Container.dispatchEventImpl(Container.java:2321)
 at java.desktop/java.awt.Component.dispatchEvent(Component.java:4839)
 at java.desktop/java.awt.LightweightDispatcher.retargetMouseEvent(Container.java:4918)
 at java.desktop/java.awt.LightweightDispatcher.processMouseEvent(Container.java:4547)
 at java.desktop/java.awt.LightweightDispatcher.dispatchEvent(Container.java:4488)
 at java.desktop/java.awt.Container.dispatchEventImpl(Container.java:2307)
 at java.desktop/java.awt.Window.dispatchEventImpl(Window.java:2772)
 at java.desktop/java.awt.Component.dispatchEvent(Component.java:4839)
 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(Native Method)
 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(Native Method)
 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(Native Method)
 at java.desktop/java.awt.WaitDispatchSupport.enter(WaitDispatchSupport.java:233)
 at java.desktop/java.awt.Dialog.show(Dialog.java:1070)
 at java.desktop/java.awt.Component.show(Component.java:1716)
 at java.desktop/java.awt.Component.setVisible(Component.java:1663)
 at java.desktop/java.awt.Window.setVisible(Window.java:1031)
 at java.desktop/java.awt.Dialog.setVisible(Dialog.java:1005)
 at pipe.gui.widgets.ColoredWidgets.VariablesDialogPanel.showDialog(VariablesDialogPanel.java:89)
 at pipe.gui.widgets.ConstantsPane.showEditVariableDialog(ConstantsPane.java:694)
 at pipe.gui.widgets.ConstantsPane.lambda$addConstantsButtons$3(ConstantsPane.java:487)
 at java.desktop/javax.swing.AbstractButton.fireActionPerformed(AbstractButton.java:1967)
 at java.desktop/javax.swing.AbstractButton$Handler.actionPerformed(AbstractButton.java:2308)
 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.AWTEventMulticaster.mouseReleased(AWTEventMulticaster.java:297)
 at java.desktop/java.awt.Component.processMouseEvent(Component.java:6631)
 at java.desktop/javax.swing.JComponent.processMouseEvent(JComponent.java:3342)
 at java.desktop/java.awt.Component.processEvent(Component.java:6396)
 at java.desktop/java.awt.Container.processEvent(Container.java:2263)
 at java.desktop/java.awt.Component.dispatchEventImpl(Component.java:5007)
 at java.desktop/java.awt.Container.dispatchEventImpl(Container.java:2321)
 at java.desktop/java.awt.Component.dispatchEvent(Component.java:4839)
 at java.desktop/java.awt.LightweightDispatcher.retargetMouseEvent(Container.java:4918)
 at java.desktop/java.awt.LightweightDispatcher.processMouseEvent(Container.java:4547)
 at java.desktop/java.awt.LightweightDispatcher.dispatchEvent(Container.java:4488)
 at java.desktop/java.awt.Container.dispatchEventImpl(Container.java:2307)
 at java.desktop/java.awt.Window.dispatchEventImpl(Window.java:2772)
 at java.desktop/java.awt.Component.dispatchEvent(Component.java:4839)
 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(Native Method)
 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(Native Method)
 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)

Related branches

Changed in tapaal:
status: New → Confirmed
importance: Undecided → Critical
Changed in tapaal:
assignee: nobody → Peter Haahr Taankvist (ptaank)
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.