Modify

#7936 closed defect (fixed)

Validator dialog crashes when the active edit layer is deleted

Reported by: Gnonthgol Owned by: team
Priority: normal Component: Core
Version: tested Keywords: Validator
Cc:

Description

If you delete the active edit layer the validator dialog does not update. With some debuging I have found that the cause of the problem is that mapView.getActiveLayer() updates before the listeners are triggered. That causes the check at org.openstreetmap.josm.data.validation.OsmValidator:298 to fail every time.

Maybe it would be easier if the logic was moved to org.openstreetmap.josm.gui.dialogs.ValidatorDialog

Attachments (0)

Change History (2)

comment:1 Changed 10 months ago by Don-vip

Confirmed:

  1. Download some data that produces validation warnings, and validate
  2. Add Imagery layer
  3. Delete edit layer
  4. Select a primitive in validator dialog, which has not been updated:
    java.lang.NullPointerException
    	at org.openstreetmap.josm.gui.dialogs.ValidatorDialog.setSelectedItems(ValidatorDialog.java:369)
    	at org.openstreetmap.josm.gui.dialogs.ValidatorDialog.access$6(ValidatorDialog.java:347)
    	at org.openstreetmap.josm.gui.dialogs.ValidatorDialog$2.actionPerformed(ValidatorDialog.java:121)
    	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)
    
Last edited 10 months ago by Don-vip (previous) (diff)

comment:2 Changed 10 months ago by Don-vip

  • Resolution set to fixed
  • Status changed from new to closed

In 5415/josm:

fix #7936 - Validator dialog is not updated when the active edit layer is deleted

Add Comment

Modify Ticket

Change Properties
<Author field>
Action
as closed .
as The resolution will be set. Next status will be 'closed'.
The resolution will be deleted. Next status will be 'reopened'.
Author


E-mail address and user name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.