Array index out of range

Bug #2006993 reported by Jiri Srba
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
TAPAAL
Fix Committed
Undecided
Kenneth Yrke Jørgensen

Bug Description

Open the attached net in the cpn branch.
Create a new variable f of type floor and a new variable d of type direction.
Then press cmd-S to save the net and an exception
"Array index out of range: 0"
is raised.

Revision history for this message
Jiri Srba (srba) wrote :
Revision history for this message
Jiri Srba (srba) wrote :

It is actually enough to make just the f variable and the bug already appears.

Revision history for this message
Jiri Srba (srba) wrote :

In fact the net cannot be save at all after opening

Revision history for this message
Jiri Srba (srba) wrote :

Here is another problem, just open the net, go to variables and double click on the variable s. It will say:

Exception in thread "AWT-EventQueue-0" java.lang.IllegalArgumentException: setSelectedIndex: 4 out of bounds
        at java.desktop/javax.swing.JComboBox.setSelectedIndex(JComboBox.java:652)
        at net.tapaal.gui.petrinet.editor.VariablesDialogPanel.createColorTypesComboBox(VariablesDialogPanel.java:191)
        at net.tapaal.gui.petrinet.editor.VariablesDialogPanel.initComponents(VariablesDialogPanel.java:89)
        at net.tapaal.gui.petrinet.editor.VariablesDialogPanel.<init>(VariablesDialogPanel.java:62)
        at net.tapaal.gui.petrinet.editor.ConstantsPane.showEditVariableDialog(ConstantsPane.java:645)
        at net.tapaal.gui.petrinet.editor.ConstantsPane$2.mouseClicked(ConstantsPane.java:152)
        at java.desktop/java.awt.AWTEventMulticaster.mouseClicked(AWTEventMulticaster.java:278)
        at java.desktop/java.awt.AWTEventMulticaster.mouseClicked(AWTEventMulticaster.java:277)

Revision history for this message
Kenneth Yrke Jørgensen (yrke) wrote :

cpn2 net seems to be missing color information in XML, leading to not be loaded correctly and can therefor not be saved.

cpn4 seems to be an issue with calculating the indexes of variables color types, it should not count dot and product colors. It will work as long as all "non"-product colors are placed in the beginning of the list.

Changed in tapaal:
assignee: nobody → Kenneth Yrke Jørgensen (yrke)
status: New → In Progress
Jiri Srba (srba)
Changed in tapaal:
status: In Progress → 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.