Modify

Opened 15 years ago

Closed 15 years ago

Last modified 15 years ago

#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 jttt, 15 years ago

I can't reproduce it. What exactly are doing?

comment:2 by Gubaer, 15 years ago

Can't reproduce either.

comment:3 by Nakor, 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)

comment:4 by jttt, 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 Gubaer, 15 years ago

Resolution: fixed
Status: newclosed

(In [2503]) fixed #4009: New relation does not show up in relation editor

in reply to:  4 ; comment:6 by Gubaer, 15 years ago

Replying to jttt:

... RelationListModel.relations should ever be null

It wasn't properly initialized and it could have been null after a setRelations()

I've fixed that in r2503 and relations != null should always be true now.

in reply to:  6 comment:7 by anonymous, 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>();

comment:8 by Gubaer, 15 years ago

(In [2504]) see #4009 : further update as proposed by jttt

Modify Ticket

Change Properties
Set your email in Preferences
Action
as closed The owner will remain team.
as The resolution will be set.
The resolution will be deleted. Next status will be 'reopened'.

Add Comment


E-mail address and name can be saved in the Preferences .
 
Note: See TracTickets for help on using tickets.