fmorbini / scxmlgui

A graphical user interface for editing SCXML finite state machines.
Other
105 stars 37 forks source link

NullPointerException while opening edge editor #49

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. Try to open the editor on an edge.

What is the expected output? What do you see instead?
 Expected: editor window showing up
 Actual result: "Error while opening edge editor." log message on stdout

What version of the product are you using? On what operating system?
rev 164 with state restrictions

Please provide any additional information below.

Seems like after some event that I cannot yet reproduce (but is happening quite 
often), all the edges become uneditable and produce this exception. Deleting 
the edge and redrawing it makes the new edge editable, but the other older ones 
still produce this error.
I modified the original log message to include the cause as well, this is the 
offending line and the stack trace:

 SCXMLEdgeEditor.java:129:
 sourceNode = (SCXMLNode) editor.getGraphComponent().getSCXMLNodeForID(edge.getSCXMLSource()).getValue();

Error while opening edge editor: null
java.lang.NullPointerException
        at com.mxgraph.examples.swing.editor.scxml.eleditor.SCXMLEdgeEditor.<init>(SCXMLEdgeEditor.java:129)
        at com.mxgraph.examples.swing.SCXMLGraphEditor.openElementEditorFor(SCXMLGraphEditor.java:1564)
        at com.mxgraph.examples.swing.SCXMLGraphEditor.showElementEditor(SCXMLGraphEditor.java:720)
        at com.mxgraph.examples.swing.SCXMLGraphEditor$11.mouseClicked(SCXMLGraphEditor.java:825)
        at java.awt.AWTEventMulticaster.mouseClicked(AWTEventMulticaster.java:270)
        at java.awt.Component.processMouseEvent(Component.java:6392)
        at javax.swing.JComponent.processMouseEvent(JComponent.java:3268)
        at java.awt.Component.processEvent(Component.java:6154)
        at java.awt.Container.processEvent(Container.java:2045)
        at java.awt.Component.dispatchEventImpl(Component.java:4750)
        at java.awt.Container.dispatchEventImpl(Container.java:2103)
        at java.awt.Component.dispatchEvent(Component.java:4576)
        at com.mxgraph.swing.mxGraphComponent$mxMouseRedirector.mouseClicked(mxGraphComponent.java:4113)
        at java.awt.AWTEventMulticaster.mouseClicked(AWTEventMulticaster.java:269)
        at java.awt.Component.processMouseEvent(Component.java:6392)
        at javax.swing.JComponent.processMouseEvent(JComponent.java:3268)
        at java.awt.Component.processEvent(Component.java:6154)
        at java.awt.Container.processEvent(Container.java:2045)
        at java.awt.Component.dispatchEventImpl(Component.java:4750)
        at java.awt.Container.dispatchEventImpl(Container.java:2103)
        at java.awt.Component.dispatchEvent(Component.java:4576)
        at java.awt.LightweightDispatcher.retargetMouseEvent(Container.java:4633)
        at java.awt.LightweightDispatcher.processMouseEvent(Container.java:4306)
        at java.awt.LightweightDispatcher.dispatchEvent(Container.java:4227)
        at java.awt.Container.dispatchEventImpl(Container.java:2089)
        at java.awt.Window.dispatchEventImpl(Window.java:2518)
        at java.awt.Component.dispatchEvent(Component.java:4576)
        at java.awt.EventQueue.dispatchEventImpl(EventQueue.java:672)
        at java.awt.EventQueue.access$400(EventQueue.java:96)
        at java.awt.EventQueue$2.run(EventQueue.java:631)
        at java.awt.EventQueue$2.run(EventQueue.java:629)
        at java.security.AccessController.doPrivileged(Native Method)
        at java.security.AccessControlContext$1.doIntersectionPrivilege(AccessControlContext.java:105)
        at java.security.AccessControlContext$1.doIntersectionPrivilege(AccessControlContext.java:116)
        at java.awt.EventQueue$3.run(EventQueue.java:645)
        at java.awt.EventQueue$3.run(EventQueue.java:643)
        at java.security.AccessController.doPrivileged(Native Method)
        at java.security.AccessControlContext$1.doIntersectionPrivilege(AccessControlContext.java:105)
        at java.awt.EventQueue.dispatchEvent(EventQueue.java:642)
        at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:275)
        at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:200)
        at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:190)
        at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:185)
        at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:177)
        at java.awt.EventDispatchThread.run(EventDispatchThread.java:138)

Original issue reported on code.google.com by tamas.gy...@gmail.com on 30 Nov 2012 at 9:22

GoogleCodeExporter commented 9 years ago
keep us posted if you can nail down what the events causing it are.
It would be nice to have some kind of deterministic procedure that we can use 
to reproduce the error and debug it.

If you have a chance please revert to an older version like r144 to see if you 
can get the same problem to occur in that older release.

thanks

Original comment by fmorbini on 30 Nov 2012 at 2:57