Community
Participate
Working Groups
Hi! In the traces tab of the "Configure Graph Settings" dialog an ArrayIndexOutOfBoundsException can be provoked by doing the following: 1. have an empty drop down for the "Y-Axis" selection 2. click on the "Y-Axis" drop down so the selection box is opened 3. DO NOT select something and also DO NOT close the selection box 4. click directly on "Apply" (two times) -> Results in the ArrayIndexOutOfBoundsException (detailed stack trace see below) which comes every time you click on "Apply" from now on. I analyzed this and found the problem in org.eclipse.nebula.visualization.internal.xygraph.toolbar.TraceConfigPage.applyChanges() Here the code at the beginning...: trace.setXAxis(xyGraph.getXAxisList().get(xAxisCombo.getSelectionIndex())); trace.setYAxis(xyGraph.getYAxisList().get(yAxisCombo.getSelectionIndex())); ...wants to read from the axis list without checking the selection index which is returned by the combo control. I would suggest to check the index to be >=0 so the exception can be avoided. Best Regards Michael Kagel Stack trace: !MESSAGE Unhandled event loop exception !STACK 0 java.lang.ArrayIndexOutOfBoundsException: -1 at java.util.ArrayList.elementData(ArrayList.java:418) at java.util.ArrayList.get(ArrayList.java:431) at org.eclipse.nebula.visualization.internal.xygraph.toolbar.TraceConfigPage.applyChanges(TraceConfigPage.java:281) at org.eclipse.nebula.visualization.internal.xygraph.toolbar.XYGraphConfigDialog.applyChanges(XYGraphConfigDialog.java:261) at org.eclipse.nebula.visualization.internal.xygraph.toolbar.XYGraphConfigDialog.access$3(XYGraphConfigDialog.java:255) at org.eclipse.nebula.visualization.internal.xygraph.toolbar.XYGraphConfigDialog$4.widgetSelected(XYGraphConfigDialog.java:236) at org.eclipse.swt.widgets.TypedListener.handleEvent(TypedListener.java:248) at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:84) at org.eclipse.swt.widgets.Display.sendEvent(Display.java:4362) at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1113) at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:4180) at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3769) at org.eclipse.jface.window.Window.runEventLoop(Window.java:827) at org.eclipse.jface.window.Window.open(Window.java:803) at org.eclipse.nebula.visualization.xygraph.figures.XYGraphToolbar$1.actionPerformed(XYGraphToolbar.java:80) at org.eclipse.draw2d.Clickable.fireActionPerformed(Clickable.java:206) at org.eclipse.draw2d.Clickable$1.actionPerformed(Clickable.java:175) at org.eclipse.draw2d.ButtonModel.fireActionPerformed(ButtonModel.java:140) at org.eclipse.draw2d.ButtonModel$DefaultFiringBehavior.released(ButtonModel.java:506) at org.eclipse.draw2d.ButtonModel.fireReleased(ButtonModel.java:179) at org.eclipse.draw2d.ButtonModel.setPressed(ButtonModel.java:466) at org.eclipse.draw2d.ClickableEventHandler.mouseReleased(ClickableEventHandler.java:92) at org.eclipse.draw2d.Figure.handleMouseReleased(Figure.java:947) at org.eclipse.draw2d.SWTEventDispatcher.dispatchMouseReleased(SWTEventDispatcher.java:267) at org.eclipse.draw2d.LightweightSystem$EventHandler.mouseUp(LightweightSystem.java:548) at org.eclipse.swt.widgets.TypedListener.handleEvent(TypedListener.java:220)
https://github.com/eclipse/nebula/pull/90
Bug fixed in release 2.2.0