mt5225 / scxmlgui

Automatically exported from code.google.com/p/scxmlgui
0 stars 0 forks source link

java.lang.NullPointerException on loading scxml file #20

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1.Load the attached scxml file

What is the expected output? What do you see instead?

Parsing file: 
D:\Work\Phd\RoboGen\src\eclipseworkspace\RoboGenEditor\xml\OutputXML.scxml
add edge: ready->[800]
add edge: ready->[1000]
add edge: ready->[100]
add edge: 100->[1000]
add edge: 100->[110]
add edge: 100->[110]
add edge: 110->[300]
add edge: 110->[0]
add edge: 110->[210]
add edge: 110->[220]
add edge: 110->[230]
add edge: 110->[300]
add edge: 110->[1000]
add edge: 210->[400]
add edge: 220->[400]
add edge: 230->[400]
add edge: 400->[2000]
add edge: 400->[4000]
add edge: 400->[1000]
add edge: 400->[3000]
add edge: 1000->[2100]
add edge: 1000->[2200]
add edge: 1000->[1000]
add edge: 3000->[1000]
add edge: 3000->[3000]
add edge: 4000->[4300]
add edge: 4000->[4200]
add edge: 4000->[4100]
add edge: 4000->[1000]
add edge: 4000->[3000]
add edge: 4100->[1000]
add edge: 4100->[4110]
add edge: 4110->[1000]
add edge: 4110->[4140]
add edge: 4110->[4120]
add edge: 4120->[1000]
add edge: 4120->[4140]
add edge: 4120->[4130]
add edge: 4130->[1000]
add edge: 4130->[4140]
add edge: 4140->[1000]
add edge: 4140->[4145]
add edge: 4140->[4140]
add edge: 4145->[4150]
add edge: 4150->[1000]
add edge: 4150->[4160]
add edge: 4160->[1000]
add edge: 4160->[4170]
add edge: 4170->[1000]
add edge: 4170->[4180]
add edge: 4170->[4190]
add edge: 4180->[1000]
add edge: 4200->[4210]
add edge: 4200->[1000]
add edge: 4200->[4200]
add edge: 4210->[4220]
add edge: 4210->[4220]
add edge: 4220->[4230]
add edge: 4220->[4240]
add edge: 4240->[1000]
add edge: 4300->[4310]
add edge: 4300->[1000]
add edge: 4310->[4320]
add edge: 4320->[1000]
add edge: 4320->[4330]
add edge: 4320->[4340]
add edge: 4330->[800]
add edge: 4330->[1000]
Done reading file
Populating graph.
java.lang.NullPointerException
    at com.mxgraph.examples.swing.editor.fileimportexport.SCXMLImportExport.addOrUpdateEdge(SCXMLImportExport.java:485)
    at com.mxgraph.examples.swing.editor.fileimportexport.SCXMLImportExport.populateGraph(SCXMLImportExport.java:470)
    at com.mxgraph.examples.swing.editor.fileimportexport.SCXMLImportExport.readInGraph(SCXMLImportExport.java:398)
    at com.mxgraph.examples.swing.editor.fileimportexport.SCXMLImportExport.read(SCXMLImportExport.java:424)
    at com.mxgraph.examples.swing.editor.fileimportexport.ImportExportPicker.read(ImportExportPicker.java:123)
    at com.mxgraph.examples.swing.editor.scxml.SCXMLEditorActions$OpenAction.openSelectedFile(SCXMLEditorActions.java:727)
    at com.mxgraph.examples.swing.editor.scxml.SCXMLEditorActions$OpenAction.actionPerformed(SCXMLEditorActions.java:712)
    at com.mxgraph.examples.swing.editor.utils.AbstractActionWrapper.actionPerformed(AbstractActionWrapper.java:29)
    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.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)

What version of the product are you using? On what operating system?
Windows 7 64 bit 

Please provide any additional information below.

Original issue reported on code.google.com by work.cha...@gmail.com on 19 Jan 2011 at 6:21

Attachments:

GoogleCodeExporter commented 9 years ago

Original comment by fmorbini on 19 Jan 2011 at 3:58

GoogleCodeExporter commented 9 years ago
Hi, the problem seems to be caused by an incorrect input file. In the input 
file, node 800 is not defined. I improved the code to give a more informative 
error message.

Original comment by fmorbini on 19 Jan 2011 at 4:17