#31 Impossible to save a graph containing inhibitor arcs

closed-fixed
Conner Hansen
5
2012-04-28
2010-12-03
abraham
No

When saving a file containing at least one inhibitor arc, I get the following error message in a MessageBok :
java.lang.IndexOutOfBoundException: Index:0, Size: 0

The trace in the console is the following :

java.lang.IndexOutOfBoundsException: Index: 0, Size: 0
java.lang.IndexOutOfBoundsException: Index: 0, Size: 0
at java.util.LinkedList.entry(Unknown Source)
at java.util.LinkedList.get(Unknown Source)
at pipe.common.dataLayer.DataLayerWriter.createArcElement(DataLayerWriter.java:364)
at pipe.common.dataLayer.DataLayerWriter.savePNML(DataLayerWriter.java:133)
at pipe.gui.GuiFrame.saveNet(GuiFrame.java:834)
at pipe.gui.GuiFrame.saveOperation(GuiFrame.java:814)
at pipe.gui.GuiFrame$FileAction.actionPerformed(GuiFrame.java:1806)
at javax.swing.AbstractButton.fireActionPerformed(Unknown Source)
at javax.swing.AbstractButton$Handler.actionPerformed(Unknown Source)
at javax.swing.DefaultButtonModel.fireActionPerformed(Unknown Source)
at javax.swing.DefaultButtonModel.setPressed(Unknown Source)
at javax.swing.AbstractButton.doClick(Unknown Source)
at javax.swing.plaf.basic.BasicMenuItemUI.doClick(Unknown Source)
at javax.swing.plaf.basic.BasicMenuItemUI$Handler.mouseReleased(Unknown Source)
at java.awt.AWTEventMulticaster.mouseReleased(Unknown Source)
at java.awt.Component.processMouseEvent(Unknown Source)
at javax.swing.JComponent.processMouseEvent(Unknown Source)
at java.awt.Component.processEvent(Unknown Source)
at java.awt.Container.processEvent(Unknown Source)
at java.awt.Component.dispatchEventImpl(Unknown Source)
at java.awt.Container.dispatchEventImpl(Unknown Source)
at java.awt.Component.dispatchEvent(Unknown Source)
at java.awt.LightweightDispatcher.retargetMouseEvent(Unknown Source)
at java.awt.LightweightDispatcher.processMouseEvent(Unknown Source)
at java.awt.LightweightDispatcher.dispatchEvent(Unknown Source)
at java.awt.Container.dispatchEventImpl(Unknown Source)
at java.awt.Window.dispatchEventImpl(Unknown Source)
at java.awt.Component.dispatchEvent(Unknown Source)
at java.awt.EventQueue.dispatchEvent(Unknown Source)
at java.awt.EventDispatchThread.pumpOneEventForFilters(Unknown Source)
at java.awt.EventDispatchThread.pumpEventsForFilter(Unknown Source)
at java.awt.EventDispatchThread.pumpEventsForHierarchy(Unknown Source)
at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
at java.awt.EventDispatchThread.run(Unknown Source)

Discussion

  • This bug is still present in Pipev4, 30/09/2011

     
  • BOakes
    BOakes
    2012-02-02

    I have a fix for this bug.
    In PIPEv4_src/src/pipe/utilities/writers/PNMLWriter.java, line 378:

    Change the code to:
    String weightOutput = "";
    for(int i = 0; i < weightInput.size(); i++)
    {
    if (i != 0)
    weightOutput += ",";
    weightOutput += weightInput.get(i).getToken().getID() + "," + weightInput.get(i).getCurrentMarking();
    }
    to avoid the null pointer.

    I would change the code myself, but I don't know how.

     
  • Conner Hansen
    Conner Hansen
    2012-04-28

    • assigned_to: nobody --> connerh
    • status: open --> closed-fixed
     
  • Conner Hansen
    Conner Hansen
    2012-04-28

    Fixed in v4.1.