Modify

Opened 2 weeks ago

Closed 2 weeks ago

Last modified 2 weeks ago

#20342 closed defect (fixed)

Validator results not cleared

Reported by: Hb--- Owned by: GerdP
Priority: minor Milestone: 21.01
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 (10)

comment:1 Changed 2 weeks ago by GerdP

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.

comment:2 in reply to:  1 ; Changed 2 weeks ago by 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.

comment:3 in reply to:  1 Changed 2 weeks ago by Hb---

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.

comment:4 in reply to:  2 Changed 2 weeks ago by GerdP

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 Changed 2 weeks ago by GerdP

Owner: changed from team to GerdP
Status: newassigned

comment:6 Changed 2 weeks ago by GerdP

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 #16355)
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.

Last edited 2 weeks ago by GerdP (previous) (diff)

comment:7 Changed 2 weeks ago by GerdP

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 Changed 2 weeks ago by GerdP

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 Changed 2 weeks ago by Hb---

Dankeschön.

comment:10 Changed 2 weeks ago by Klumbumbus

Milestone: 21.01

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.

Add Comment


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

 
Note: See TracTickets for help on using tickets.