]
Ronald van Kuijk closed GPD-186.
--------------------------------
Resolution: Out of Date
as requested by the original submitter
ArrayIndexOutOfBoundsException when adding second incoming transition
to a node
-------------------------------------------------------------------------------
Key: GPD-186
URL:
http://jira.jboss.com/jira/browse/GPD-186
Project: JBoss jBPM GPD
Issue Type: Bug
Components: jpdl
Environment: Windows 2000, Eclipse 3.3.1.1, GEF 3.3.1
(org.eclipse.gef_3.2.101.v20070814.jar)
Reporter: Matthias Hanisch
Assigned To: Koen Aers
The fixes in issue 169 seem to help to some extent, but they seem to introduce another
problem:
When I add a second incoming transition to a node I get the following exception in Error
Log View:
java.lang.IndexOutOfBoundsException: Index: 1, Size: 0
at java.util.ArrayList.add(ArrayList.java:368)
at
org.eclipse.gef.editparts.AbstractGraphicalEditPart.primAddTargetConnection(AbstractGraphicalEditPart.java:532)
at
org.eclipse.gef.editparts.AbstractGraphicalEditPart.addTargetConnection(AbstractGraphicalEditPart.java:265)
at
org.eclipse.gef.editparts.AbstractGraphicalEditPart.refreshTargetConnections(AbstractGraphicalEditPart.java:667)
at
org.jbpm.gd.common.part.AbstractNodeGraphicalEditPart.propertyChange(AbstractNodeGraphicalEditPart.java:62)
at java.beans.PropertyChangeSupport.firePropertyChange(PropertyChangeSupport.java:333)
at java.beans.PropertyChangeSupport.firePropertyChange(PropertyChangeSupport.java:270)
at
org.jbpm.gd.common.notation.AbstractNotationElement.firePropertyChange(AbstractNotationElement.java:32)
at org.jbpm.gd.common.notation.Node.addArrivingEdge(Node.java:47)
at org.jbpm.gd.jpdl.notation.JpdlNode.propertyChange(JpdlNode.java:39)
at java.beans.PropertyChangeSupport.firePropertyChange(PropertyChangeSupport.java:333)
at java.beans.PropertyChangeSupport.firePropertyChange(PropertyChangeSupport.java:270)
at
org.jbpm.gd.common.model.AbstractSemanticElement.firePropertyChange(AbstractSemanticElement.java:20)
at org.jbpm.gd.jpdl.model.AbstractNode.addTransition(AbstractNode.java:56)
at org.jbpm.gd.jpdl.command.EdgeCreateCommand.execute(EdgeCreateCommand.java:40)
at org.eclipse.gef.commands.CommandStack.execute(CommandStack.java:149)
at org.eclipse.gef.tools.AbstractTool.executeCommand(AbstractTool.java:388)
at org.eclipse.gef.tools.AbstractTool.executeCurrentCommand(AbstractTool.java:400)
at
org.eclipse.gef.tools.AbstractConnectionCreationTool.handleCreateConnection(AbstractConnectionCreationTool.java:241)
at
org.eclipse.gef.tools.ConnectionCreationTool.handleButtonDown(ConnectionCreationTool.java:73)
at org.eclipse.gef.tools.AbstractTool.mouseDown(AbstractTool.java:964)
at org.eclipse.gef.EditDomain.mouseDown(EditDomain.java:215)
at
org.eclipse.gef.ui.parts.DomainEventDispatcher.dispatchMousePressed(DomainEventDispatcher.java:342)
at
org.eclipse.draw2d.LightweightSystem$EventHandler.mouseDown(LightweightSystem.java:513)
at org.eclipse.swt.widgets.TypedListener.handleEvent(TypedListener.java:178)
at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:66)
at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:938)
at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:3682)
at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3293)
at org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.java:2389)
at org.eclipse.ui.internal.Workbench.runUI(Workbench.java:2353)
at org.eclipse.ui.internal.Workbench.access$4(Workbench.java:2219)
at org.eclipse.ui.internal.Workbench$4.run(Workbench.java:466)
at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:289)
at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:461)
at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:149)
at org.eclipse.ui.internal.ide.application.IDEApplication.start(IDEApplication.java:106)
at org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:169)
at
org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:106)
at
org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:76)
at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:363)
at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:176)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:585)
at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:508)
at org.eclipse.equinox.launcher.Main.basicRun(Main.java:447)
at org.eclipse.equinox.launcher.Main.run(Main.java:1173)
at org.eclipse.equinox.launcher.Main.main(Main.java:1148)
Look in AbstractGraphicalEditPart.addTargetConnection():
If connection.getTarget() == this, then the connection is added at first, and then
removed again.
When it is then called the second time, we create an IndexOutOfBounds, because it tries
to add the connection at the second position.
The root cause seems to be the changes from 1.1 to 1.2 in
EdgeGraphicalEditPart.propertyChange.
Here the target of the connection is set and later
AbstractGraphicalEditPart.addTargetConnection() is called, which has no effect then.
Sorry, all I can say, that removing this "else if" does not cause any
exceptions, but probably it also disables a fix. My knowledge in these areas is too poor
to a give a concrete solution, but maybe it helps you to track this. If you need further
information just ask.
Again, a more detailed description how I reproduced it:
Open a new process definition, add a start, an end and a task node.
Create a transition from start to end, then from task to end -> exception above.
Commenting the handling of "target" in EdgeGraphicalEditPart.propertyChange()
(in my tree lines 117-119) cures that, but may reopen the issue 169.
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: