Modify

Opened 4 years ago

Last modified 4 years ago

#19503 new defect

Rules validation throws exception instead or warning

Reported by: skyper Owned by: team
Priority: minor Milestone:
Component: Core Version:
Keywords: template_report rules validator mapcss Cc:

Description

What steps will reproduce the problem?

  1. (Re-)Load a broken rule file containing backslashes '\' in the assertMatch values can cause this exception.

What is the expected result?

Message including the line and the position of the problem but no BugReportHandler

What happens instead?

BugReportHandler

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

After that, JOSM stops to automatically reload the rule file.
Do not get the BugReportHandler all the time but the exception on the console.

Relative:URL: ^/trunk
Repository:UUID: 0c6e7542-c601-0410-84e7-c038aed88b3b
Last:Changed Date: 2020-07-06 23:02:10 +0200 (Mon, 06 Jul 2020)
Revision:16738
Build-Date:2020-07-07 01:30:48
URL:https://josm.openstreetmap.de/svn/trunk

Plugins:
+ tagging-preset-tester (35267)

Validator rules:
+ ${HOME}/JOSM/validator/GTFS_rules.mapcss

Last errors/warnings:
- E: Handled by bug report queue: java.lang.IllegalArgumentException: Expecting n/node/w/way/r/relation/area, but got '"node'


=== REPORTED CRASH DATA ===
BugReportExceptionHandler#handleException:
No data collected.

Warning issued by: BugReportExceptionHandler#handleException

=== STACK TRACE ===
Thread: File Watcher (23)
java.lang.IllegalArgumentException: Expecting n/node/w/way/r/relation/area, but got '"node'
	at org.openstreetmap.josm.data.osm.OsmUtils.createPrimitive(OsmUtils.java:171)
	at org.openstreetmap.josm.data.validation.tests.MapCSSTagCheckerAsserts.checkAsserts(MapCSSTagCheckerAsserts.java:60)
	at org.openstreetmap.josm.data.validation.tests.MapCSSTagChecker$TagCheck.ofMapCSSRule(MapCSSTagChecker.java:344)
	at org.openstreetmap.josm.data.validation.tests.MapCSSTagChecker$TagCheck.readMapCSS(MapCSSTagChecker.java:366)
	at org.openstreetmap.josm.data.validation.tests.MapCSSTagChecker.addMapCSS(MapCSSTagChecker.java:790)
	at org.openstreetmap.josm.data.validation.tests.MapCSSTagChecker.addMapCSS(MapCSSTagChecker.java:778)
	at org.openstreetmap.josm.data.validation.tests.MapCSSTagChecker.reloadRule(MapCSSTagChecker.java:858)
	at org.openstreetmap.josm.io.FileWatcher.processEvents(FileWatcher.java:160)
	at java.base/java.lang.Thread.run(Thread.java:834)

Attachments (0)

Change History (3)

comment:1 by skyper, 4 years ago

Oh. an odd number of " in the assertMatch triggers this, too.

comment:2 by skyper, 4 years ago

Keywords: mapcss added

comment:3 by skyper, 4 years ago

See #19685 for another exception raised by validating an incorrect rule.

Last edited 4 years ago by skyper (previous) (diff)

Modify Ticket

Change Properties
Set your email in Preferences
Action
as new The owner will remain team.
as The resolution will be set. Next status will be 'closed'.
to The owner will be changed from team to the specified user.
Next status will be 'needinfo'. The owner will be changed from team to skyper.
as duplicate The resolution will be set to duplicate. Next status will be 'closed'. The specified ticket will be cross-referenced with this ticket.
The owner will be changed from team to anonymous. Next status will be 'assigned'.

Add Comment


E-mail address and name can be saved in the Preferences .
 
Note: See TracTickets for help on using tickets.