Opened 16 years ago
Closed 16 years ago
#2954 closed defect (fixed)
[PATCH] Creating new relations doesn't work
Reported by: | Landwirt | Owned by: | team |
---|---|---|---|
Priority: | critical | Milestone: | |
Component: | Core | Version: | latest |
Keywords: | Cc: | Gubaer |
Description
In revision 1797 clicking on "Create a new relation" results in a crash:
Path: trunk
URL: http://josm.openstreetmap.de/svn/trunk
Repository Root: http://josm.openstreetmap.de/svn
Repository UUID: 0c6e7542-c601-0410-84e7-c038aed88b3b
Revision: 1797
Node Kind: directory
Last Changed Author: framm
Last Changed Rev: 1797
Last Changed Date: 2009-07-16 00:41:38 +0200 (Thu, 16 Jul 2009)
Memory Usage: 1016 MB / 1016 MB (965 MB allocated, but free)
Java version: 1.6.0_14
Plugins: DirectUploadIntersect_wayPicLayerbuildings_toolscircletoolcolorschemeopenstreetbugsopenvisibleplastic_lafremotecontrolterracerutilspluginvalidatorwmsplugin
Plugin plastic_laf Version: 14016
Plugin DirectUpload Version: 15828
Plugin Intersect_way Version: 12781
Plugin PicLayer Version: 16302
Plugin buildings_tools Version: 19
Plugin circletool Version: ${version.entry.commit.revision}
Plugin colorscheme Version: 16383
Plugin openstreetbugs Version: 16294
Plugin openvisible Version: 15707
Plugin remotecontrol Version: 16290
Plugin terracer Version: 16162
Plugin utilsplugin Version: 16290
Plugin validator Version: 16439
Plugin wmsplugin Version: 16442
java.lang.NullPointerException
at org.openstreetmap.josm.data.osm.OsmPrimitive.cloneFrom(OsmPrimitive.java:275)
at org.openstreetmap.josm.data.osm.Relation.cloneFrom(Relation.java:57)
at org.openstreetmap.josm.data.osm.Relation.<init>(Relation.java:38)
at org.openstreetmap.josm.gui.dialogs.relation.RelationEditor.<init>(RelationEditor.java:104)
at org.openstreetmap.josm.gui.dialogs.relation.GenericRelationEditor.<init>(GenericRelationEditor.java:110)
at org.openstreetmap.josm.gui.dialogs.relation.RelationEditor.getEditor(RelationEditor.java:84)
at org.openstreetmap.josm.gui.dialogs.RelationListDialog$2.actionPerformed(RelationListDialog.java:91)
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.plaf.basic.BasicButtonListener.mouseReleased(Unknown Source)
at java.awt.AWTEventMulticaster.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)
Attachments (1)
Change History (4)
comment:1 by , 16 years ago
Priority: | major → critical |
---|---|
Summary: | Creating new relations doesn't work → [PATCH] Creating new relations doesn't work |
by , 16 years ago
Attachment: | relation.patch added |
---|
There is always a snapshot of the last Relation created. Even if a new relation has to be created. There are to possible ways: Allow null as argument to the constructor or not. I have choose the last way and write a Unit Test.
Saving of Relation was also not possible because a null value was cloned. There is also a bug in listSelectionModel: This is used if it is still null. As a workaround I call getSelectionModel() before each usage. This has to be checked.
With the applied patch I successfully create a new relation and save it.