Modify

Opened 2 years ago

Closed 2 years ago

Last modified 2 years ago

#22712 closed defect (fixed)

ignore list doesn't work

Reported by: GerdP Owned by: team
Priority: normal Milestone: 23.02
Component: Core validator Version:
Keywords: template_report ignore list regression Cc: taylor.smock

Description

What steps will reproduce the problem?

  1. Validate attached file with information level activated and the following settings

validator.UnconnectedWays.node_way_distance_railway 1
validator.UnconnectedWays.way_way_distance 1.0

  1. You should find information message

Connected way end node near other way (1)TestError [tester=org.openstreetmap.josm.data.validation.tests.UnconnectedWays$UnconnectedHighways@178cb746, unique code=-1765317246, code=1311, message=Connected way end node near other way]

  1. select this message and click on ignore
  2. run validator again

What is the expected result?

the info message is not shown again

What happens instead?

the info message appears again

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

I find this entry in preferences.xml:
<tag key=':n_1129771211:w_342134203' value='-1765317246_1311'/>

Relative:URL: ^/trunk
Repository:UUID: 0c6e7542-c601-0410-84e7-c038aed88b3b
Last:Changed Date: 2023-01-29 21:53:34 +0100 (Sun, 29 Jan 2023)
Revision:18646
Build-Date:2023-01-30 02:30:56
URL:https://josm.openstreetmap.de/svn/trunk

Identification: JOSM/1.5 (18646 en) Windows 10 64-Bit
OS Build number: Windows 10 Home 2009 (19045)
Memory Usage: 280 MB / 1972 MB (154 MB allocated, but free)
Java version: 17.0.4+8-LTS, Azul Systems, Inc., OpenJDK 64-Bit Server VM
Look and Feel: com.sun.java.swing.plaf.windows.WindowsLookAndFeel
Screen: \Display0 1920×1080 (scaling 1.00×1.00)
Maximum Screen Size: 1920×1080
Best cursor sizes: 16×16→32×32, 32×32→32×32
System property file.encoding: Cp1252
System property sun.jnu.encoding: Cp1252
Locale info: en_DE
Numbers with default locale: 1234567890 -> 1234567890
VM arguments: [-Djpackage.app-version=1.5.18531, --add-modules=java.scripting,java.sql,javafx.controls,javafx.media,javafx.swing,javafx.web, --add-exports=java.base/sun.security.action=ALL-UNNAMED, --add-exports=java.desktop/com.sun.imageio.plugins.jpeg=ALL-UNNAMED, --add-exports=java.desktop/com.sun.imageio.spi=ALL-UNNAMED, --add-opens=java.base/java.lang=ALL-UNNAMED, --add-opens=java.base/java.nio=ALL-UNNAMED, --add-opens=java.base/jdk.internal.loader=ALL-UNNAMED, --add-opens=java.base/jdk.internal.ref=ALL-UNNAMED, --add-opens=java.desktop/javax.imageio.spi=ALL-UNNAMED, --add-opens=java.desktop/javax.swing.text.html=ALL-UNNAMED, --add-opens=java.prefs/java.util.prefs=ALL-UNNAMED, -Djpackage.app-path=%UserProfile%\AppData\Local\JOSM\HWConsole.exe]
Dataset consistency test: No problems found

Plugins:
+ OpeningHoursEditor (35924)
+ RoadSigns (36038)
+ apache-commons (36034)
+ buildings_tools (36011)
+ contourmerge (v0.1.9)
+ ejml (35924)
+ geotools (36028)
+ jackson (36034)
+ jaxb (35952)
+ jts (36004)
+ o5m (35893)
+ opendata (36025)
+ pbf (36034)
+ poly (35976)
+ reltoolbox (35976)
+ reverter (36043)
+ undelete (36011)
+ utilsplugin2 (36011)

Validator rules:
+ c:\josm\core\resources\data\validator\combinations.mapcss
+ c:\josm\core\resources\data\validator\geometry.mapcss
+ c:\josm\core\resources\data\validator\unnecessary.mapcss
+ d:\java_tools\JOSM\mygeometry.mapcss
+ https://josm.openstreetmap.de/josmfile?page=Rules/GermanySpecific&zip=1

