Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-8262725

IGV: crash when removing all graphs in a group

    XMLWordPrintable

Details

    • b19

    Description

      Ideal Graph Visualizer throws the following exception error when a graph is displayed and all graphs in its group (including the displayed one) are removed (see screenshot attached):

      java.lang.ArrayIndexOutOfBoundsException: -1
      at java.util.ArrayList.elementData(ArrayList.java:424)
      at java.util.ArrayList.get(ArrayList.java:437)
      at com.sun.hotspot.igv.view.DiagramViewModel.getFirstGraph(DiagramViewModel.java:378)
      at com.sun.hotspot.igv.view.DiagramViewModel.getGraphToView(DiagramViewModel.java:421)
      at com.sun.hotspot.igv.view.DiagramViewModel.getDiagramToView(DiagramViewModel.java:404)
      at com.sun.hotspot.igv.view.DiagramScene.update(DiagramScene.java:516)
      at com.sun.hotspot.igv.view.DiagramScene.access$900(DiagramScene.java:70)
      at com.sun.hotspot.igv.view.DiagramScene$9.changed(DiagramScene.java:1250)
      at com.sun.hotspot.igv.view.DiagramScene$9.changed(DiagramScene.java:1245)
      at com.sun.hotspot.igv.data.ChangedEvent.fire(ChangedEvent.java:44)
      at com.sun.hotspot.igv.data.ChangedEvent.fire(ChangedEvent.java:31)
      at com.sun.hotspot.igv.data.Event.fire(Event.java:60)
      at com.sun.hotspot.igv.view.DiagramViewModel.diagramChanged(DiagramViewModel.java:343)
      at com.sun.hotspot.igv.view.DiagramViewModel.changed(DiagramViewModel.java:434)
      at com.sun.hotspot.igv.view.DiagramViewModel.changed(DiagramViewModel.java:42)
      at com.sun.hotspot.igv.data.ChangedEvent.fire(ChangedEvent.java:44)
      at com.sun.hotspot.igv.data.ChangedEvent.fire(ChangedEvent.java:31)
      at com.sun.hotspot.igv.data.Event.fire(Event.java:60)
      at com.sun.hotspot.igv.util.RangeSliderModel.setPositions(RangeSliderModel.java:81)
      at com.sun.hotspot.igv.view.DiagramViewModel.filterGraphs(DiagramViewModel.java:373)
      at com.sun.hotspot.igv.view.DiagramViewModel.access$300(DiagramViewModel.java:42)
      at com.sun.hotspot.igv.view.DiagramViewModel$3.changed(DiagramViewModel.java:209)
      at com.sun.hotspot.igv.view.DiagramViewModel$3.changed(DiagramViewModel.java:204)
      at com.sun.hotspot.igv.data.ChangedEvent.fire(ChangedEvent.java:44)
      at com.sun.hotspot.igv.data.ChangedEvent.fire(ChangedEvent.java:31)
      at com.sun.hotspot.igv.data.Event.fire(Event.java:60)
      at com.sun.hotspot.igv.data.Group.removeElement(Group.java:168)
      at com.sun.hotspot.igv.coordinator.actions.GraphRemoveCookie.remove(GraphRemoveCookie.java:37)
      at com.sun.hotspot.igv.coordinator.actions.RemoveAction.performAction(RemoveAction.java:44)
      at org.openide.util.actions.NodeAction.performAction(NodeAction.java:295)
      at org.openide.util.actions.CallableSystemAction$1.run(CallableSystemAction.java:129)
      at org.openide.util.actions.ActionInvoker$1.run(ActionInvoker.java:95)
      at org.openide.util.actions.ActionInvoker.doPerformAction(ActionInvoker.java:116)
      at org.openide.util.actions.ActionInvoker.invokeAction(ActionInvoker.java:99)
      at org.openide.util.actions.CallableSystemAction.actionPerformed(CallableSystemAction.java:126)
      at org.openide.util.actions.NodeAction.actionPerformed(NodeAction.java:283)
      at javax.swing.AbstractButton.fireActionPerformed(AbstractButton.java:2022)
      at javax.swing.AbstractButton$Handler.actionPerformed(AbstractButton.java:2348)
      at javax.swing.DefaultButtonModel.fireActionPerformed(DefaultButtonModel.java:402)
      at javax.swing.DefaultButtonModel.setPressed(DefaultButtonModel.java:259)
      at javax.swing.AbstractButton.doClick(AbstractButton.java:376)
      at javax.swing.plaf.basic.BasicMenuItemUI.doClick(BasicMenuItemUI.java:842)
      at javax.swing.plaf.basic.BasicMenuItemUI$Handler.mouseReleased(BasicMenuItemUI.java:886)
      at java.awt.Component.processMouseEvent(Component.java:6539)
      at javax.swing.JComponent.processMouseEvent(JComponent.java:3324)
      at java.awt.Component.processEvent(Component.java:6304)
      at java.awt.Container.processEvent(Container.java:2239)
      at java.awt.Component.dispatchEventImpl(Component.java:4889)
      at java.awt.Container.dispatchEventImpl(Container.java:2297)
      at java.awt.Component.dispatchEvent(Component.java:4711)
      at java.awt.LightweightDispatcher.retargetMouseEvent(Container.java:4904)
      at java.awt.LightweightDispatcher.processMouseEvent(Container.java:4535)
      at java.awt.LightweightDispatcher.dispatchEvent(Container.java:4476)
      at java.awt.Container.dispatchEventImpl(Container.java:2283)
      at java.awt.Window.dispatchEventImpl(Window.java:2746)
      at java.awt.Component.dispatchEvent(Component.java:4711)
      at java.awt.EventQueue.dispatchEventImpl(EventQueue.java:760)
      at java.awt.EventQueue.access$500(EventQueue.java:97)
      at java.awt.EventQueue$3.run(EventQueue.java:709)
      at java.awt.EventQueue$3.run(EventQueue.java:703)
      at java.security.AccessController.doPrivileged(Native Method)
      at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:74)
      at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:84)
      at java.awt.EventQueue$4.run(EventQueue.java:733)
      at java.awt.EventQueue$4.run(EventQueue.java:731)
      at java.security.AccessController.doPrivileged(Native Method)
      at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:74)
      at java.awt.EventQueue.dispatchEvent(EventQueue.java:730)
      at org.netbeans.core.TimableEventQueue.dispatchEvent(TimableEventQueue.java:159)
      [catch] at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:205)
      at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:116)
      at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:105)
      at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:101)
      at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:93)
      at java.awt.EventDispatchThread.run(EventDispatchThread.java:82)

      STEPS TO REPRODUCE IT:

      1. $ cd src/utils/IdealGraphVisualizer
      2. $ mvn install
      3. $ sh igv.sh
      4. $ java -XX:PrintIdealGraphLevel=1
      5. In the "Outline" window group, expand group "virtual void java.lang.Object.<init>()" and double-click on "After Parsing"
      6. In the "Outline" window group, select all graphs from the expanded group "virtual void java.lang.Object.<init>()"
      7. Go to File -> Remove selected graphs and groups
      8. The exception is triggered

      Attachments

        Issue Links

          Activity

            People

              rcastanedalo Roberto Castaneda Lozano
              rcastanedalo Roberto Castaneda Lozano
              Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: