#4009 closed defect (fixed)
New relation does not show up in relation editor
Reported by: | Nakor | Owned by: | team |
---|---|---|---|
Priority: | major | Milestone: | |
Component: | Core | Version: | |
Keywords: | Cc: |
Description
In r2495:
If you create a new relation, the relation window is blank.
If you save the file, close and re-open, the relation is there.
Attachments (0)
Change History (8)
comment:1 by , 15 years ago
comment:3 by , 15 years ago
Well no it changed, I got an execption.
Scenario is File -> new, create new relation, set on etage to be ref (with no value), click OK:
Repository Root: http://josm.openstreetmap.de/svn
Build-Date: 2009-11-22 02:32:07
Last Changed Author: stoecker
Revision: 2495
Repository UUID: 0c6e7542-c601-0410-84e7-c038aed88b3b
URL: http://josm.openstreetmap.de/svn/trunk
Last Changed Date: 2009-11-21 23:03:24 +0100 (Sat, 21 Nov 2009)
Last Changed Rev: 2495
Memory Usage: 588 MB / 1333 MB (332 MB allocated, but free)
Java version: 1.6.0_16
Plugins: DirectUpload
PicLayer
editgpx
graphview
measurement
michigan_left
openstreetbugs
remotecontrol
routing
tageditor
utilsplugin
validator
waydownloader
wmsplugin
Plugin DirectUpload Version: 17532
Plugin PicLayer Version: 18597
Plugin editgpx Version: 18595
Plugin graphview Version: 18593
Plugin measurement Version: 18595
Plugin michigan_left Version: 18084
Plugin openstreetbugs Version: 18595
Plugin remotecontrol Version: 18678
Plugin routing Version: 18597
Plugin tageditor Version: 18700
Plugin utilsplugin Version: 18621
Plugin validator Version: 18623
Plugin waydownloader Version: 18617
Plugin wmsplugin Version: 18712
java.lang.NullPointerException
at org.openstreetmap.josm.gui.dialogs.RelationListDialog$RelationListModel.addRelations(RelationListDialog.java:569)
at org.openstreetmap.josm.gui.dialogs.RelationListDialog$1.run(RelationListDialog.java:730)
at org.openstreetmap.josm.gui.dialogs.RelationListDialog.primtivesAdded(RelationListDialog.java:734)
at org.openstreetmap.josm.data.osm.DataSet.firePrimitivesAdded(DataSet.java:800)
at org.openstreetmap.josm.data.osm.DataSet.addPrimitive(DataSet.java:193)
at org.openstreetmap.josm.command.AddCommand.executeCommand(AddCommand.java:51)
at org.openstreetmap.josm.data.UndoRedoHandler.addNoRedraw(UndoRedoHandler.java:39)
at org.openstreetmap.josm.data.UndoRedoHandler.add(UndoRedoHandler.java:59)
at org.openstreetmap.josm.gui.dialogs.relation.GenericRelationEditor$SavingAction.applyNewRelation(GenericRelationEditor.java:1005)
at org.openstreetmap.josm.gui.dialogs.relation.GenericRelationEditor$OKAction.run(GenericRelationEditor.java:1139)
at org.openstreetmap.josm.gui.dialogs.relation.GenericRelationEditor$OKAction.actionPerformed(GenericRelationEditor.java:1159)
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)
follow-up: 6 comment:4 by , 15 years ago
I don't get the exception but I have no idea why RelationListModel.relations should ever be null. I'll change it to be always the same list, empty if the list of relations is empty.
comment:5 by , 15 years ago
Resolution: | → fixed |
---|---|
Status: | new → closed |
follow-up: 7 comment:6 by , 15 years ago
comment:7 by , 15 years ago
Replying to Gubaer:
Replying to jttt:
... RelationListModel.relations should ever be null
It wasn't properly initialized and it could have been null after a setRelations()
I know. What I meant was I didn't know why was the null value allowed. I would make it just:
private final List<Relation> relations = new ArrayList<Relation>();
I can't reproduce it. What exactly are doing?