Last errors/warnings:
- 00000.578 W: extended font config - overriding 'filename.Myanmar_Text=mmrtext.ttf' with 'MMRTEXT.TTF'
- 00000.580 W: extended font config - overriding 'filename.Mongolian_Baiti=monbaiti.ttf' with 'MONBAITI.TTF'
- 00000.992 E: java.security.KeyStoreException: Windows-ROOT not found. Cause: java.security.NoSuchAlgorithmException: Windows-ROOT KeyStore not available

Attachments (1)

sample.osm (119.7 KB ) - added by GerdP 2 years ago.

Download all attachments as: .zip

Change History (11)

by GerdP, 2 years ago

Attachment: sample.osm added

comment:1 by GerdP, 2 years ago

Cc: taylor.smock added

Maybe a regression from r18636?

comment:2 by taylor.smock, 2 years ago

I wrote tests specifically to avoid this, and when I was manually testing, it was working.

I'll see if I can track it down.

comment:3 by GerdP, 2 years ago

One more info:
The entry in preferences.xml changed to <tag key=':n_1129771211:w_342134203' value=''/>
Maybe the negative hash value causes problems while parsing?

comment:4 by taylor.smock, 2 years ago

That might be it -- I just ignored the top two from my test area, and it worked. Neither one had a - in the hashcode.

comment:5 by taylor.smock, 2 years ago

I've been able to reproduce -- it looks like the OsmValidator#save call modifies the list. I've adapted the test for this, and I'm looking into fixing the problem. It appears to be a simple regex update, but I'm waiting on the full test suite to finish.

comment:6 by taylor.smock, 2 years ago

Resolution: fixed
Status: newclosed

In 18649/josm:

Fix #22712: ignore list doesn't work

This occurred due to OsmValidator#save modifying the list, and expecting
all error codes to be positive.

TestErrorTest now checks one of the tests known to have a negative hashcode.

This also adds some additional JUnit 5 annotations. The additional
annotations are:

  • @LayerManager (cleans up layers after each test run)
    • This is automatically registered for all tests
  • @Projection (sets up the ProjectionRegistry for each test)

comment:7 by taylor.smock, 2 years ago

Well, it looks like we have a total of 18 tests which have a negative hashcode.

  • org.openstreetmap.josm.data.validation.OsmValidatorTest$1 -- not a problem as it is an anonymous class for testing
  • org.openstreetmap.josm.data.validation.tests.Addresses
  • org.openstreetmap.josm.data.validation.tests.ApiCapabilitiesTest
  • org.openstreetmap.josm.data.validation.tests.BarriersEntrances
  • org.openstreetmap.josm.data.validation.tests.ConditionalKeys
  • org.openstreetmap.josm.data.validation.tests.CrossingWays$Boundaries
  • org.openstreetmap.josm.data.validation.tests.CrossingWays$SelfCrossing
  • org.openstreetmap.josm.data.validation.tests.CrossingWays$Ways
  • org.openstreetmap.josm.data.validation.tests.DirectionNodes
  • org.openstreetmap.josm.data.validation.tests.DuplicateNode
  • org.openstreetmap.josm.data.validation.tests.Lanes
  • org.openstreetmap.josm.data.validation.tests.MapCSSTagChecker$MapCSSTagCheckerAndRule -- probably not an issue, since we have effectively hardcoded the mapcss errors to be 3000
  • org.openstreetmap.josm.data.validation.tests.PowerLines
  • org.openstreetmap.josm.data.validation.tests.TagChecker
  • org.openstreetmap.josm.data.validation.tests.TagCheckerTest$1 -- not a problem as it is an anonymous class for testing
  • org.openstreetmap.josm.data.validation.tests.UnconnectedWays$UnconnectedHighways
  • org.openstreetmap.josm.data.validation.tests.UntaggedWay
  • org.openstreetmap.josm.data.validation.tests.WayConnectedToArea

comment:8 by skyper, 2 years ago

Keywords: ignore list regression added

comment:9 by skyper, 2 years ago

Milestone: 23.02

comment:10 by skyper, 2 years ago

Ticket #22754 has been marked as a duplicate of this ticket.

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.