Modify

Opened 11 years ago

Closed 11 years ago

#8435 closed defect (fixed)

[PATCH] Relationship Editor crashes JOSM

Reported by: Lesath Owned by: team
Priority: critical Milestone:
Component: Core Version: latest
Keywords: template_report Cc:

Description

What steps will reproduce the problem?

  1. Start JOSM, Create a new layer with File-> New Layer
  2. Create a Polygon (doesn't matter how many edges)
  3. Click Tools->Create multipoligon

What is the expected result?

Creation of the multipolygon plus opening of the relationship-editor

What happens instead?

A crash occurs... The multipolygon is created, but can not be edited.

Please provide any additional information below. Attach a screenshot if
possible.

Build-Date: 2013-02-18 09:11:12
Revision: 5725
Is-Local-Build: true

Identification: JOSM/1.5 (5725 SVN de)
Memory Usage: 369 MB / 507 MB (45 MB allocated, but free)
Java version: 1.6.0_39, Apple Inc., Java HotSpot(TM) 64-Bit Server VM
Operating system: Mac OS X
Dataset consistency test: No problems found

Plugin: OpeningHoursEditor (29210)
Plugin: download_along (29210)
Plugin: turnlanes (29210)
Plugin: turnrestrictions (29210)

java.lang.NullPointerException
	at org.openstreetmap.josm.gui.dialogs.RelationListDialog$RelationListModel.setSelectedRelations(RelationListDialog.java:919)
	at org.openstreetmap.josm.gui.dialogs.RelationListDialog.selectRelations(RelationListDialog.java:300)
	at org.openstreetmap.josm.gui.dialogs.RelationListDialog.selectRelation(RelationListDialog.java:289)
	at org.openstreetmap.josm.actions.CreateMultipolygonAction$1.run(CreateMultipolygonAction.java:115)
	at java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:209)
	at java.awt.EventQueue.dispatchEventImpl(EventQueue.java:708)
	at java.awt.EventQueue.access$400(EventQueue.java:82)
	at java.awt.EventQueue$2.run(EventQueue.java:669)
	at java.awt.EventQueue$2.run(EventQueue.java:667)
	at java.security.AccessController.doPrivileged(Native Method)
	at java.security.AccessControlContext$1.doIntersectionPrivilege(AccessControlContext.java:87)
	at java.awt.EventQueue.dispatchEvent(EventQueue.java:678)
	at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:296)
	at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:211)
	at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:201)
	at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:196)
	at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:188)
	at java.awt.EventDispatchThread.run(EventDispatchThread.java:122

Attachments (1)

JOSMRelationListEditorFixPatch.txt (577 bytes ) - added by Lesath 11 years ago.
Patch for Relationship dialog

Download all attachments as: .zip

Change History (10)

comment:1 by Don-vip, 11 years ago

Owner: changed from team to Don-vip
Status: newassigned

Either introduced by r5725, or #8433 not corrected completely.
I will fix this tonight.
In the meanwhile if you plan to use JOSM today I advise you to switch to tested version or test version r5723: http://josm.openstreetmap.de/download/josm-snapshot-5723.jar

comment:2 by Don-vip, 11 years ago

Owner: changed from Don-vip to Lesath
Status: assignedneedinfo

Cannot reproduce. Did you update and build JOSM correctly ? Can you reproduce with latest jar ?

comment:3 by Lesath, 11 years ago

Owner: changed from Lesath to anonymous

Yes, I can reproduce It reliably.

At first I do a svn update to my local copy. The local copy is otherwise unmodified - I just wanted to look at the sources and try the latest features.

I do a ant clean and ant dist every time - but I can't debug the code right now, so I will look into it further today evening.

Possible it has something to do with the Apple implementation of Java (it is still 1.6 and Snow Leopard) - or it is something of a leftover from an old JOSM-Version.

Here the Stacktrace from the new copy:

Build-Date: 2013-02-18 13:13:31
Revision: 5727
Is-Local-Build: true

Identification: JOSM/1.5 (5727 SVN en)
Memory Usage: 163 MB / 507 MB (69 MB allocated, but free)
Java version: 1.6.0_39, Apple Inc., Java HotSpot(TM) 64-Bit Server VM
Operating system: Mac OS X
Dataset consistency test: No problems found

Plugin: OpeningHoursEditor (29210)
Plugin: download_along (29210)
Plugin: turnlanes (29210)
Plugin: turnrestrictions (29210)

java.lang.NullPointerException

at org.openstreetmap.josm.gui.dialogs.RelationListDialog$RelationListModel.setSelectedRelations(RelationListDialog.java:919)
at org.openstreetmap.josm.gui.dialogs.RelationListDialog.selectRelations(RelationListDialog.java:300)
at org.openstreetmap.josm.gui.dialogs.RelationListDialog.selectRelation(RelationListDialog.java:289)
at org.openstreetmap.josm.actions.CreateMultipolygonAction$1.run(CreateMultipolygonAction.java:115)
at java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:209)
at java.awt.EventQueue.dispatchEventImpl(EventQueue.java:708)
at java.awt.EventQueue.access$400(EventQueue.java:82)
at java.awt.EventQueue$2.run(EventQueue.java:669)
at java.awt.EventQueue$2.run(EventQueue.java:667)
at java.security.AccessController.doPrivileged(Native Method)
at java.security.AccessControlContext$1.doIntersectionPrivilege(AccessControlContext.java:87)
at java.awt.EventQueue.dispatchEvent(EventQueue.java:678)
at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:296)
at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:211)
at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:201)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:196)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:188)
at java.awt.EventDispatchThread.run(EventDispatchThread.java:122)

comment:4 by Don-vip, 11 years ago

This is really strange to have a NPE at line 919 of RelationListDialog.java.

If you have a 100% reproducable .osm file, can you attach it ? Thanks.

by Lesath, 11 years ago

Patch for Relationship dialog

comment:5 by Lesath, 11 years ago

Hi - I've wrote a litte patch for this problem. Autoboxing can be really nasty sometimes - I rarely use it in my code itself.

comment:6 by Lesath, 11 years ago

Could you check it in the repository? (same user - but now registered in wiki ;-) )

comment:7 by Lesath, 11 years ago

Owner: changed from anonymous to Don-vip

comment:8 by Don-vip, 11 years ago

Owner: changed from Don-vip to team
Status: needinfonew
Summary: Relationship Editor crashes JOSM[PATCH] Relationship Editor crashes JOSM

Oh, right :D
I have no access to SVN right now but I will commit the patch tonight, if no one commits it before :)

comment:9 by Don-vip, 11 years ago

Resolution: fixed
Status: newclosed

In 5728/josm:

fix #8435 - NPE in Relation list dialog (based on patch of Lesath)

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.