Modify

Opened 3 years ago

Closed 3 years ago

Last modified 3 years ago

#20342 closed defect (fixed)

Validator results not cleared

Reported by: Hb--- Owned by: GerdP
Priority: minor Milestone: 21.02
Component: Core validator Version: latest
Keywords: template_report Cc:

Description

What steps will reproduce the problem?

  1. Create a new layer
  2. Draw a new way and tag highway=primary to it.
  3. Click Upload data ...
  4. In the Suspicious data found. Upload anyway? dialog click Cancel.
  5. Notice the Unnamed ways warning in the Validation Results panel
  6. Edit the tag highway=primary and change it to waterway=stream.
  7. Click again Upload data ...

What is the expected result?

Validation Results panel without an entry.

What happens instead?

No change in the Validation Result panel. It still shows the outdated Unnamed ways warning.

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

The steps described are for easily reproducing the ticket. The misleading behaviour can occur while editing and checking without uploading.

URL:https://josm.openstreetmap.de/svn/trunk
Repository:UUID: 0c6e7542-c601-0410-84e7-c038aed88b3b
Last:Changed Date: 2021-01-02 16:14:00 +0100 (Sat, 02 Jan 2021)
Build-Date:2021-01-03 02:30:59
Revision:17432
Relative:URL: ^/trunk

Identification: JOSM/1.5 (17432 en) Windows 7 64-Bit
OS Build number: Windows 7 Professional (7601)
Memory Usage: 1278 MB / 3604 MB (678 MB allocated, but free)
Java version: 1.8.0_242-b08, AdoptOpenJDK, OpenJDK 64-Bit Server VM
Look and Feel: com.sun.java.swing.plaf.windows.WindowsLookAndFeel
Screen: \Display0 1280×1024 (scaling 1.00×1.00)
Maximum Screen Size: 1280×1024
Best cursor sizes: 16×16→48×48, 32×32→48×48
Dataset consistency test: No problems found

Plugins:
+ Mapillary (1.5.33-dirty)
+ OpenStreetCam (356)
+ apache-commons (35524)
+ apache-http (35589)
+ buildings_tools (35669)
+ ejml (35458)
+ geotools (35458)
+ imagery_offset_db (35640)
+ jaxb (35543)
+ jna (35662)
+ jts (35458)
+ mapwithai (1.7.1.1)
+ opendata (35640)
+ reverter (35640)
+ utilsplugin2 (35674)

Attachments (0)

Change History (11)

comment:1 by GerdP, 3 years ago

I think this is a wontfix. It's nearly impossible to recompute the list of errors each time when you change something in the data. It would extremely slow down JOSM. So, if you want new validator results run Validator.

in reply to:  1 ; comment:2 by Don-vip, 3 years ago

I think it should be fixed. It's not at a random time, it's when we click upload data, so the validator is run. It makes sense to update the validator panel.

in reply to:  1 comment:3 by Hb---, 3 years ago

Replying to GerdP:

... each time when you change something ...

That enhancement was dismissed in #17101 for good.

So, if you want new validator results run Validator.

With clicking Upload data ... the second time in Step 7 another validator run is initiated. And on starting this run JOSM should clear the Validator Results panel and the Validator error layer. My additional information was not completely clear for this. I had noticed this misleading behaviour somehow in a workflow without uploading but could not remember the steps leading to it.

in reply to:  2 comment:4 by GerdP, 3 years ago

Replying to Don-vip:

I think it should be fixed. It's not at a random time, it's when we click upload data, so the validator is run. It makes sense to update the validator panel.

OK, I assume an empty error list was ignored to be able to keep the results from a normal validator run? I concentrated on the last sentence:

The misleading behaviour can occur while editing and checking without uploading.

If this is main problem see comment:1

comment:5 by GerdP, 3 years ago

Owner: changed from team to GerdP
Status: newassigned

comment:6 by GerdP, 3 years ago

OK, at least two different problems here:
1) If all errors that were found are in the ignore list the validator tree is not rebuild (probably a regression of #16335)
2) The error layer is not updated when ValidatorTreePanel.buildTree() is called with an empty error list because
invalidationListeners.fireEvent(Runnable::run); isn't executed.

Version 0, edited 3 years ago by GerdP (next)

comment:7 by GerdP, 3 years ago

In 17436/josm:

see #20342: Validator results not cleared

  • make sure that validator tree is rebuild even if all found errors are ignored (regression from r13893)

comment:8 by GerdP, 3 years ago

Resolution: fixed
Status: assignedclosed

In 17437/josm:

fix #20342: Validator results not cleared

  • add code to make sure that invalidation listeners are called when buildTree is called even if the tree is empty

The new method buildTreeInternal() is not strictly needed but I think it was too easy to add a return statement somewhere without looking at the very end of the complex method and thus skipping the line
invalidationListeners.fireEvent(Runnable::run);

comment:9 by Hb---, 3 years ago

Dankeschön.

comment:10 by Klumbumbus, 3 years ago

Milestone: 21.01

comment:11 by stoecker, 3 years ago

Milestone: 21.0121.02

Milestone renamed

Modify Ticket

Change Properties
Set your email in Preferences
Action
as closed The owner will remain GerdP.
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.